CMS 3D CMS Logo

NVProfilerService.cc
Go to the documentation of this file.
1 // -*- C++ -*-
2 //
3 // Package: HeterogeneousCore/CUDAServices
4 // Class : NVProfilerService
5 
6 #include <algorithm>
7 #include <iostream>
8 #include <sstream>
9 #include <string>
10 #include <vector>
11 
12 #include <tbb/concurrent_vector.h>
13 #include <tbb/enumerable_thread_specific.h>
14 
15 #include <fmt/printf.h>
16 
17 #include <cuda_profiler_api.h>
18 #include <nvToolsExt.h>
19 
45 
46 using namespace std::string_literals;
47 
48 namespace {
49  int nvtxDomainRangePush(nvtxDomainHandle_t domain, const char* message) {
50  nvtxEventAttributes_t eventAttrib = {};
51  eventAttrib.version = NVTX_VERSION;
52  eventAttrib.size = NVTX_EVENT_ATTRIB_STRUCT_SIZE;
53  eventAttrib.messageType = NVTX_MESSAGE_TYPE_ASCII;
54  eventAttrib.message.ascii = message;
55  return nvtxDomainRangePushEx(domain, &eventAttrib);
56  }
57 
58  __attribute__((unused)) int nvtxDomainRangePushColor(nvtxDomainHandle_t domain, const char* message, uint32_t color) {
59  nvtxEventAttributes_t eventAttrib = {};
60  eventAttrib.version = NVTX_VERSION;
61  eventAttrib.size = NVTX_EVENT_ATTRIB_STRUCT_SIZE;
62  eventAttrib.colorType = NVTX_COLOR_ARGB;
63  eventAttrib.color = color;
64  eventAttrib.messageType = NVTX_MESSAGE_TYPE_ASCII;
65  eventAttrib.message.ascii = message;
66  return nvtxDomainRangePushEx(domain, &eventAttrib);
67  }
68 
69  __attribute__((unused)) nvtxRangeId_t nvtxDomainRangeStart(nvtxDomainHandle_t domain, const char* message) {
70  nvtxEventAttributes_t eventAttrib = {};
71  eventAttrib.version = NVTX_VERSION;
72  eventAttrib.size = NVTX_EVENT_ATTRIB_STRUCT_SIZE;
73  eventAttrib.messageType = NVTX_MESSAGE_TYPE_ASCII;
74  eventAttrib.message.ascii = message;
75  return nvtxDomainRangeStartEx(domain, &eventAttrib);
76  }
77 
78  nvtxRangeId_t nvtxDomainRangeStartColor(nvtxDomainHandle_t domain, const char* message, uint32_t color) {
79  nvtxEventAttributes_t eventAttrib = {};
80  eventAttrib.version = NVTX_VERSION;
81  eventAttrib.size = NVTX_EVENT_ATTRIB_STRUCT_SIZE;
82  eventAttrib.colorType = NVTX_COLOR_ARGB;
83  eventAttrib.color = color;
84  eventAttrib.messageType = NVTX_MESSAGE_TYPE_ASCII;
85  eventAttrib.message.ascii = message;
86  return nvtxDomainRangeStartEx(domain, &eventAttrib);
87  }
88 
89  void nvtxDomainMark(nvtxDomainHandle_t domain, const char* message) {
90  nvtxEventAttributes_t eventAttrib = {};
91  eventAttrib.version = NVTX_VERSION;
92  eventAttrib.size = NVTX_EVENT_ATTRIB_STRUCT_SIZE;
93  eventAttrib.messageType = NVTX_MESSAGE_TYPE_ASCII;
94  eventAttrib.message.ascii = message;
95  nvtxDomainMarkEx(domain, &eventAttrib);
96  }
97 
98  __attribute__((unused)) void nvtxDomainMarkColor(nvtxDomainHandle_t domain, const char* message, uint32_t color) {
99  nvtxEventAttributes_t eventAttrib = {};
100  eventAttrib.version = NVTX_VERSION;
101  eventAttrib.size = NVTX_EVENT_ATTRIB_STRUCT_SIZE;
102  eventAttrib.colorType = NVTX_COLOR_ARGB;
103  eventAttrib.color = color;
104  eventAttrib.messageType = NVTX_MESSAGE_TYPE_ASCII;
105  eventAttrib.message.ascii = message;
106  nvtxDomainMarkEx(domain, &eventAttrib);
107  }
108 
109  enum {
110  nvtxBlack = 0x00000000,
111  nvtxRed = 0x00ff0000,
112  nvtxDarkGreen = 0x00009900,
113  nvtxGreen = 0x0000ff00,
114  nvtxLightGreen = 0x00ccffcc,
115  nvtxBlue = 0x000000ff,
116  nvtxAmber = 0x00ffbf00,
117  nvtxLightAmber = 0x00fff2cc,
118  nvtxWhite = 0x00ffffff
119  };
120 
121  constexpr nvtxRangeId_t nvtxInvalidRangeId = 0xfffffffffffffffful;
122 } // namespace
123 
125 public:
128 
129  static void fillDescriptions(edm::ConfigurationDescriptions& descriptions);
130 
131  void preallocate(edm::service::SystemBounds const&);
132 
133  // these signal pair are NOT guaranteed to be called by the same thread
134  void preBeginJob(edm::PathsAndConsumesOfModulesBase const&, edm::ProcessContext const&);
135  void postBeginJob();
136 
137  // there is no preEndJob() signal
138  void postEndJob();
139 
140  // these signal pair are NOT guaranteed to be called by the same thread
141  void preGlobalBeginRun(edm::GlobalContext const&);
142  void postGlobalBeginRun(edm::GlobalContext const&);
143 
144  // these signal pair are NOT guaranteed to be called by the same thread
145  void preGlobalEndRun(edm::GlobalContext const&);
146  void postGlobalEndRun(edm::GlobalContext const&);
147 
148  // these signal pair are NOT guaranteed to be called by the same thread
149  void preStreamBeginRun(edm::StreamContext const&);
150  void postStreamBeginRun(edm::StreamContext const&);
151 
152  // these signal pair are NOT guaranteed to be called by the same thread
153  void preStreamEndRun(edm::StreamContext const&);
154  void postStreamEndRun(edm::StreamContext const&);
155 
156  // these signal pair are NOT guaranteed to be called by the same thread
157  void preGlobalBeginLumi(edm::GlobalContext const&);
158  void postGlobalBeginLumi(edm::GlobalContext const&);
159 
160  // these signal pair are NOT guaranteed to be called by the same thread
161  void preGlobalEndLumi(edm::GlobalContext const&);
162  void postGlobalEndLumi(edm::GlobalContext const&);
163 
164  // these signal pair are NOT guaranteed to be called by the same thread
165  void preStreamBeginLumi(edm::StreamContext const&);
166  void postStreamBeginLumi(edm::StreamContext const&);
167 
168  // these signal pair are NOT guaranteed to be called by the same thread
169  void preStreamEndLumi(edm::StreamContext const&);
170  void postStreamEndLumi(edm::StreamContext const&);
171 
172  // these signal pair are NOT guaranteed to be called by the same thread
173  void preEvent(edm::StreamContext const&);
174  void postEvent(edm::StreamContext const&);
175 
176  // these signal pair are NOT guaranteed to be called by the same thread
177  void prePathEvent(edm::StreamContext const&, edm::PathContext const&);
178  void postPathEvent(edm::StreamContext const&, edm::PathContext const&, edm::HLTPathStatus const&);
179 
180  // these signal pair are NOT guaranteed to be called by the same thread
181  void preModuleEventPrefetching(edm::StreamContext const&, edm::ModuleCallingContext const&);
182  void postModuleEventPrefetching(edm::StreamContext const&, edm::ModuleCallingContext const&);
183 
184  // these signal pair are guaranteed to be called by the same thread
185  void preOpenFile(std::string const&, bool);
186  void postOpenFile(std::string const&, bool);
187 
188  // these signal pair are guaranteed to be called by the same thread
189  void preCloseFile(std::string const&, bool);
190  void postCloseFile(std::string const&, bool);
191 
192  // these signal pair are guaranteed to be called by the same thread
193  void preSourceConstruction(edm::ModuleDescription const&);
194  void postSourceConstruction(edm::ModuleDescription const&);
195 
196  // these signal pair are guaranteed to be called by the same thread
197  void preSourceRun(edm::RunIndex);
198  void postSourceRun(edm::RunIndex);
199 
200  // these signal pair are guaranteed to be called by the same thread
201  void preSourceLumi(edm::LuminosityBlockIndex);
202  void postSourceLumi(edm::LuminosityBlockIndex);
203 
204  // these signal pair are guaranteed to be called by the same thread
205  void preSourceEvent(edm::StreamID);
206  void postSourceEvent(edm::StreamID);
207 
208  // these signal pair are guaranteed to be called by the same thread
209  void preModuleConstruction(edm::ModuleDescription const&);
210  void postModuleConstruction(edm::ModuleDescription const&);
211 
212  // these signal pair are guaranteed to be called by the same thread
213  void preModuleDestruction(edm::ModuleDescription const&);
214  void postModuleDestruction(edm::ModuleDescription const&);
215 
216  // these signal pair are guaranteed to be called by the same thread
217  void preModuleBeginJob(edm::ModuleDescription const&);
218  void postModuleBeginJob(edm::ModuleDescription const&);
219 
220  // these signal pair are guaranteed to be called by the same thread
221  void preModuleEndJob(edm::ModuleDescription const&);
222  void postModuleEndJob(edm::ModuleDescription const&);
223 
224  // these signal pair are guaranteed to be called by the same thread
225  void preModuleBeginStream(edm::StreamContext const&, edm::ModuleCallingContext const&);
226  void postModuleBeginStream(edm::StreamContext const&, edm::ModuleCallingContext const&);
227 
228  // these signal pair are guaranteed to be called by the same thread
229  void preModuleEndStream(edm::StreamContext const&, edm::ModuleCallingContext const&);
230  void postModuleEndStream(edm::StreamContext const&, edm::ModuleCallingContext const&);
231 
232  // these signal pair are guaranteed to be called by the same thread
233  void preModuleGlobalBeginRun(edm::GlobalContext const&, edm::ModuleCallingContext const&);
234  void postModuleGlobalBeginRun(edm::GlobalContext const&, edm::ModuleCallingContext const&);
235 
236  // these signal pair are guaranteed to be called by the same thread
237  void preModuleGlobalEndRun(edm::GlobalContext const&, edm::ModuleCallingContext const&);
238  void postModuleGlobalEndRun(edm::GlobalContext const&, edm::ModuleCallingContext const&);
239 
240  // these signal pair are guaranteed to be called by the same thread
241  void preModuleGlobalBeginLumi(edm::GlobalContext const&, edm::ModuleCallingContext const&);
242  void postModuleGlobalBeginLumi(edm::GlobalContext const&, edm::ModuleCallingContext const&);
243 
244  // these signal pair are guaranteed to be called by the same thread
245  void preModuleGlobalEndLumi(edm::GlobalContext const&, edm::ModuleCallingContext const&);
246  void postModuleGlobalEndLumi(edm::GlobalContext const&, edm::ModuleCallingContext const&);
247 
248  // these signal pair are guaranteed to be called by the same thread
249  void preModuleStreamBeginRun(edm::StreamContext const&, edm::ModuleCallingContext const&);
250  void postModuleStreamBeginRun(edm::StreamContext const&, edm::ModuleCallingContext const&);
251 
252  // these signal pair are guaranteed to be called by the same thread
253  void preModuleStreamEndRun(edm::StreamContext const&, edm::ModuleCallingContext const&);
254  void postModuleStreamEndRun(edm::StreamContext const&, edm::ModuleCallingContext const&);
255 
256  // these signal pair are guaranteed to be called by the same thread
257  void preModuleStreamBeginLumi(edm::StreamContext const&, edm::ModuleCallingContext const&);
258  void postModuleStreamBeginLumi(edm::StreamContext const&, edm::ModuleCallingContext const&);
259 
260  // these signal pair are guaranteed to be called by the same thread
261  void preModuleStreamEndLumi(edm::StreamContext const&, edm::ModuleCallingContext const&);
262  void postModuleStreamEndLumi(edm::StreamContext const&, edm::ModuleCallingContext const&);
263 
264  // these signal pair are guaranteed to be called by the same thread
265  void preModuleEventAcquire(edm::StreamContext const&, edm::ModuleCallingContext const&);
266  void postModuleEventAcquire(edm::StreamContext const&, edm::ModuleCallingContext const&);
267 
268  // these signal pair are guaranteed to be called by the same thread
269  void preModuleEvent(edm::StreamContext const&, edm::ModuleCallingContext const&);
270  void postModuleEvent(edm::StreamContext const&, edm::ModuleCallingContext const&);
271 
272  // these signal pair are guaranteed to be called by the same thread
273  void preModuleEventDelayedGet(edm::StreamContext const&, edm::ModuleCallingContext const&);
274  void postModuleEventDelayedGet(edm::StreamContext const&, edm::ModuleCallingContext const&);
275 
276  // these signal pair are guaranteed to be called by the same thread
277  void preEventReadFromSource(edm::StreamContext const&, edm::ModuleCallingContext const&);
278  void postEventReadFromSource(edm::StreamContext const&, edm::ModuleCallingContext const&);
279 
280 private:
281  bool highlight(std::string const& label) const {
282  return (std::binary_search(highlightModules_.begin(), highlightModules_.end(), label));
283  }
284 
285  uint32_t labelColor(std::string const& label) const { return highlight(label) ? nvtxAmber : nvtxGreen; }
286 
287  uint32_t labelColorLight(std::string const& label) const {
288  return highlight(label) ? nvtxLightAmber : nvtxLightGreen;
289  }
290 
291  std::vector<std::string> highlightModules_;
293  const bool skipFirstEvent_;
294 
295  std::atomic<bool> globalFirstEventDone_ = false;
296  std::vector<std::atomic<bool>> streamFirstEventDone_;
297  std::vector<nvtxRangeId_t> event_; // per-stream event ranges
298  std::vector<std::vector<nvtxRangeId_t>> stream_modules_; // per-stream, per-module ranges
299  // use a tbb::concurrent_vector rather than an std::vector because its final size is not known
300  tbb::concurrent_vector<nvtxRangeId_t> global_modules_; // global per-module events
301 
302  nvtxDomainHandle_t global_domain_; // NVTX domain for global EDM transitions
303  std::vector<nvtxDomainHandle_t> stream_domain_; // NVTX domains for per-EDM-stream transitions
304 };
305 
307  : highlightModules_(config.getUntrackedParameter<std::vector<std::string>>("highlightModules")),
308  showModulePrefetching_(config.getUntrackedParameter<bool>("showModulePrefetching")),
309  skipFirstEvent_(config.getUntrackedParameter<bool>("skipFirstEvent")) {
310  // make sure that CUDA is initialised, and that the CUDAService destructor is called after this service's destructor
311  edm::Service<CUDAService> cudaService;
312 
314 
315  // create the NVTX domain for global EDM transitions
316  global_domain_ = nvtxDomainCreate("EDM Global");
317 
318  // enables profile collection; if profiling is already enabled it has no effect
319  if (not skipFirstEvent_) {
320  cudaProfilerStart();
321  }
322 
324 
325  // these signal pair are NOT guaranteed to be called by the same thread
328 
329  // there is no preEndJob() signal
331 
332  // these signal pair are NOT guaranteed to be called by the same thread
335 
336  // these signal pair are NOT guaranteed to be called by the same thread
339 
340  // these signal pair are NOT guaranteed to be called by the same thread
343 
344  // these signal pair are NOT guaranteed to be called by the same thread
347 
348  // these signal pair are NOT guaranteed to be called by the same thread
351 
352  // these signal pair are NOT guaranteed to be called by the same thread
355 
356  // these signal pair are NOT guaranteed to be called by the same thread
359 
360  // these signal pair are NOT guaranteed to be called by the same thread
363 
364  // these signal pair are NOT guaranteed to be called by the same thread
367 
368  // these signal pair are NOT guaranteed to be called by the same thread
371 
373  // these signal pair are NOT guaranteed to be called by the same thread
376  }
377 
378  // these signal pair are guaranteed to be called by the same thread
381 
382  // these signal pair are guaranteed to be called by the same thread
385 
386  // these signal pair are guaranteed to be called by the same thread
389 
390  // these signal pair are guaranteed to be called by the same thread
393 
394  // these signal pair are guaranteed to be called by the same thread
397 
398  // these signal pair are guaranteed to be called by the same thread
401 
402  // these signal pair are guaranteed to be called by the same thread
405 
406  // these signal pair are guaranteed to be called by the same thread
409 
410  // these signal pair are guaranteed to be called by the same thread
413 
414  // these signal pair are guaranteed to be called by the same thread
417 
418  // these signal pair are guaranteed to be called by the same thread
421 
422  // these signal pair are guaranteed to be called by the same thread
425 
426  // these signal pair are guaranteed to be called by the same thread
429 
430  // these signal pair are guaranteed to be called by the same thread
433 
434  // these signal pair are guaranteed to be called by the same thread
437 
438  // these signal pair are guaranteed to be called by the same thread
441 
442  // these signal pair are guaranteed to be called by the same thread
445 
446  // these signal pair are guaranteed to be called by the same thread
449 
450  // these signal pair are guaranteed to be called by the same thread
453 
454  // these signal pair are guaranteed to be called by the same thread
457 
458  // these signal pair are guaranteed to be called by the same thread
461 
462  // these signal pair are guaranteed to be called by the same thread
465 
466  // these signal pair are guaranteed to be called by the same thread
469 
470  // these signal pair are guaranteed to be called by the same thread
473 }
474 
476  for (unsigned int sid = 0; sid < stream_domain_.size(); ++sid) {
477  nvtxDomainDestroy(stream_domain_[sid]);
478  }
479  nvtxDomainDestroy(global_domain_);
480  cudaProfilerStop();
481 }
482 
485  desc.addUntracked<std::vector<std::string>>("highlightModules", {})->setComment("");
486  desc.addUntracked<bool>("showModulePrefetching", false)
487  ->setComment("Show the stack of dependencies that requested to run a module.");
488  desc.addUntracked<bool>("skipFirstEvent", false)
489  ->setComment(
490  "Start profiling after the first event has completed.\nWith multiple streams, ignore transitions belonging "
491  "to events started in parallel to the first event.\nRequires running nvprof with the '--profile-from-start "
492  "off' option.");
493  descriptions.add("NVProfilerService", desc);
494  descriptions.setComment(R"(This Service provides CMSSW-aware annotations to nvprof/nvvm.
495 
496 Notes on nvprof options:
497  - the option '--profile-from-start off' should be used if skipFirstEvent is True.
498  - the option '--cpu-profiling on' currently results in cmsRun being stuck at the beginning of the job.
499  - the option '--cpu-thread-tracing on' is not compatible with jemalloc, and should only be used with cmsRunGlibC.)");
500 }
501 
503  std::stringstream out;
504  out << "preallocate: " << bounds.maxNumberOfConcurrentRuns() << " concurrent runs, "
505  << bounds.maxNumberOfConcurrentLuminosityBlocks() << " luminosity sections, " << bounds.maxNumberOfStreams()
506  << " streams\nrunning on" << bounds.maxNumberOfThreads() << " threads";
507  nvtxDomainMark(global_domain_, out.str().c_str());
508 
509  auto concurrentStreams = bounds.maxNumberOfStreams();
510  // create the NVTX domains for per-EDM-stream transitions
511  stream_domain_.resize(concurrentStreams);
512  for (unsigned int sid = 0; sid < concurrentStreams; ++sid) {
513  stream_domain_[sid] = nvtxDomainCreate(fmt::sprintf("EDM Stream %d", sid).c_str());
514  }
515 
516  event_.resize(concurrentStreams);
517  stream_modules_.resize(concurrentStreams);
518  if (skipFirstEvent_) {
519  globalFirstEventDone_ = false;
520  std::vector<std::atomic<bool>> tmp(concurrentStreams);
521  for (auto& element : tmp)
522  std::atomic_init(&element, false);
524  }
525 }
526 
528  edm::ProcessContext const& pc) {
529  nvtxDomainMark(global_domain_, "preBeginJob");
530 
531  // FIXME this probably works only in the absence of subprocesses
532  // size() + 1 because pathsAndConsumes.allModules() does not include the source
533  unsigned int modules = pathsAndConsumes.allModules().size() + 1;
534  global_modules_.resize(modules, nvtxInvalidRangeId);
535  for (unsigned int sid = 0; sid < stream_modules_.size(); ++sid) {
536  stream_modules_[sid].resize(modules, nvtxInvalidRangeId);
537  }
538 }
539 
542  nvtxDomainMark(global_domain_, "postBeginJob");
543  }
544 }
545 
548  nvtxDomainMark(global_domain_, "postEndJob");
549  }
550 }
551 
554  nvtxDomainRangePush(stream_domain_[sid], "source");
555  }
556 }
557 
560  nvtxDomainRangePop(stream_domain_[sid]);
561  }
562 }
563 
566  nvtxDomainRangePush(global_domain_, "source lumi");
567  }
568 }
569 
572  nvtxDomainRangePop(global_domain_);
573  }
574 }
575 
578  nvtxDomainRangePush(global_domain_, "source run");
579  }
580 }
581 
584  nvtxDomainRangePop(global_domain_);
585  }
586 }
587 
590  nvtxDomainRangePush(global_domain_, ("open file "s + lfn).c_str());
591  }
592 }
593 
596  nvtxDomainRangePop(global_domain_);
597  }
598 }
599 
602  nvtxDomainRangePush(global_domain_, ("close file "s + lfn).c_str());
603  }
604 }
605 
608  nvtxDomainRangePop(global_domain_);
609  }
610 }
611 
613  auto sid = sc.streamID();
615  auto mid = mcc.moduleDescription()->id();
616  auto const& label = mcc.moduleDescription()->moduleLabel();
617  auto const& msg = label + " begin stream";
618  assert(stream_modules_[sid][mid] == nvtxInvalidRangeId);
619  stream_modules_[sid][mid] = nvtxDomainRangeStartColor(stream_domain_[sid], msg.c_str(), labelColor(label));
620  }
621 }
622 
624  auto sid = sc.streamID();
626  auto mid = mcc.moduleDescription()->id();
627  nvtxDomainRangeEnd(stream_domain_[sid], stream_modules_[sid][mid]);
628  stream_modules_[sid][mid] = nvtxInvalidRangeId;
629  }
630 }
631 
633  auto sid = sc.streamID();
635  auto mid = mcc.moduleDescription()->id();
636  auto const& label = mcc.moduleDescription()->moduleLabel();
637  auto const& msg = label + " end stream";
638  assert(stream_modules_[sid][mid] == nvtxInvalidRangeId);
639  stream_modules_[sid][mid] = nvtxDomainRangeStartColor(stream_domain_[sid], msg.c_str(), labelColor(label));
640  }
641 }
642 
644  auto sid = sc.streamID();
646  auto mid = mcc.moduleDescription()->id();
647  nvtxDomainRangeEnd(stream_domain_[sid], stream_modules_[sid][mid]);
648  stream_modules_[sid][mid] = nvtxInvalidRangeId;
649  }
650 }
651 
654  nvtxDomainRangePush(global_domain_, "global begin run");
655  }
656 }
657 
660  nvtxDomainRangePop(global_domain_);
661  }
662 }
663 
666  nvtxDomainRangePush(global_domain_, "global end run");
667  }
668 }
669 
672  nvtxDomainRangePop(global_domain_);
673  }
674 }
675 
677  auto sid = sc.streamID();
679  nvtxDomainRangePush(stream_domain_[sid], "stream begin run");
680  }
681 }
682 
684  auto sid = sc.streamID();
686  nvtxDomainRangePop(stream_domain_[sid]);
687  }
688 }
689 
691  auto sid = sc.streamID();
693  nvtxDomainRangePush(stream_domain_[sid], "stream end run");
694  }
695 }
696 
698  auto sid = sc.streamID();
700  nvtxDomainRangePop(stream_domain_[sid]);
701  }
702 }
703 
706  nvtxDomainRangePush(global_domain_, "global begin lumi");
707  }
708 }
709 
712  nvtxDomainRangePop(global_domain_);
713  }
714 }
715 
718  nvtxDomainRangePush(global_domain_, "global end lumi");
719  }
720 }
721 
724  nvtxDomainRangePop(global_domain_);
725  }
726 }
727 
729  auto sid = sc.streamID();
731  nvtxDomainRangePush(stream_domain_[sid], "stream begin lumi");
732  }
733 }
734 
736  auto sid = sc.streamID();
738  nvtxDomainRangePop(stream_domain_[sid]);
739  }
740 }
741 
743  auto sid = sc.streamID();
744  nvtxDomainRangePush(stream_domain_[sid], "stream end lumi");
745 }
746 
748  auto sid = sc.streamID();
750  nvtxDomainRangePop(stream_domain_[sid]);
751  }
752 }
753 
755  auto sid = sc.streamID();
757  event_[sid] = nvtxDomainRangeStartColor(stream_domain_[sid], "event", nvtxDarkGreen);
758  }
759 }
760 
762  auto sid = sc.streamID();
764  nvtxDomainRangeEnd(stream_domain_[sid], event_[sid]);
765  event_[sid] = nvtxInvalidRangeId;
766  } else {
767  streamFirstEventDone_[sid] = true;
768  auto identity = [](bool x) { return x; };
769  if (std::all_of(streamFirstEventDone_.begin(), streamFirstEventDone_.end(), identity)) {
770  bool expected = false;
771  if (globalFirstEventDone_.compare_exchange_strong(expected, true))
772  cudaProfilerStart();
773  }
774  }
775 }
776 
778  auto sid = sc.streamID();
780  nvtxDomainMark(global_domain_, ("before path "s + pc.pathName()).c_str());
781  }
782 }
783 
785  edm::PathContext const& pc,
786  edm::HLTPathStatus const& hlts) {
787  auto sid = sc.streamID();
789  nvtxDomainMark(global_domain_, ("after path "s + pc.pathName()).c_str());
790  }
791 }
792 
794  auto sid = sc.streamID();
796  auto mid = mcc.moduleDescription()->id();
797  auto const& label = mcc.moduleDescription()->moduleLabel();
798  auto const& msg = label + " prefetching";
799  assert(stream_modules_[sid][mid] == nvtxInvalidRangeId);
800  stream_modules_[sid][mid] = nvtxDomainRangeStartColor(stream_domain_[sid], msg.c_str(), labelColorLight(label));
801  }
802 }
803 
805  auto sid = sc.streamID();
807  auto mid = mcc.moduleDescription()->id();
808  nvtxDomainRangeEnd(stream_domain_[sid], stream_modules_[sid][mid]);
809  stream_modules_[sid][mid] = nvtxInvalidRangeId;
810  }
811 }
812 
814  if (not skipFirstEvent_) {
815  auto mid = desc.id();
816  global_modules_.grow_to_at_least(mid + 1);
817  auto const& label = desc.moduleLabel();
818  auto const& msg = label + " construction";
819  global_modules_[mid] = nvtxDomainRangeStartColor(global_domain_, msg.c_str(), labelColor(label));
820  }
821 }
822 
824  if (not skipFirstEvent_) {
825  auto mid = desc.id();
826  nvtxDomainRangeEnd(global_domain_, global_modules_[mid]);
827  global_modules_[mid] = nvtxInvalidRangeId;
828  }
829 }
830 
832  if (not skipFirstEvent_) {
833  auto mid = desc.id();
834  global_modules_.grow_to_at_least(mid + 1);
835  auto const& label = desc.moduleLabel();
836  auto const& msg = label + " destruction";
837  global_modules_[mid] = nvtxDomainRangeStartColor(global_domain_, msg.c_str(), labelColor(label));
838  }
839 }
840 
842  if (not skipFirstEvent_) {
843  auto mid = desc.id();
844  nvtxDomainRangeEnd(global_domain_, global_modules_[mid]);
845  global_modules_[mid] = nvtxInvalidRangeId;
846  }
847 }
848 
850  if (not skipFirstEvent_) {
851  auto mid = desc.id();
852  auto const& label = desc.moduleLabel();
853  auto const& msg = label + " begin job";
854  global_modules_[mid] = nvtxDomainRangeStartColor(global_domain_, msg.c_str(), labelColor(label));
855  }
856 }
857 
859  if (not skipFirstEvent_) {
860  auto mid = desc.id();
861  nvtxDomainRangeEnd(global_domain_, global_modules_[mid]);
862  global_modules_[mid] = nvtxInvalidRangeId;
863  }
864 }
865 
868  auto mid = desc.id();
869  auto const& label = desc.moduleLabel();
870  auto const& msg = label + " end job";
871  global_modules_[mid] = nvtxDomainRangeStartColor(global_domain_, msg.c_str(), labelColor(label));
872  }
873 }
874 
877  auto mid = desc.id();
878  nvtxDomainRangeEnd(global_domain_, global_modules_[mid]);
879  global_modules_[mid] = nvtxInvalidRangeId;
880  }
881 }
882 
884  auto sid = sc.streamID();
886  auto mid = mcc.moduleDescription()->id();
887  auto const& label = mcc.moduleDescription()->moduleLabel();
888  auto const& msg = label + " acquire";
889  assert(stream_modules_[sid][mid] == nvtxInvalidRangeId);
890  stream_modules_[sid][mid] = nvtxDomainRangeStartColor(stream_domain_[sid], msg.c_str(), labelColor(label));
891  }
892 }
893 
895  auto sid = sc.streamID();
897  auto mid = mcc.moduleDescription()->id();
898  nvtxDomainRangeEnd(stream_domain_[sid], stream_modules_[sid][mid]);
899  stream_modules_[sid][mid] = nvtxInvalidRangeId;
900  }
901 }
902 
904  auto sid = sc.streamID();
906  auto mid = mcc.moduleDescription()->id();
907  auto const& label = mcc.moduleDescription()->moduleLabel();
908  assert(stream_modules_[sid][mid] == nvtxInvalidRangeId);
909  stream_modules_[sid][mid] = nvtxDomainRangeStartColor(stream_domain_[sid], label.c_str(), labelColor(label));
910  }
911 }
912 
914  auto sid = sc.streamID();
916  auto mid = mcc.moduleDescription()->id();
917  nvtxDomainRangeEnd(stream_domain_[sid], stream_modules_[sid][mid]);
918  stream_modules_[sid][mid] = nvtxInvalidRangeId;
919  }
920 }
921 
923  /* FIXME
924  auto sid = sc.streamID();
925  if (not skipFirstEvent_ or streamFirstEventDone_[sid]) {
926  auto mid = mcc.moduleDescription()->id();
927  auto const & label = mcc.moduleDescription()->moduleLabel();
928  auto const & msg = label + " delayed get";
929  assert(stream_modules_[sid][mid] == nvtxInvalidRangeId);
930  stream_modules_[sid][mid] = nvtxDomainRangeStartColor(stream_domain_[sid], label.c_str(), labelColorLight(label));
931  }
932  */
933 }
934 
936  /* FIXME
937  auto sid = sc.streamID();
938  if (not skipFirstEvent_ or streamFirstEventDone_[sid]) {
939  auto mid = mcc.moduleDescription()->id();
940  nvtxDomainRangeEnd(stream_domain_[sid], stream_modules_[sid][mid]);
941  stream_modules_[sid][mid] = nvtxInvalidRangeId;
942  }
943  */
944 }
945 
947  /* FIXME
948  auto sid = sc.streamID();
949  if (not skipFirstEvent_ or streamFirstEventDone_[sid]) {
950  auto mid = mcc.moduleDescription()->id();
951  auto const & label = mcc.moduleDescription()->moduleLabel();
952  auto const & msg = label + " read from source";
953  assert(stream_modules_[sid][mid] == nvtxInvalidRangeId);
954  stream_modules_[sid][mid] = nvtxDomainRangeStartColor(stream_domain_[sid], msg.c_str(), labelColorLight(label));
955  }
956  */
957 }
958 
960  /* FIXME
961  auto sid = sc.streamID();
962  if (not skipFirstEvent_ or streamFirstEventDone_[sid]) {
963  auto mid = mcc.moduleDescription()->id();
964  nvtxDomainRangeEnd(stream_domain_[sid], stream_modules_[sid][mid]);
965  stream_modules_[sid][mid] = nvtxInvalidRangeId;
966  }
967  */
968 }
969 
971  auto sid = sc.streamID();
973  auto mid = mcc.moduleDescription()->id();
974  auto const& label = mcc.moduleDescription()->moduleLabel();
975  auto const& msg = label + " stream begin run";
976  assert(stream_modules_[sid][mid] == nvtxInvalidRangeId);
977  stream_modules_[sid][mid] = nvtxDomainRangeStartColor(stream_domain_[sid], msg.c_str(), labelColor(label));
978  }
979 }
980 
982  auto sid = sc.streamID();
984  auto mid = mcc.moduleDescription()->id();
985  nvtxDomainRangeEnd(stream_domain_[sid], stream_modules_[sid][mid]);
986  stream_modules_[sid][mid] = nvtxInvalidRangeId;
987  }
988 }
989 
991  auto sid = sc.streamID();
993  auto mid = mcc.moduleDescription()->id();
994  auto const& label = mcc.moduleDescription()->moduleLabel();
995  auto const& msg = label + " stream end run";
996  assert(stream_modules_[sid][mid] == nvtxInvalidRangeId);
997  stream_modules_[sid][mid] = nvtxDomainRangeStartColor(stream_domain_[sid], msg.c_str(), labelColor(label));
998  }
999 }
1000 
1002  auto sid = sc.streamID();
1003  if (not skipFirstEvent_ or streamFirstEventDone_[sid]) {
1004  auto mid = mcc.moduleDescription()->id();
1005  nvtxDomainRangeEnd(stream_domain_[sid], stream_modules_[sid][mid]);
1006  stream_modules_[sid][mid] = nvtxInvalidRangeId;
1007  }
1008 }
1009 
1011  auto sid = sc.streamID();
1012  if (not skipFirstEvent_ or streamFirstEventDone_[sid]) {
1013  auto mid = mcc.moduleDescription()->id();
1014  auto const& label = mcc.moduleDescription()->moduleLabel();
1015  auto const& msg = label + " stream begin lumi";
1016  assert(stream_modules_[sid][mid] == nvtxInvalidRangeId);
1017  stream_modules_[sid][mid] = nvtxDomainRangeStartColor(stream_domain_[sid], msg.c_str(), labelColor(label));
1018  }
1019 }
1020 
1022  auto sid = sc.streamID();
1023  if (not skipFirstEvent_ or streamFirstEventDone_[sid]) {
1024  auto mid = mcc.moduleDescription()->id();
1025  nvtxDomainRangeEnd(stream_domain_[sid], stream_modules_[sid][mid]);
1026  stream_modules_[sid][mid] = nvtxInvalidRangeId;
1027  }
1028 }
1029 
1031  auto sid = sc.streamID();
1032  if (not skipFirstEvent_ or streamFirstEventDone_[sid]) {
1033  auto mid = mcc.moduleDescription()->id();
1034  auto const& label = mcc.moduleDescription()->moduleLabel();
1035  auto const& msg = label + " stream end lumi";
1036  assert(stream_modules_[sid][mid] == nvtxInvalidRangeId);
1037  stream_modules_[sid][mid] = nvtxDomainRangeStartColor(stream_domain_[sid], msg.c_str(), labelColor(label));
1038  }
1039 }
1040 
1042  auto sid = sc.streamID();
1043  if (not skipFirstEvent_ or streamFirstEventDone_[sid]) {
1044  auto mid = mcc.moduleDescription()->id();
1045  nvtxDomainRangeEnd(stream_domain_[sid], stream_modules_[sid][mid]);
1046  stream_modules_[sid][mid] = nvtxInvalidRangeId;
1047  }
1048 }
1049 
1052  auto mid = mcc.moduleDescription()->id();
1053  auto const& label = mcc.moduleDescription()->moduleLabel();
1054  auto const& msg = label + " global begin run";
1055  global_modules_[mid] = nvtxDomainRangeStartColor(global_domain_, msg.c_str(), labelColor(label));
1056  }
1057 }
1058 
1061  auto mid = mcc.moduleDescription()->id();
1062  nvtxDomainRangeEnd(global_domain_, global_modules_[mid]);
1063  global_modules_[mid] = nvtxInvalidRangeId;
1064  }
1065 }
1066 
1069  auto mid = mcc.moduleDescription()->id();
1070  auto const& label = mcc.moduleDescription()->moduleLabel();
1071  auto const& msg = label + " global end run";
1072  global_modules_[mid] = nvtxDomainRangeStartColor(global_domain_, msg.c_str(), labelColor(label));
1073  }
1074 }
1075 
1078  auto mid = mcc.moduleDescription()->id();
1079  nvtxDomainRangeEnd(global_domain_, global_modules_[mid]);
1080  global_modules_[mid] = nvtxInvalidRangeId;
1081  }
1082 }
1083 
1086  auto mid = mcc.moduleDescription()->id();
1087  auto const& label = mcc.moduleDescription()->moduleLabel();
1088  auto const& msg = label + " global begin lumi";
1089  global_modules_[mid] = nvtxDomainRangeStartColor(global_domain_, msg.c_str(), labelColor(label));
1090  }
1091 }
1092 
1095  auto mid = mcc.moduleDescription()->id();
1096  nvtxDomainRangeEnd(global_domain_, global_modules_[mid]);
1097  global_modules_[mid] = nvtxInvalidRangeId;
1098  }
1099 }
1100 
1103  auto mid = mcc.moduleDescription()->id();
1104  auto const& label = mcc.moduleDescription()->moduleLabel();
1105  auto const& msg = label + " global end lumi";
1106  global_modules_[mid] = nvtxDomainRangeStartColor(global_domain_, msg.c_str(), labelColor(label));
1107  }
1108 }
1109 
1112  auto mid = mcc.moduleDescription()->id();
1113  nvtxDomainRangeEnd(global_domain_, global_modules_[mid]);
1114  global_modules_[mid] = nvtxInvalidRangeId;
1115  }
1116 }
1117 
1119  if (not skipFirstEvent_) {
1120  auto mid = desc.id();
1121  global_modules_.grow_to_at_least(mid + 1);
1122  auto const& label = desc.moduleLabel();
1123  auto const& msg = label + " construction";
1124  global_modules_[mid] = nvtxDomainRangeStartColor(global_domain_, msg.c_str(), labelColor(label));
1125  }
1126 }
1127 
1129  if (not skipFirstEvent_) {
1130  auto mid = desc.id();
1131  nvtxDomainRangeEnd(global_domain_, global_modules_[mid]);
1132  global_modules_[mid] = nvtxInvalidRangeId;
1133  }
1134 }
1135 
NVProfilerService::postEvent
void postEvent(edm::StreamContext const &)
Definition: NVProfilerService.cc:761
ConfigurationDescriptions.h
NVProfilerService::postStreamEndRun
void postStreamEndRun(edm::StreamContext const &)
Definition: NVProfilerService.cc:697
NVProfilerService::postModuleEndJob
void postModuleEndJob(edm::ModuleDescription const &)
Definition: NVProfilerService.cc:875
NVProfilerService::postModuleStreamEndLumi
void postModuleStreamEndLumi(edm::StreamContext const &, edm::ModuleCallingContext const &)
Definition: NVProfilerService.cc:1041
NVProfilerService::postSourceLumi
void postSourceLumi(edm::LuminosityBlockIndex)
Definition: NVProfilerService.cc:570
edm::ActivityRegistry::watchPreModuleEndStream
void watchPreModuleEndStream(PreModuleEndStream::slot_type const &iSlot)
Definition: ActivityRegistry.h:260
edm::StreamID
Definition: StreamID.h:30
edm::ActivityRegistry::watchPreModuleBeginStream
void watchPreModuleBeginStream(PreModuleBeginStream::slot_type const &iSlot)
Definition: ActivityRegistry.h:246
edm::ModuleDescription::moduleLabel
std::string const & moduleLabel() const
Definition: ModuleDescription.h:43
NVProfilerService::preModuleGlobalBeginLumi
void preModuleGlobalBeginLumi(edm::GlobalContext const &, edm::ModuleCallingContext const &)
Definition: NVProfilerService.cc:1084
NVProfilerService::preStreamBeginLumi
void preStreamBeginLumi(edm::StreamContext const &)
Definition: NVProfilerService.cc:728
edm::ActivityRegistry::watchPostStreamEndLumi
void watchPostStreamEndLumi(PostStreamEndLumi::slot_type const &iSlot)
Definition: ActivityRegistry.h:450
edm::ActivityRegistry::watchPostModuleGlobalEndRun
void watchPostModuleGlobalEndRun(PostModuleGlobalEndRun::slot_type const &iSlot)
Definition: ActivityRegistry.h:956
ModuleCallingContext.h
NVProfilerService::preSourceRun
void preSourceRun(edm::RunIndex)
Definition: NVProfilerService.cc:576
edm::ActivityRegistry::watchPreModuleDestruction
void watchPreModuleDestruction(PreModuleDestruction::slot_type const &iSlot)
Definition: ActivityRegistry.h:715
electrons_cff.bool
bool
Definition: electrons_cff.py:366
NVProfilerService::postSourceRun
void postSourceRun(edm::RunIndex)
Definition: NVProfilerService.cc:582
NVProfilerService::preModuleStreamBeginRun
void preModuleStreamBeginRun(edm::StreamContext const &, edm::ModuleCallingContext const &)
Definition: NVProfilerService.cc:970
NVProfilerService::~NVProfilerService
~NVProfilerService()
Definition: NVProfilerService.cc:475
MessageLogger.h
NVProfilerService::postModuleStreamEndRun
void postModuleStreamEndRun(edm::StreamContext const &, edm::ModuleCallingContext const &)
Definition: NVProfilerService.cc:1001
NVProfilerService::preEventReadFromSource
void preEventReadFromSource(edm::StreamContext const &, edm::ModuleCallingContext const &)
Definition: NVProfilerService.cc:946
BranchType.h
edm::ActivityRegistry::watchPostSourceRun
void watchPostSourceRun(PostSourceRun::slot_type const &iSlot)
Definition: ActivityRegistry.h:214
edm::ActivityRegistry::watchPreSourceLumi
void watchPreSourceLumi(PreSourceLumi::slot_type const &iSlot)
Definition: ActivityRegistry.h:196
edm::ActivityRegistry::watchPostGlobalEndRun
void watchPostGlobalEndRun(PostGlobalEndRun::slot_type const &iSlot)
Definition: ActivityRegistry.h:334
edm::ActivityRegistry::watchPostEventReadFromSource
void watchPostEventReadFromSource(PostEventReadFromSource::slot_type const &iSlot)
Definition: ActivityRegistry.h:829
edm::ActivityRegistry::watchPostModuleStreamBeginLumi
void watchPostModuleStreamBeginLumi(PostModuleStreamBeginLumi::slot_type const &iSlot)
Definition: ActivityRegistry.h:871
NVProfilerService::postBeginJob
void postBeginJob()
Definition: NVProfilerService.cc:540
modules
Definition: MuonCleanerBySegments.cc:35
NVProfilerService::postModuleDestruction
void postModuleDestruction(edm::ModuleDescription const &)
Definition: NVProfilerService.cc:841
edm::ProcessContext
Definition: ProcessContext.h:27
edm::ActivityRegistry::watchPreModuleEndJob
void watchPreModuleEndJob(PreModuleEndJob::slot_type const &iSlot)
Definition: ActivityRegistry.h:747
edm::ActivityRegistry::watchPostGlobalEndLumi
void watchPostGlobalEndLumi(PostGlobalEndLumi::slot_type const &iSlot)
Definition: ActivityRegistry.h:410
edm::ParameterSetDescription
Definition: ParameterSetDescription.h:52
DEFINE_FWK_SERVICE
#define DEFINE_FWK_SERVICE(type)
Definition: ServiceMaker.h:96
NVProfilerService::labelColor
uint32_t labelColor(std::string const &label) const
Definition: NVProfilerService.cc:285
NVProfilerService::preModuleGlobalBeginRun
void preModuleGlobalBeginRun(edm::GlobalContext const &, edm::ModuleCallingContext const &)
Definition: NVProfilerService.cc:1050
edm::ActivityRegistry::watchPostOpenFile
void watchPostOpenFile(PostOpenFile::slot_type const &iSlot)
Definition: ActivityRegistry.h:227
NVProfilerService::preGlobalEndRun
void preGlobalEndRun(edm::GlobalContext const &)
Definition: NVProfilerService.cc:664
cms::cuda::assert
assert(be >=bs)
NVProfilerService::preModuleEventPrefetching
void preModuleEventPrefetching(edm::StreamContext const &, edm::ModuleCallingContext const &)
Definition: NVProfilerService.cc:793
edm::ActivityRegistry::watchPostModuleGlobalBeginRun
void watchPostModuleGlobalBeginRun(PostModuleGlobalBeginRun::slot_type const &iSlot)
Definition: ActivityRegistry.h:942
NVProfilerService::postEndJob
void postEndJob()
Definition: NVProfilerService.cc:546
NVProfilerService::preStreamEndRun
void preStreamEndRun(edm::StreamContext const &)
Definition: NVProfilerService.cc:690
__attribute__
float __attribute__((vector_size(8))) cms_float32x2_t
Definition: ExtVec.h:12
mps_check.msg
tuple msg
Definition: mps_check.py:285
NVProfilerService::fillDescriptions
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
Definition: NVProfilerService.cc:483
NVProfilerService::postModuleGlobalEndRun
void postModuleGlobalEndRun(edm::GlobalContext const &, edm::ModuleCallingContext const &)
Definition: NVProfilerService.cc:1076
NVProfilerService::postModuleGlobalEndLumi
void postModuleGlobalEndLumi(edm::GlobalContext const &, edm::ModuleCallingContext const &)
Definition: NVProfilerService.cc:1110
edm::ActivityRegistry::watchPostModuleDestruction
void watchPostModuleDestruction(PostModuleDestruction::slot_type const &iSlot)
Definition: ActivityRegistry.h:724
DDAxes::x
edm::ActivityRegistry::watchPostModuleStreamEndRun
void watchPostModuleStreamEndRun(PostModuleStreamEndRun::slot_type const &iSlot)
Definition: ActivityRegistry.h:857
NVProfilerService::preBeginJob
void preBeginJob(edm::PathsAndConsumesOfModulesBase const &, edm::ProcessContext const &)
Definition: NVProfilerService.cc:527
edm::ModuleCallingContext::moduleDescription
ModuleDescription const * moduleDescription() const
Definition: ModuleCallingContext.h:50
edm::ActivityRegistry::watchPreModuleStreamBeginRun
void watchPreModuleStreamBeginRun(PreModuleStreamBeginRun::slot_type const &iSlot)
Definition: ActivityRegistry.h:836
edm::ActivityRegistry::watchPreStreamBeginRun
void watchPreStreamBeginRun(PreStreamBeginRun::slot_type const &iSlot)
Definition: ActivityRegistry.h:367
createJobs.tmp
tmp
align.sh
Definition: createJobs.py:716
NVProfilerService::highlight
bool highlight(std::string const &label) const
Definition: NVProfilerService.cc:281
edm::service::SystemBounds::maxNumberOfConcurrentLuminosityBlocks
unsigned int maxNumberOfConcurrentLuminosityBlocks() const
Definition: SystemBounds.h:37
LuminosityBlockID.h
HLTPathStatus.h
NVProfilerService::postModuleEventAcquire
void postModuleEventAcquire(edm::StreamContext const &, edm::ModuleCallingContext const &)
Definition: NVProfilerService.cc:894
NVProfilerService::preGlobalEndLumi
void preGlobalEndLumi(edm::GlobalContext const &)
Definition: NVProfilerService.cc:716
edm::ModuleDescription
Definition: ModuleDescription.h:21
NVProfilerService::preModuleBeginJob
void preModuleBeginJob(edm::ModuleDescription const &)
Definition: NVProfilerService.cc:849
NVProfilerService::postStreamEndLumi
void postStreamEndLumi(edm::StreamContext const &)
Definition: NVProfilerService.cc:747
edm::ActivityRegistry::watchPostModuleBeginStream
void watchPostModuleBeginStream(PostModuleBeginStream::slot_type const &iSlot)
Definition: ActivityRegistry.h:253
edm::ActivityRegistry::watchPostSourceEvent
void watchPostSourceEvent(PostSourceEvent::slot_type const &iSlot)
Definition: ActivityRegistry.h:190
ModuleDescription.h
ActivityRegistry.h
edm::ActivityRegistry::watchPreCloseFile
void watchPreCloseFile(PreCloseFile::slot_type const &iSlot)
Definition: ActivityRegistry.h:235
edm::ActivityRegistry::watchPostModuleEndJob
void watchPostModuleEndJob(PostModuleEndJob::slot_type const &iSlot)
Definition: ActivityRegistry.h:753
edm::ActivityRegistry::watchPostCloseFile
void watchPostCloseFile(PostCloseFile::slot_type const &iSlot)
Definition: ActivityRegistry.h:241
NVProfilerService::postOpenFile
void postOpenFile(std::string const &, bool)
Definition: NVProfilerService.cc:594
config
Definition: config.py:1
edm::ActivityRegistry::watchPreModuleGlobalBeginLumi
void watchPreModuleGlobalBeginLumi(PreModuleGlobalBeginLumi::slot_type const &iSlot)
Definition: ActivityRegistry.h:963
NVProfilerService::postModuleEvent
void postModuleEvent(edm::StreamContext const &, edm::ModuleCallingContext const &)
Definition: NVProfilerService.cc:913
NVProfilerService::preModuleEvent
void preModuleEvent(edm::StreamContext const &, edm::ModuleCallingContext const &)
Definition: NVProfilerService.cc:903
alignCSCRings.s
s
Definition: alignCSCRings.py:92
NVProfilerService::preModuleGlobalEndRun
void preModuleGlobalEndRun(edm::GlobalContext const &, edm::ModuleCallingContext const &)
Definition: NVProfilerService.cc:1067
edm::ActivityRegistry::watchPreModuleStreamEndLumi
void watchPreModuleStreamEndLumi(PreModuleStreamEndLumi::slot_type const &iSlot)
Definition: ActivityRegistry.h:878
NVProfilerService::preModuleBeginStream
void preModuleBeginStream(edm::StreamContext const &, edm::ModuleCallingContext const &)
Definition: NVProfilerService.cc:612
edm::ActivityRegistry::watchPostEndJob
void watchPostEndJob(PostEndJob::slot_type const &iSlot)
Definition: ActivityRegistry.h:170
edm::ActivityRegistry::watchPreStreamBeginLumi
void watchPreStreamBeginLumi(PreStreamBeginLumi::slot_type const &iSlot)
Definition: ActivityRegistry.h:431
edm::LuminosityBlockIndex
Definition: LuminosityBlockIndex.h:33
edm::ActivityRegistry::watchPreModuleEventPrefetching
void watchPreModuleEventPrefetching(PreModuleEventPrefetching::slot_type const &iSlot)
Definition: ActivityRegistry.h:761
edm::ConfigurationDescriptions::add
void add(std::string const &label, ParameterSetDescription const &psetDescription)
Definition: ConfigurationDescriptions.cc:57
edm::StreamContext
Definition: StreamContext.h:31
NVProfilerService::preSourceEvent
void preSourceEvent(edm::StreamID)
Definition: NVProfilerService.cc:552
NVProfilerService::postSourceConstruction
void postSourceConstruction(edm::ModuleDescription const &)
Definition: NVProfilerService.cc:1128
NVProfilerService::postPathEvent
void postPathEvent(edm::StreamContext const &, edm::PathContext const &, edm::HLTPathStatus const &)
Definition: NVProfilerService.cc:784
NVProfilerService::global_domain_
nvtxDomainHandle_t global_domain_
Definition: NVProfilerService.cc:302
edm::ActivityRegistry::watchPreBeginJob
void watchPreBeginJob(PreBeginJob::slot_type const &iSlot)
convenience function for attaching to signal
Definition: ActivityRegistry.h:151
edm::ActivityRegistry::watchPostModuleEndStream
void watchPostModuleEndStream(PostModuleEndStream::slot_type const &iSlot)
Definition: ActivityRegistry.h:267
NVProfilerService::preModuleEventAcquire
void preModuleEventAcquire(edm::StreamContext const &, edm::ModuleCallingContext const &)
Definition: NVProfilerService.cc:883
edm::service::SystemBounds::maxNumberOfConcurrentRuns
unsigned int maxNumberOfConcurrentRuns() const
Definition: SystemBounds.h:36
NVProfilerService::preStreamEndLumi
void preStreamEndLumi(edm::StreamContext const &)
Definition: NVProfilerService.cc:742
Service.h
NVProfilerService::preModuleConstruction
void preModuleConstruction(edm::ModuleDescription const &)
Definition: NVProfilerService.cc:813
edm::ActivityRegistry::watchPostModuleEventDelayedGet
void watchPostModuleEventDelayedGet(PostModuleEventDelayedGet::slot_type const &iSlot)
Definition: ActivityRegistry.h:813
EventID.h
fillDescriptions
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
edm::ActivityRegistry::watchPreEvent
void watchPreEvent(PreEvent::slot_type const &iSlot)
Definition: ActivityRegistry.h:458
edm::ActivityRegistry::watchPostStreamBeginRun
void watchPostStreamBeginRun(PostStreamBeginRun::slot_type const &iSlot)
Definition: ActivityRegistry.h:372
edm::ActivityRegistry
Definition: ActivityRegistry.h:134
NVProfilerService::postGlobalBeginLumi
void postGlobalBeginLumi(edm::GlobalContext const &)
Definition: NVProfilerService.cc:710
NVProfilerService::postModuleStreamBeginRun
void postModuleStreamBeginRun(edm::StreamContext const &, edm::ModuleCallingContext const &)
Definition: NVProfilerService.cc:981
NVProfilerService::preGlobalBeginLumi
void preGlobalBeginLumi(edm::GlobalContext const &)
Definition: NVProfilerService.cc:704
edm::ActivityRegistry::watchPostBeginJob
void watchPostBeginJob(PostBeginJob::slot_type const &iSlot)
convenience function for attaching to signal
Definition: ActivityRegistry.h:158
NVProfilerService::event_
std::vector< nvtxRangeId_t > event_
Definition: NVProfilerService.cc:297
edm::ActivityRegistry::watchPreModuleStreamBeginLumi
void watchPreModuleStreamBeginLumi(PreModuleStreamBeginLumi::slot_type const &iSlot)
Definition: ActivityRegistry.h:864
NVProfilerService::postEventReadFromSource
void postEventReadFromSource(edm::StreamContext const &, edm::ModuleCallingContext const &)
Definition: NVProfilerService.cc:959
edm::ActivityRegistry::watchPostModuleBeginJob
void watchPostModuleBeginJob(PostModuleBeginJob::slot_type const &iSlot)
Definition: ActivityRegistry.h:739
ParameterSetDescription.h
edm::ActivityRegistry::watchPostModuleConstruction
void watchPostModuleConstruction(PostModuleConstruction::slot_type const &iSlot)
Definition: ActivityRegistry.h:706
edm::ActivityRegistry::watchPreGlobalEndRun
void watchPreGlobalEndRun(PreGlobalEndRun::slot_type const &iSlot)
Definition: ActivityRegistry.h:329
edm::ActivityRegistry::watchPreEventReadFromSource
void watchPreEventReadFromSource(PreEventReadFromSource::slot_type const &iSlot)
Definition: ActivityRegistry.h:821
NVProfilerService::postModuleGlobalBeginRun
void postModuleGlobalBeginRun(edm::GlobalContext const &, edm::ModuleCallingContext const &)
Definition: NVProfilerService.cc:1059
edm::ActivityRegistry::watchPreSourceConstruction
void watchPreSourceConstruction(PreSourceConstruction::slot_type const &iSlot)
Definition: ActivityRegistry.h:1112
edm::ActivityRegistry::watchPreSourceRun
void watchPreSourceRun(PreSourceRun::slot_type const &iSlot)
Definition: ActivityRegistry.h:208
ServiceMaker.h
NVProfilerService::postModuleConstruction
void postModuleConstruction(edm::ModuleDescription const &)
Definition: NVProfilerService.cc:823
edm::ConfigurationDescriptions
Definition: ConfigurationDescriptions.h:28
NVProfilerService::preCloseFile
void preCloseFile(std::string const &, bool)
Definition: NVProfilerService.cc:600
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
edm::ActivityRegistry::watchPostSourceLumi
void watchPostSourceLumi(PostSourceLumi::slot_type const &iSlot)
Definition: ActivityRegistry.h:202
NVProfilerService::stream_modules_
std::vector< std::vector< nvtxRangeId_t > > stream_modules_
Definition: NVProfilerService.cc:298
NVProfilerService
Definition: NVProfilerService.cc:124
NVProfilerService::postGlobalEndLumi
void postGlobalEndLumi(edm::GlobalContext const &)
Definition: NVProfilerService.cc:722
edm::ActivityRegistry::watchPreModuleGlobalEndLumi
void watchPreModuleGlobalEndLumi(PreModuleGlobalEndLumi::slot_type const &iSlot)
Definition: ActivityRegistry.h:977
edm::ActivityRegistry::watchPreModuleStreamEndRun
void watchPreModuleStreamEndRun(PreModuleStreamEndRun::slot_type const &iSlot)
Definition: ActivityRegistry.h:850
edm::GlobalContext
Definition: GlobalContext.h:29
edm::service::SystemBounds
Definition: SystemBounds.h:29
NVProfilerService::preModuleEndJob
void preModuleEndJob(edm::ModuleDescription const &)
Definition: NVProfilerService.cc:866
edm::ActivityRegistry::watchPostEvent
void watchPostEvent(PostEvent::slot_type const &iSlot)
Definition: ActivityRegistry.h:464
NVProfilerService::preStreamBeginRun
void preStreamBeginRun(edm::StreamContext const &)
Definition: NVProfilerService.cc:676
edm::ParameterSet
Definition: ParameterSet.h:47
edm::service::SystemBounds::maxNumberOfThreads
unsigned int maxNumberOfThreads() const
Definition: SystemBounds.h:38
GlobalContext.h
NVProfilerService::preallocate
void preallocate(edm::service::SystemBounds const &)
Definition: NVProfilerService.cc:502
edm::ActivityRegistry::watchPostModuleGlobalEndLumi
void watchPostModuleGlobalEndLumi(PostModuleGlobalEndLumi::slot_type const &iSlot)
Definition: ActivityRegistry.h:984
Timestamp.h
NVProfilerService::preModuleStreamEndRun
void preModuleStreamEndRun(edm::StreamContext const &, edm::ModuleCallingContext const &)
Definition: NVProfilerService.cc:990
edm::StreamContext::streamID
StreamID const & streamID() const
Definition: StreamContext.h:54
edm::PathContext
Definition: PathContext.h:24
NVProfilerService::preModuleStreamEndLumi
void preModuleStreamEndLumi(edm::StreamContext const &, edm::ModuleCallingContext const &)
Definition: NVProfilerService.cc:1030
edm::ActivityRegistry::watchPreStreamEndLumi
void watchPreStreamEndLumi(PreStreamEndLumi::slot_type const &iSlot)
Definition: ActivityRegistry.h:445
jetUpdater_cfi.sort
sort
Definition: jetUpdater_cfi.py:29
edm::ConfigurationDescriptions::setComment
void setComment(std::string const &value)
Definition: ConfigurationDescriptions.cc:48
NVProfilerService::postGlobalBeginRun
void postGlobalBeginRun(edm::GlobalContext const &)
Definition: NVProfilerService.cc:658
NVProfilerService::preModuleEventDelayedGet
void preModuleEventDelayedGet(edm::StreamContext const &, edm::ModuleCallingContext const &)
Definition: NVProfilerService.cc:922
edm::HLTPathStatus
Definition: HLTPathStatus.h:33
NVProfilerService::globalFirstEventDone_
std::atomic< bool > globalFirstEventDone_
Definition: NVProfilerService.cc:295
NVProfilerService::postModuleEventPrefetching
void postModuleEventPrefetching(edm::StreamContext const &, edm::ModuleCallingContext const &)
Definition: NVProfilerService.cc:804
edm::Service
Definition: Service.h:30
edm::ActivityRegistry::watchPreModuleConstruction
void watchPreModuleConstruction(PreModuleConstruction::slot_type const &iSlot)
Definition: ActivityRegistry.h:697
edm::ActivityRegistry::watchPostGlobalBeginLumi
void watchPostGlobalBeginLumi(PostGlobalBeginLumi::slot_type const &iSlot)
Definition: ActivityRegistry.h:398
NVProfilerService::skipFirstEvent_
const bool skipFirstEvent_
Definition: NVProfilerService.cc:293
NVProfilerService::postSourceEvent
void postSourceEvent(edm::StreamID)
Definition: NVProfilerService.cc:558
NVProfilerService::streamFirstEventDone_
std::vector< std::atomic< bool > > streamFirstEventDone_
Definition: NVProfilerService.cc:296
edm::service::SystemBounds::maxNumberOfStreams
unsigned int maxNumberOfStreams() const
Definition: SystemBounds.h:35
trackerHitRTTI::vector
Definition: trackerHitRTTI.h:21
NVProfilerService::prePathEvent
void prePathEvent(edm::StreamContext const &, edm::PathContext const &)
Definition: NVProfilerService.cc:777
NVProfilerService::postModuleEndStream
void postModuleEndStream(edm::StreamContext const &, edm::ModuleCallingContext const &)
Definition: NVProfilerService.cc:643
edm::ActivityRegistry::watchPostPathEvent
void watchPostPathEvent(PostPathEvent::slot_type const &iSlot)
Definition: ActivityRegistry.h:476
edm::ActivityRegistry::watchPreModuleGlobalEndRun
void watchPreModuleGlobalEndRun(PreModuleGlobalEndRun::slot_type const &iSlot)
Definition: ActivityRegistry.h:949
NVProfilerService::preSourceLumi
void preSourceLumi(edm::LuminosityBlockIndex)
Definition: NVProfilerService.cc:564
edm::ActivityRegistry::watchPostModuleStreamEndLumi
void watchPostModuleStreamEndLumi(PostModuleStreamEndLumi::slot_type const &iSlot)
Definition: ActivityRegistry.h:885
PathContext.h
edm::PathContext::pathName
std::string const & pathName() const
Definition: PathContext.h:30
NVProfilerService::showModulePrefetching_
const bool showModulePrefetching_
Definition: NVProfilerService.cc:292
NVProfilerService::preEvent
void preEvent(edm::StreamContext const &)
Definition: NVProfilerService.cc:754
NVProfilerService::preModuleGlobalEndLumi
void preModuleGlobalEndLumi(edm::GlobalContext const &, edm::ModuleCallingContext const &)
Definition: NVProfilerService.cc:1101
identity
T identity(T t)
Definition: trackSplitPlot.h:71
NVProfilerService::preSourceConstruction
void preSourceConstruction(edm::ModuleDescription const &)
Definition: NVProfilerService.cc:1118
NVProfilerService::highlightModules_
std::vector< std::string > highlightModules_
Definition: NVProfilerService.cc:291
edm::ActivityRegistry::watchPostModuleEventPrefetching
void watchPostModuleEventPrefetching(PostModuleEventPrefetching::slot_type const &iSlot)
Definition: ActivityRegistry.h:769
edm::ActivityRegistry::watchPreGlobalEndLumi
void watchPreGlobalEndLumi(PreGlobalEndLumi::slot_type const &iSlot)
Definition: ActivityRegistry.h:405
edm::ActivityRegistry::watchPreallocate
void watchPreallocate(Preallocate::slot_type const &iSlot)
Definition: ActivityRegistry.h:144
NVProfilerService::postStreamBeginRun
void postStreamBeginRun(edm::StreamContext const &)
Definition: NVProfilerService.cc:683
CUDAService.h
edm::ActivityRegistry::watchPostStreamBeginLumi
void watchPostStreamBeginLumi(PostStreamBeginLumi::slot_type const &iSlot)
Definition: ActivityRegistry.h:438
submitPVResolutionJobs.desc
string desc
Definition: submitPVResolutionJobs.py:251
eostools.move
def move(src, dest)
Definition: eostools.py:511
std
Definition: JetResolutionObject.h:76
edm::ActivityRegistry::watchPreGlobalBeginLumi
void watchPreGlobalBeginLumi(PreGlobalBeginLumi::slot_type const &iSlot)
Definition: ActivityRegistry.h:391
edm::ActivityRegistry::watchPreModuleBeginJob
void watchPreModuleBeginJob(PreModuleBeginJob::slot_type const &iSlot)
Definition: ActivityRegistry.h:733
edm::ActivityRegistry::watchPreOpenFile
void watchPreOpenFile(PreOpenFile::slot_type const &iSlot)
Definition: ActivityRegistry.h:220
edm::ActivityRegistry::watchPostModuleEvent
void watchPostModuleEvent(PostModuleEvent::slot_type const &iSlot)
Definition: ActivityRegistry.h:783
edm::ActivityRegistry::watchPreStreamEndRun
void watchPreStreamEndRun(PreStreamEndRun::slot_type const &iSlot)
Definition: ActivityRegistry.h:379
edm::ActivityRegistry::watchPreModuleGlobalBeginRun
void watchPreModuleGlobalBeginRun(PreModuleGlobalBeginRun::slot_type const &iSlot)
Definition: ActivityRegistry.h:935
edm::ActivityRegistry::watchPostGlobalBeginRun
void watchPostGlobalBeginRun(PostGlobalBeginRun::slot_type const &iSlot)
Definition: ActivityRegistry.h:322
HLTScalers_cfi.hlts
hlts
Definition: HLTScalers_cfi.py:5
NVProfilerService::stream_domain_
std::vector< nvtxDomainHandle_t > stream_domain_
Definition: NVProfilerService.cc:303
NVProfilerService::preGlobalBeginRun
void preGlobalBeginRun(edm::GlobalContext const &)
Definition: NVProfilerService.cc:652
NVProfilerService::postModuleGlobalBeginLumi
void postModuleGlobalBeginLumi(edm::GlobalContext const &, edm::ModuleCallingContext const &)
Definition: NVProfilerService.cc:1093
edm::PathsAndConsumesOfModulesBase
Definition: PathsAndConsumesOfModulesBase.h:35
NVProfilerService::postStreamBeginLumi
void postStreamBeginLumi(edm::StreamContext const &)
Definition: NVProfilerService.cc:735
NVProfilerService::postGlobalEndRun
void postGlobalEndRun(edm::GlobalContext const &)
Definition: NVProfilerService.cc:670
edm::ActivityRegistry::watchPostModuleEventAcquire
void watchPostModuleEventAcquire(PostModuleEventAcquire::slot_type const &iSlot)
Definition: ActivityRegistry.h:797
edm::ActivityRegistry::watchPreSourceEvent
void watchPreSourceEvent(PreSourceEvent::slot_type const &iSlot)
Definition: ActivityRegistry.h:184
NVProfilerService::postModuleStreamBeginLumi
void postModuleStreamBeginLumi(edm::StreamContext const &, edm::ModuleCallingContext const &)
Definition: NVProfilerService.cc:1021
NVProfilerService::postModuleEventDelayedGet
void postModuleEventDelayedGet(edm::StreamContext const &, edm::ModuleCallingContext const &)
Definition: NVProfilerService.cc:935
NVProfilerService::preModuleDestruction
void preModuleDestruction(edm::ModuleDescription const &)
Definition: NVProfilerService.cc:831
NVProfilerService::NVProfilerService
NVProfilerService(const edm::ParameterSet &, edm::ActivityRegistry &)
Definition: NVProfilerService.cc:306
or
The Signals That Services Can Subscribe To This is based on ActivityRegistry and is current per Services can connect to the signals distributed by the ActivityRegistry in order to monitor the activity of the application Each possible callback has some defined which we here list in angle e< void, edm::EventID const &, edm::Timestamp const & > We also list in braces which AR_WATCH_USING_METHOD_ is used for those or
Definition: Activities.doc:12
edm::RunIndex
Definition: RunIndex.h:32
NVProfilerService::postModuleBeginJob
void postModuleBeginJob(edm::ModuleDescription const &)
Definition: NVProfilerService.cc:858
Exception.h
NVProfilerService::global_modules_
tbb::concurrent_vector< nvtxRangeId_t > global_modules_
Definition: NVProfilerService.cc:300
edm::ActivityRegistry::watchPostModuleGlobalBeginLumi
void watchPostModuleGlobalBeginLumi(PostModuleGlobalBeginLumi::slot_type const &iSlot)
Definition: ActivityRegistry.h:970
AlignmentPI::index
index
Definition: AlignmentPayloadInspectorHelper.h:46
NVProfilerService::preModuleEndStream
void preModuleEndStream(edm::StreamContext const &, edm::ModuleCallingContext const &)
Definition: NVProfilerService.cc:632
MillePedeFileConverter_cfg.out
out
Definition: MillePedeFileConverter_cfg.py:31
NVProfilerService::postModuleBeginStream
void postModuleBeginStream(edm::StreamContext const &, edm::ModuleCallingContext const &)
Definition: NVProfilerService.cc:623
edm::ActivityRegistry::watchPreGlobalBeginRun
void watchPreGlobalBeginRun(PreGlobalBeginRun::slot_type const &iSlot)
Definition: ActivityRegistry.h:317
ParameterSet.h
edm::ActivityRegistry::watchPrePathEvent
void watchPrePathEvent(PrePathEvent::slot_type const &iSlot)
Definition: ActivityRegistry.h:470
StreamContext.h
NVProfilerService::preOpenFile
void preOpenFile(std::string const &, bool)
Definition: NVProfilerService.cc:588
TimeOfDay.h
ProcessContext.h
edm::ActivityRegistry::watchPreModuleEventAcquire
void watchPreModuleEventAcquire(PreModuleEventAcquire::slot_type const &iSlot)
Definition: ActivityRegistry.h:789
PathsAndConsumesOfModulesBase.h
ConsumesInfo.h
edm::PathsAndConsumesOfModulesBase::allModules
std::vector< ModuleDescription const * > const & allModules() const
Definition: PathsAndConsumesOfModulesBase.h:42
ProductKindOfType.h
SystemBounds.h
NVProfilerService::preModuleStreamBeginLumi
void preModuleStreamBeginLumi(edm::StreamContext const &, edm::ModuleCallingContext const &)
Definition: NVProfilerService.cc:1010
edm::ActivityRegistry::watchPreModuleEventDelayedGet
void watchPreModuleEventDelayedGet(PreModuleEventDelayedGet::slot_type const &iSlot)
Definition: ActivityRegistry.h:805
RunID.h
edm::ActivityRegistry::watchPostSourceConstruction
void watchPostSourceConstruction(PostSourceConstruction::slot_type const &iSlot)
Definition: ActivityRegistry.h:1121
label
const char * label
Definition: PFTauDecayModeTools.cc:11
edm::ActivityRegistry::watchPostModuleStreamBeginRun
void watchPostModuleStreamBeginRun(PostModuleStreamBeginRun::slot_type const &iSlot)
Definition: ActivityRegistry.h:843
edm::ActivityRegistry::watchPostStreamEndRun
void watchPostStreamEndRun(PostStreamEndRun::slot_type const &iSlot)
Definition: ActivityRegistry.h:384
edm::ActivityRegistry::watchPreModuleEvent
void watchPreModuleEvent(PreModuleEvent::slot_type const &iSlot)
Definition: ActivityRegistry.h:777
NVProfilerService::labelColorLight
uint32_t labelColorLight(std::string const &label) const
Definition: NVProfilerService.cc:287
NVProfilerService::postCloseFile
void postCloseFile(std::string const &, bool)
Definition: NVProfilerService.cc:606
edm::ModuleDescription::id
unsigned int id() const
Definition: ModuleDescription.h:46
edm::ModuleCallingContext
Definition: ModuleCallingContext.h:29