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 preModuleBeginJob(edm::ModuleDescription const&);
214  void postModuleBeginJob(edm::ModuleDescription const&);
215 
216  // these signal pair are guaranteed to be called by the same thread
217  void preModuleEndJob(edm::ModuleDescription const&);
218  void postModuleEndJob(edm::ModuleDescription const&);
219 
220  // these signal pair are guaranteed to be called by the same thread
221  void preModuleBeginStream(edm::StreamContext const&, edm::ModuleCallingContext const&);
222  void postModuleBeginStream(edm::StreamContext const&, edm::ModuleCallingContext const&);
223 
224  // these signal pair are guaranteed to be called by the same thread
225  void preModuleEndStream(edm::StreamContext const&, edm::ModuleCallingContext const&);
226  void postModuleEndStream(edm::StreamContext const&, edm::ModuleCallingContext const&);
227 
228  // these signal pair are guaranteed to be called by the same thread
229  void preModuleGlobalBeginRun(edm::GlobalContext const&, edm::ModuleCallingContext const&);
230  void postModuleGlobalBeginRun(edm::GlobalContext const&, edm::ModuleCallingContext const&);
231 
232  // these signal pair are guaranteed to be called by the same thread
233  void preModuleGlobalEndRun(edm::GlobalContext const&, edm::ModuleCallingContext const&);
234  void postModuleGlobalEndRun(edm::GlobalContext const&, edm::ModuleCallingContext const&);
235 
236  // these signal pair are guaranteed to be called by the same thread
237  void preModuleGlobalBeginLumi(edm::GlobalContext const&, edm::ModuleCallingContext const&);
238  void postModuleGlobalBeginLumi(edm::GlobalContext const&, edm::ModuleCallingContext const&);
239 
240  // these signal pair are guaranteed to be called by the same thread
241  void preModuleGlobalEndLumi(edm::GlobalContext const&, edm::ModuleCallingContext const&);
242  void postModuleGlobalEndLumi(edm::GlobalContext const&, edm::ModuleCallingContext const&);
243 
244  // these signal pair are guaranteed to be called by the same thread
245  void preModuleStreamBeginRun(edm::StreamContext const&, edm::ModuleCallingContext const&);
246  void postModuleStreamBeginRun(edm::StreamContext const&, edm::ModuleCallingContext const&);
247 
248  // these signal pair are guaranteed to be called by the same thread
249  void preModuleStreamEndRun(edm::StreamContext const&, edm::ModuleCallingContext const&);
250  void postModuleStreamEndRun(edm::StreamContext const&, edm::ModuleCallingContext const&);
251 
252  // these signal pair are guaranteed to be called by the same thread
253  void preModuleStreamBeginLumi(edm::StreamContext const&, edm::ModuleCallingContext const&);
254  void postModuleStreamBeginLumi(edm::StreamContext const&, edm::ModuleCallingContext const&);
255 
256  // these signal pair are guaranteed to be called by the same thread
257  void preModuleStreamEndLumi(edm::StreamContext const&, edm::ModuleCallingContext const&);
258  void postModuleStreamEndLumi(edm::StreamContext const&, edm::ModuleCallingContext const&);
259 
260  // these signal pair are guaranteed to be called by the same thread
261  void preModuleEventAcquire(edm::StreamContext const&, edm::ModuleCallingContext const&);
262  void postModuleEventAcquire(edm::StreamContext const&, edm::ModuleCallingContext const&);
263 
264  // these signal pair are guaranteed to be called by the same thread
265  void preModuleEvent(edm::StreamContext const&, edm::ModuleCallingContext const&);
266  void postModuleEvent(edm::StreamContext const&, edm::ModuleCallingContext const&);
267 
268  // these signal pair are guaranteed to be called by the same thread
269  void preModuleEventDelayedGet(edm::StreamContext const&, edm::ModuleCallingContext const&);
270  void postModuleEventDelayedGet(edm::StreamContext const&, edm::ModuleCallingContext const&);
271 
272  // these signal pair are guaranteed to be called by the same thread
273  void preEventReadFromSource(edm::StreamContext const&, edm::ModuleCallingContext const&);
274  void postEventReadFromSource(edm::StreamContext const&, edm::ModuleCallingContext const&);
275 
276 private:
277  bool highlight(std::string const& label) const {
278  return (std::binary_search(highlightModules_.begin(), highlightModules_.end(), label));
279  }
280 
281  uint32_t labelColor(std::string const& label) const { return highlight(label) ? nvtxAmber : nvtxGreen; }
282 
283  uint32_t labelColorLight(std::string const& label) const {
284  return highlight(label) ? nvtxLightAmber : nvtxLightGreen;
285  }
286 
287  std::vector<std::string> highlightModules_;
289  const bool skipFirstEvent_;
290 
291  std::atomic<bool> globalFirstEventDone_ = false;
292  std::vector<std::atomic<bool>> streamFirstEventDone_;
293  std::vector<nvtxRangeId_t> event_; // per-stream event ranges
294  std::vector<std::vector<nvtxRangeId_t>> stream_modules_; // per-stream, per-module ranges
295  // use a tbb::concurrent_vector rather than an std::vector because its final size is not known
296  tbb::concurrent_vector<nvtxRangeId_t> global_modules_; // global per-module events
297 
298  nvtxDomainHandle_t global_domain_; // NVTX domain for global EDM transitions
299  std::vector<nvtxDomainHandle_t> stream_domain_; // NVTX domains for per-EDM-stream transitions
300 };
301 
303  : highlightModules_(config.getUntrackedParameter<std::vector<std::string>>("highlightModules")),
304  showModulePrefetching_(config.getUntrackedParameter<bool>("showModulePrefetching")),
305  skipFirstEvent_(config.getUntrackedParameter<bool>("skipFirstEvent")) {
306  // make sure that CUDA is initialised, and that the CUDAService destructor is called after this service's destructor
307  edm::Service<CUDAService> cudaService;
308 
309  std::sort(highlightModules_.begin(), highlightModules_.end());
310 
311  // create the NVTX domain for global EDM transitions
312  global_domain_ = nvtxDomainCreate("EDM Global");
313 
314  // enables profile collection; if profiling is already enabled it has no effect
315  if (not skipFirstEvent_) {
316  cudaProfilerStart();
317  }
318 
320 
321  // these signal pair are NOT guaranteed to be called by the same thread
324 
325  // there is no preEndJob() signal
327 
328  // these signal pair are NOT guaranteed to be called by the same thread
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 
369  // these signal pair are NOT guaranteed to be called by the same thread
372  }
373 
374  // these signal pair are guaranteed to be called by the same thread
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 
468  for (unsigned int sid = 0; sid < stream_domain_.size(); ++sid) {
469  nvtxDomainDestroy(stream_domain_[sid]);
470  }
471  nvtxDomainDestroy(global_domain_);
472  cudaProfilerStop();
473 }
474 
477  desc.addUntracked<std::vector<std::string>>("highlightModules", {})->setComment("");
478  desc.addUntracked<bool>("showModulePrefetching", false)
479  ->setComment("Show the stack of dependencies that requested to run a module.");
480  desc.addUntracked<bool>("skipFirstEvent", false)
481  ->setComment(
482  "Start profiling after the first event has completed.\nWith multiple streams, ignore transitions belonging "
483  "to events started in parallel to the first event.\nRequires running nvprof with the '--profile-from-start "
484  "off' option.");
485  descriptions.add("NVProfilerService", desc);
486  descriptions.setComment(R"(This Service provides CMSSW-aware annotations to nvprof/nvvm.
487 
488 Notes on nvprof options:
489  - the option '--profile-from-start off' should be used if skipFirstEvent is True.
490  - the option '--cpu-profiling on' currently results in cmsRun being stuck at the beginning of the job.
491  - the option '--cpu-thread-tracing on' is not compatible with jemalloc, and should only be used with cmsRunGlibC.)");
492 }
493 
495  std::stringstream out;
496  out << "preallocate: " << bounds.maxNumberOfConcurrentRuns() << " concurrent runs, "
497  << bounds.maxNumberOfConcurrentLuminosityBlocks() << " luminosity sections, " << bounds.maxNumberOfStreams()
498  << " streams\nrunning on" << bounds.maxNumberOfThreads() << " threads";
499  nvtxDomainMark(global_domain_, out.str().c_str());
500 
501  auto concurrentStreams = bounds.maxNumberOfStreams();
502  // create the NVTX domains for per-EDM-stream transitions
503  stream_domain_.resize(concurrentStreams);
504  for (unsigned int sid = 0; sid < concurrentStreams; ++sid) {
505  stream_domain_[sid] = nvtxDomainCreate(fmt::sprintf("EDM Stream %d", sid).c_str());
506  }
507 
508  event_.resize(concurrentStreams);
509  stream_modules_.resize(concurrentStreams);
510  if (skipFirstEvent_) {
511  globalFirstEventDone_ = false;
512  std::vector<std::atomic<bool>> tmp(concurrentStreams);
513  for (auto& element : tmp)
514  std::atomic_init(&element, false);
516  }
517 }
518 
520  edm::ProcessContext const& pc) {
521  nvtxDomainMark(global_domain_, "preBeginJob");
522 
523  // FIXME this probably works only in the absence of subprocesses
524  // size() + 1 because pathsAndConsumes.allModules() does not include the source
525  unsigned int modules = pathsAndConsumes.allModules().size() + 1;
526  global_modules_.resize(modules, nvtxInvalidRangeId);
527  for (unsigned int sid = 0; sid < stream_modules_.size(); ++sid) {
528  stream_modules_[sid].resize(modules, nvtxInvalidRangeId);
529  }
530 }
531 
534  nvtxDomainMark(global_domain_, "postBeginJob");
535  }
536 }
537 
540  nvtxDomainMark(global_domain_, "postEndJob");
541  }
542 }
543 
546  nvtxDomainRangePush(stream_domain_[sid], "source");
547  }
548 }
549 
552  nvtxDomainRangePop(stream_domain_[sid]);
553  }
554 }
555 
558  nvtxDomainRangePush(global_domain_, "source lumi");
559  }
560 }
561 
564  nvtxDomainRangePop(global_domain_);
565  }
566 }
567 
570  nvtxDomainRangePush(global_domain_, "source run");
571  }
572 }
573 
576  nvtxDomainRangePop(global_domain_);
577  }
578 }
579 
582  nvtxDomainRangePush(global_domain_, ("open file "s + lfn).c_str());
583  }
584 }
585 
588  nvtxDomainRangePop(global_domain_);
589  }
590 }
591 
594  nvtxDomainRangePush(global_domain_, ("close file "s + lfn).c_str());
595  }
596 }
597 
600  nvtxDomainRangePop(global_domain_);
601  }
602 }
603 
605  auto sid = sc.streamID();
607  auto mid = mcc.moduleDescription()->id();
608  auto const& label = mcc.moduleDescription()->moduleLabel();
609  auto const& msg = label + " begin stream";
610  assert(stream_modules_[sid][mid] == nvtxInvalidRangeId);
611  stream_modules_[sid][mid] = nvtxDomainRangeStartColor(stream_domain_[sid], msg.c_str(), labelColor(label));
612  }
613 }
614 
616  auto sid = sc.streamID();
618  auto mid = mcc.moduleDescription()->id();
619  nvtxDomainRangeEnd(stream_domain_[sid], stream_modules_[sid][mid]);
620  stream_modules_[sid][mid] = nvtxInvalidRangeId;
621  }
622 }
623 
625  auto sid = sc.streamID();
627  auto mid = mcc.moduleDescription()->id();
628  auto const& label = mcc.moduleDescription()->moduleLabel();
629  auto const& msg = label + " end stream";
630  assert(stream_modules_[sid][mid] == nvtxInvalidRangeId);
631  stream_modules_[sid][mid] = nvtxDomainRangeStartColor(stream_domain_[sid], msg.c_str(), labelColor(label));
632  }
633 }
634 
636  auto sid = sc.streamID();
638  auto mid = mcc.moduleDescription()->id();
639  nvtxDomainRangeEnd(stream_domain_[sid], stream_modules_[sid][mid]);
640  stream_modules_[sid][mid] = nvtxInvalidRangeId;
641  }
642 }
643 
646  nvtxDomainRangePush(global_domain_, "global begin run");
647  }
648 }
649 
652  nvtxDomainRangePop(global_domain_);
653  }
654 }
655 
658  nvtxDomainRangePush(global_domain_, "global end run");
659  }
660 }
661 
664  nvtxDomainRangePop(global_domain_);
665  }
666 }
667 
669  auto sid = sc.streamID();
671  nvtxDomainRangePush(stream_domain_[sid], "stream begin run");
672  }
673 }
674 
676  auto sid = sc.streamID();
678  nvtxDomainRangePop(stream_domain_[sid]);
679  }
680 }
681 
683  auto sid = sc.streamID();
685  nvtxDomainRangePush(stream_domain_[sid], "stream end run");
686  }
687 }
688 
690  auto sid = sc.streamID();
692  nvtxDomainRangePop(stream_domain_[sid]);
693  }
694 }
695 
698  nvtxDomainRangePush(global_domain_, "global begin lumi");
699  }
700 }
701 
704  nvtxDomainRangePop(global_domain_);
705  }
706 }
707 
710  nvtxDomainRangePush(global_domain_, "global end lumi");
711  }
712 }
713 
716  nvtxDomainRangePop(global_domain_);
717  }
718 }
719 
721  auto sid = sc.streamID();
723  nvtxDomainRangePush(stream_domain_[sid], "stream begin lumi");
724  }
725 }
726 
728  auto sid = sc.streamID();
730  nvtxDomainRangePop(stream_domain_[sid]);
731  }
732 }
733 
735  auto sid = sc.streamID();
736  nvtxDomainRangePush(stream_domain_[sid], "stream end lumi");
737 }
738 
740  auto sid = sc.streamID();
742  nvtxDomainRangePop(stream_domain_[sid]);
743  }
744 }
745 
747  auto sid = sc.streamID();
749  event_[sid] = nvtxDomainRangeStartColor(stream_domain_[sid], "event", nvtxDarkGreen);
750  }
751 }
752 
754  auto sid = sc.streamID();
756  nvtxDomainRangeEnd(stream_domain_[sid], event_[sid]);
757  event_[sid] = nvtxInvalidRangeId;
758  } else {
759  streamFirstEventDone_[sid] = true;
760  auto identity = [](bool x) { return x; };
761  if (std::all_of(streamFirstEventDone_.begin(), streamFirstEventDone_.end(), identity)) {
762  bool expected = false;
763  if (globalFirstEventDone_.compare_exchange_strong(expected, true))
764  cudaProfilerStart();
765  }
766  }
767 }
768 
770  auto sid = sc.streamID();
772  nvtxDomainMark(global_domain_, ("before path "s + pc.pathName()).c_str());
773  }
774 }
775 
777  edm::PathContext const& pc,
778  edm::HLTPathStatus const& hlts) {
779  auto sid = sc.streamID();
781  nvtxDomainMark(global_domain_, ("after path "s + pc.pathName()).c_str());
782  }
783 }
784 
786  auto sid = sc.streamID();
788  auto mid = mcc.moduleDescription()->id();
789  auto const& label = mcc.moduleDescription()->moduleLabel();
790  auto const& msg = label + " prefetching";
791  assert(stream_modules_[sid][mid] == nvtxInvalidRangeId);
792  stream_modules_[sid][mid] = nvtxDomainRangeStartColor(stream_domain_[sid], msg.c_str(), labelColorLight(label));
793  }
794 }
795 
797  auto sid = sc.streamID();
799  auto mid = mcc.moduleDescription()->id();
800  nvtxDomainRangeEnd(stream_domain_[sid], stream_modules_[sid][mid]);
801  stream_modules_[sid][mid] = nvtxInvalidRangeId;
802  }
803 }
804 
806  if (not skipFirstEvent_) {
807  auto mid = desc.id();
808  global_modules_.grow_to_at_least(mid + 1);
809  auto const& label = desc.moduleLabel();
810  auto const& msg = label + " construction";
811  global_modules_[mid] = nvtxDomainRangeStartColor(global_domain_, msg.c_str(), labelColor(label));
812  }
813 }
814 
816  if (not skipFirstEvent_) {
817  auto mid = desc.id();
818  nvtxDomainRangeEnd(global_domain_, global_modules_[mid]);
819  global_modules_[mid] = nvtxInvalidRangeId;
820  }
821 }
822 
824  if (not skipFirstEvent_) {
825  auto mid = desc.id();
826  auto const& label = desc.moduleLabel();
827  auto const& msg = label + " begin job";
828  global_modules_[mid] = nvtxDomainRangeStartColor(global_domain_, msg.c_str(), labelColor(label));
829  }
830 }
831 
833  if (not skipFirstEvent_) {
834  auto mid = desc.id();
835  nvtxDomainRangeEnd(global_domain_, global_modules_[mid]);
836  global_modules_[mid] = nvtxInvalidRangeId;
837  }
838 }
839 
842  auto mid = desc.id();
843  auto const& label = desc.moduleLabel();
844  auto const& msg = label + " end job";
845  global_modules_[mid] = nvtxDomainRangeStartColor(global_domain_, msg.c_str(), labelColor(label));
846  }
847 }
848 
851  auto mid = desc.id();
852  nvtxDomainRangeEnd(global_domain_, global_modules_[mid]);
853  global_modules_[mid] = nvtxInvalidRangeId;
854  }
855 }
856 
858  auto sid = sc.streamID();
860  auto mid = mcc.moduleDescription()->id();
861  auto const& label = mcc.moduleDescription()->moduleLabel();
862  auto const& msg = label + " acquire";
863  assert(stream_modules_[sid][mid] == nvtxInvalidRangeId);
864  stream_modules_[sid][mid] = nvtxDomainRangeStartColor(stream_domain_[sid], msg.c_str(), labelColor(label));
865  }
866 }
867 
869  auto sid = sc.streamID();
871  auto mid = mcc.moduleDescription()->id();
872  nvtxDomainRangeEnd(stream_domain_[sid], stream_modules_[sid][mid]);
873  stream_modules_[sid][mid] = nvtxInvalidRangeId;
874  }
875 }
876 
878  auto sid = sc.streamID();
880  auto mid = mcc.moduleDescription()->id();
881  auto const& label = mcc.moduleDescription()->moduleLabel();
882  assert(stream_modules_[sid][mid] == nvtxInvalidRangeId);
883  stream_modules_[sid][mid] = nvtxDomainRangeStartColor(stream_domain_[sid], label.c_str(), labelColor(label));
884  }
885 }
886 
888  auto sid = sc.streamID();
890  auto mid = mcc.moduleDescription()->id();
891  nvtxDomainRangeEnd(stream_domain_[sid], stream_modules_[sid][mid]);
892  stream_modules_[sid][mid] = nvtxInvalidRangeId;
893  }
894 }
895 
897  /* FIXME
898  auto sid = sc.streamID();
899  if (not skipFirstEvent_ or streamFirstEventDone_[sid]) {
900  auto mid = mcc.moduleDescription()->id();
901  auto const & label = mcc.moduleDescription()->moduleLabel();
902  auto const & msg = label + " delayed get";
903  assert(stream_modules_[sid][mid] == nvtxInvalidRangeId);
904  stream_modules_[sid][mid] = nvtxDomainRangeStartColor(stream_domain_[sid], label.c_str(), labelColorLight(label));
905  }
906  */
907 }
908 
910  /* FIXME
911  auto sid = sc.streamID();
912  if (not skipFirstEvent_ or streamFirstEventDone_[sid]) {
913  auto mid = mcc.moduleDescription()->id();
914  nvtxDomainRangeEnd(stream_domain_[sid], stream_modules_[sid][mid]);
915  stream_modules_[sid][mid] = nvtxInvalidRangeId;
916  }
917  */
918 }
919 
921  /* FIXME
922  auto sid = sc.streamID();
923  if (not skipFirstEvent_ or streamFirstEventDone_[sid]) {
924  auto mid = mcc.moduleDescription()->id();
925  auto const & label = mcc.moduleDescription()->moduleLabel();
926  auto const & msg = label + " read from source";
927  assert(stream_modules_[sid][mid] == nvtxInvalidRangeId);
928  stream_modules_[sid][mid] = nvtxDomainRangeStartColor(stream_domain_[sid], msg.c_str(), labelColorLight(label));
929  }
930  */
931 }
932 
934  /* FIXME
935  auto sid = sc.streamID();
936  if (not skipFirstEvent_ or streamFirstEventDone_[sid]) {
937  auto mid = mcc.moduleDescription()->id();
938  nvtxDomainRangeEnd(stream_domain_[sid], stream_modules_[sid][mid]);
939  stream_modules_[sid][mid] = nvtxInvalidRangeId;
940  }
941  */
942 }
943 
945  auto sid = sc.streamID();
947  auto mid = mcc.moduleDescription()->id();
948  auto const& label = mcc.moduleDescription()->moduleLabel();
949  auto const& msg = label + " stream begin run";
950  assert(stream_modules_[sid][mid] == nvtxInvalidRangeId);
951  stream_modules_[sid][mid] = nvtxDomainRangeStartColor(stream_domain_[sid], msg.c_str(), labelColor(label));
952  }
953 }
954 
956  auto sid = sc.streamID();
958  auto mid = mcc.moduleDescription()->id();
959  nvtxDomainRangeEnd(stream_domain_[sid], stream_modules_[sid][mid]);
960  stream_modules_[sid][mid] = nvtxInvalidRangeId;
961  }
962 }
963 
965  auto sid = sc.streamID();
967  auto mid = mcc.moduleDescription()->id();
968  auto const& label = mcc.moduleDescription()->moduleLabel();
969  auto const& msg = label + " stream end run";
970  assert(stream_modules_[sid][mid] == nvtxInvalidRangeId);
971  stream_modules_[sid][mid] = nvtxDomainRangeStartColor(stream_domain_[sid], msg.c_str(), labelColor(label));
972  }
973 }
974 
976  auto sid = sc.streamID();
978  auto mid = mcc.moduleDescription()->id();
979  nvtxDomainRangeEnd(stream_domain_[sid], stream_modules_[sid][mid]);
980  stream_modules_[sid][mid] = nvtxInvalidRangeId;
981  }
982 }
983 
985  auto sid = sc.streamID();
987  auto mid = mcc.moduleDescription()->id();
988  auto const& label = mcc.moduleDescription()->moduleLabel();
989  auto const& msg = label + " stream begin lumi";
990  assert(stream_modules_[sid][mid] == nvtxInvalidRangeId);
991  stream_modules_[sid][mid] = nvtxDomainRangeStartColor(stream_domain_[sid], msg.c_str(), labelColor(label));
992  }
993 }
994 
996  auto sid = sc.streamID();
998  auto mid = mcc.moduleDescription()->id();
999  nvtxDomainRangeEnd(stream_domain_[sid], stream_modules_[sid][mid]);
1000  stream_modules_[sid][mid] = nvtxInvalidRangeId;
1001  }
1002 }
1003 
1005  auto sid = sc.streamID();
1006  if (not skipFirstEvent_ or streamFirstEventDone_[sid]) {
1007  auto mid = mcc.moduleDescription()->id();
1008  auto const& label = mcc.moduleDescription()->moduleLabel();
1009  auto const& msg = label + " stream end lumi";
1010  assert(stream_modules_[sid][mid] == nvtxInvalidRangeId);
1011  stream_modules_[sid][mid] = nvtxDomainRangeStartColor(stream_domain_[sid], msg.c_str(), labelColor(label));
1012  }
1013 }
1014 
1016  auto sid = sc.streamID();
1017  if (not skipFirstEvent_ or streamFirstEventDone_[sid]) {
1018  auto mid = mcc.moduleDescription()->id();
1019  nvtxDomainRangeEnd(stream_domain_[sid], stream_modules_[sid][mid]);
1020  stream_modules_[sid][mid] = nvtxInvalidRangeId;
1021  }
1022 }
1023 
1026  auto mid = mcc.moduleDescription()->id();
1027  auto const& label = mcc.moduleDescription()->moduleLabel();
1028  auto const& msg = label + " global begin run";
1029  global_modules_[mid] = nvtxDomainRangeStartColor(global_domain_, msg.c_str(), labelColor(label));
1030  }
1031 }
1032 
1035  auto mid = mcc.moduleDescription()->id();
1036  nvtxDomainRangeEnd(global_domain_, global_modules_[mid]);
1037  global_modules_[mid] = nvtxInvalidRangeId;
1038  }
1039 }
1040 
1043  auto mid = mcc.moduleDescription()->id();
1044  auto const& label = mcc.moduleDescription()->moduleLabel();
1045  auto const& msg = label + " global end run";
1046  global_modules_[mid] = nvtxDomainRangeStartColor(global_domain_, msg.c_str(), labelColor(label));
1047  }
1048 }
1049 
1052  auto mid = mcc.moduleDescription()->id();
1053  nvtxDomainRangeEnd(global_domain_, global_modules_[mid]);
1054  global_modules_[mid] = nvtxInvalidRangeId;
1055  }
1056 }
1057 
1060  auto mid = mcc.moduleDescription()->id();
1061  auto const& label = mcc.moduleDescription()->moduleLabel();
1062  auto const& msg = label + " global begin lumi";
1063  global_modules_[mid] = nvtxDomainRangeStartColor(global_domain_, msg.c_str(), labelColor(label));
1064  }
1065 }
1066 
1069  auto mid = mcc.moduleDescription()->id();
1070  nvtxDomainRangeEnd(global_domain_, global_modules_[mid]);
1071  global_modules_[mid] = nvtxInvalidRangeId;
1072  }
1073 }
1074 
1077  auto mid = mcc.moduleDescription()->id();
1078  auto const& label = mcc.moduleDescription()->moduleLabel();
1079  auto const& msg = label + " global end lumi";
1080  global_modules_[mid] = nvtxDomainRangeStartColor(global_domain_, msg.c_str(), labelColor(label));
1081  }
1082 }
1083 
1086  auto mid = mcc.moduleDescription()->id();
1087  nvtxDomainRangeEnd(global_domain_, global_modules_[mid]);
1088  global_modules_[mid] = nvtxInvalidRangeId;
1089  }
1090 }
1091 
1093  if (not skipFirstEvent_) {
1094  auto mid = desc.id();
1095  global_modules_.grow_to_at_least(mid + 1);
1096  auto const& label = desc.moduleLabel();
1097  auto const& msg = label + " construction";
1098  global_modules_[mid] = nvtxDomainRangeStartColor(global_domain_, msg.c_str(), labelColor(label));
1099  }
1100 }
1101 
1103  if (not skipFirstEvent_) {
1104  auto mid = desc.id();
1105  nvtxDomainRangeEnd(global_domain_, global_modules_[mid]);
1106  global_modules_[mid] = nvtxInvalidRangeId;
1107  }
1108 }
1109 
NVProfilerService::postEvent
void postEvent(edm::StreamContext const &)
Definition: NVProfilerService.cc:753
ConfigurationDescriptions.h
NVProfilerService::postStreamEndRun
void postStreamEndRun(edm::StreamContext const &)
Definition: NVProfilerService.cc:689
NVProfilerService::postModuleEndJob
void postModuleEndJob(edm::ModuleDescription const &)
Definition: NVProfilerService.cc:849
NVProfilerService::postModuleStreamEndLumi
void postModuleStreamEndLumi(edm::StreamContext const &, edm::ModuleCallingContext const &)
Definition: NVProfilerService.cc:1015
NVProfilerService::postSourceLumi
void postSourceLumi(edm::LuminosityBlockIndex)
Definition: NVProfilerService.cc:562
edm::ActivityRegistry::watchPreModuleEndStream
void watchPreModuleEndStream(PreModuleEndStream::slot_type const &iSlot)
Definition: ActivityRegistry.h:259
edm::StreamID
Definition: StreamID.h:30
edm::ActivityRegistry::watchPreModuleBeginStream
void watchPreModuleBeginStream(PreModuleBeginStream::slot_type const &iSlot)
Definition: ActivityRegistry.h:245
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:1058
NVProfilerService::preStreamBeginLumi
void preStreamBeginLumi(edm::StreamContext const &)
Definition: NVProfilerService.cc:720
edm::ActivityRegistry::watchPostStreamEndLumi
void watchPostStreamEndLumi(PostStreamEndLumi::slot_type const &iSlot)
Definition: ActivityRegistry.h:449
edm::ActivityRegistry::watchPostModuleGlobalEndRun
void watchPostModuleGlobalEndRun(PostModuleGlobalEndRun::slot_type const &iSlot)
Definition: ActivityRegistry.h:907
ModuleCallingContext.h
NVProfilerService::preSourceRun
void preSourceRun(edm::RunIndex)
Definition: NVProfilerService.cc:568
electrons_cff.bool
bool
Definition: electrons_cff.py:393
NVProfilerService::postSourceRun
void postSourceRun(edm::RunIndex)
Definition: NVProfilerService.cc:574
NVProfilerService::preModuleStreamBeginRun
void preModuleStreamBeginRun(edm::StreamContext const &, edm::ModuleCallingContext const &)
Definition: NVProfilerService.cc:944
NVProfilerService::~NVProfilerService
~NVProfilerService()
Definition: NVProfilerService.cc:467
MessageLogger.h
NVProfilerService::postModuleStreamEndRun
void postModuleStreamEndRun(edm::StreamContext const &, edm::ModuleCallingContext const &)
Definition: NVProfilerService.cc:975
NVProfilerService::preEventReadFromSource
void preEventReadFromSource(edm::StreamContext const &, edm::ModuleCallingContext const &)
Definition: NVProfilerService.cc:920
BranchType.h
edm::ActivityRegistry::watchPostSourceRun
void watchPostSourceRun(PostSourceRun::slot_type const &iSlot)
Definition: ActivityRegistry.h:213
edm::ActivityRegistry::watchPreSourceLumi
void watchPreSourceLumi(PreSourceLumi::slot_type const &iSlot)
Definition: ActivityRegistry.h:195
edm::ActivityRegistry::watchPostGlobalEndRun
void watchPostGlobalEndRun(PostGlobalEndRun::slot_type const &iSlot)
Definition: ActivityRegistry.h:333
edm::ActivityRegistry::watchPostEventReadFromSource
void watchPostEventReadFromSource(PostEventReadFromSource::slot_type const &iSlot)
Definition: ActivityRegistry.h:780
edm::ActivityRegistry::watchPostModuleStreamBeginLumi
void watchPostModuleStreamBeginLumi(PostModuleStreamBeginLumi::slot_type const &iSlot)
Definition: ActivityRegistry.h:822
NVProfilerService::postBeginJob
void postBeginJob()
Definition: NVProfilerService.cc:532
modules
Definition: ZHLTMatchFilter.cc:17
edm::ProcessContext
Definition: ProcessContext.h:27
edm::ActivityRegistry::watchPreModuleEndJob
void watchPreModuleEndJob(PreModuleEndJob::slot_type const &iSlot)
Definition: ActivityRegistry.h:698
edm::ActivityRegistry::watchPostGlobalEndLumi
void watchPostGlobalEndLumi(PostGlobalEndLumi::slot_type const &iSlot)
Definition: ActivityRegistry.h:409
edm::ParameterSetDescription
Definition: ParameterSetDescription.h:52
DEFINE_FWK_SERVICE
#define DEFINE_FWK_SERVICE(type)
Definition: ServiceMaker.h:105
NVProfilerService::labelColor
uint32_t labelColor(std::string const &label) const
Definition: NVProfilerService.cc:281
NVProfilerService::preModuleGlobalBeginRun
void preModuleGlobalBeginRun(edm::GlobalContext const &, edm::ModuleCallingContext const &)
Definition: NVProfilerService.cc:1024
edm::ActivityRegistry::watchPostOpenFile
void watchPostOpenFile(PostOpenFile::slot_type const &iSlot)
Definition: ActivityRegistry.h:226
NVProfilerService::preGlobalEndRun
void preGlobalEndRun(edm::GlobalContext const &)
Definition: NVProfilerService.cc:656
cms::cuda::assert
assert(be >=bs)
NVProfilerService::preModuleEventPrefetching
void preModuleEventPrefetching(edm::StreamContext const &, edm::ModuleCallingContext const &)
Definition: NVProfilerService.cc:785
edm::ActivityRegistry::watchPostModuleGlobalBeginRun
void watchPostModuleGlobalBeginRun(PostModuleGlobalBeginRun::slot_type const &iSlot)
Definition: ActivityRegistry.h:893
NVProfilerService::postEndJob
void postEndJob()
Definition: NVProfilerService.cc:538
NVProfilerService::preStreamEndRun
void preStreamEndRun(edm::StreamContext const &)
Definition: NVProfilerService.cc:682
mps_check.msg
tuple msg
Definition: mps_check.py:285
NVProfilerService::fillDescriptions
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
Definition: NVProfilerService.cc:475
NVProfilerService::postModuleGlobalEndRun
void postModuleGlobalEndRun(edm::GlobalContext const &, edm::ModuleCallingContext const &)
Definition: NVProfilerService.cc:1050
NVProfilerService::postModuleGlobalEndLumi
void postModuleGlobalEndLumi(edm::GlobalContext const &, edm::ModuleCallingContext const &)
Definition: NVProfilerService.cc:1084
DDAxes::x
edm::ActivityRegistry::watchPostModuleStreamEndRun
void watchPostModuleStreamEndRun(PostModuleStreamEndRun::slot_type const &iSlot)
Definition: ActivityRegistry.h:808
NVProfilerService::preBeginJob
void preBeginJob(edm::PathsAndConsumesOfModulesBase const &, edm::ProcessContext const &)
Definition: NVProfilerService.cc:519
edm::ModuleCallingContext::moduleDescription
ModuleDescription const * moduleDescription() const
Definition: ModuleCallingContext.h:50
edm::ActivityRegistry::watchPreModuleStreamBeginRun
void watchPreModuleStreamBeginRun(PreModuleStreamBeginRun::slot_type const &iSlot)
Definition: ActivityRegistry.h:787
edm::ActivityRegistry::watchPreStreamBeginRun
void watchPreStreamBeginRun(PreStreamBeginRun::slot_type const &iSlot)
Definition: ActivityRegistry.h:366
createJobs.tmp
tmp
align.sh
Definition: createJobs.py:716
NVProfilerService::highlight
bool highlight(std::string const &label) const
Definition: NVProfilerService.cc:277
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:868
NVProfilerService::preGlobalEndLumi
void preGlobalEndLumi(edm::GlobalContext const &)
Definition: NVProfilerService.cc:708
edm::ModuleDescription
Definition: ModuleDescription.h:21
NVProfilerService::preModuleBeginJob
void preModuleBeginJob(edm::ModuleDescription const &)
Definition: NVProfilerService.cc:823
NVProfilerService::postStreamEndLumi
void postStreamEndLumi(edm::StreamContext const &)
Definition: NVProfilerService.cc:739
edm::ActivityRegistry::watchPostModuleBeginStream
void watchPostModuleBeginStream(PostModuleBeginStream::slot_type const &iSlot)
Definition: ActivityRegistry.h:252
edm::ActivityRegistry::watchPostSourceEvent
void watchPostSourceEvent(PostSourceEvent::slot_type const &iSlot)
Definition: ActivityRegistry.h:189
ModuleDescription.h
ActivityRegistry.h
edm::ActivityRegistry::watchPreCloseFile
void watchPreCloseFile(PreCloseFile::slot_type const &iSlot)
Definition: ActivityRegistry.h:234
edm::ActivityRegistry::watchPostModuleEndJob
void watchPostModuleEndJob(PostModuleEndJob::slot_type const &iSlot)
Definition: ActivityRegistry.h:704
edm::ActivityRegistry::watchPostCloseFile
void watchPostCloseFile(PostCloseFile::slot_type const &iSlot)
Definition: ActivityRegistry.h:240
NVProfilerService::postOpenFile
void postOpenFile(std::string const &, bool)
Definition: NVProfilerService.cc:586
config
Definition: config.py:1
edm::ActivityRegistry::watchPreModuleGlobalBeginLumi
void watchPreModuleGlobalBeginLumi(PreModuleGlobalBeginLumi::slot_type const &iSlot)
Definition: ActivityRegistry.h:914
NVProfilerService::postModuleEvent
void postModuleEvent(edm::StreamContext const &, edm::ModuleCallingContext const &)
Definition: NVProfilerService.cc:887
NVProfilerService::preModuleEvent
void preModuleEvent(edm::StreamContext const &, edm::ModuleCallingContext const &)
Definition: NVProfilerService.cc:877
alignCSCRings.s
s
Definition: alignCSCRings.py:92
NVProfilerService::preModuleGlobalEndRun
void preModuleGlobalEndRun(edm::GlobalContext const &, edm::ModuleCallingContext const &)
Definition: NVProfilerService.cc:1041
edm::ActivityRegistry::watchPreModuleStreamEndLumi
void watchPreModuleStreamEndLumi(PreModuleStreamEndLumi::slot_type const &iSlot)
Definition: ActivityRegistry.h:829
NVProfilerService::preModuleBeginStream
void preModuleBeginStream(edm::StreamContext const &, edm::ModuleCallingContext const &)
Definition: NVProfilerService.cc:604
edm::ActivityRegistry::watchPostEndJob
void watchPostEndJob(PostEndJob::slot_type const &iSlot)
Definition: ActivityRegistry.h:169
edm::ActivityRegistry::watchPreStreamBeginLumi
void watchPreStreamBeginLumi(PreStreamBeginLumi::slot_type const &iSlot)
Definition: ActivityRegistry.h:430
edm::LuminosityBlockIndex
Definition: LuminosityBlockIndex.h:33
edm::ActivityRegistry::watchPreModuleEventPrefetching
void watchPreModuleEventPrefetching(PreModuleEventPrefetching::slot_type const &iSlot)
Definition: ActivityRegistry.h:712
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:544
NVProfilerService::postSourceConstruction
void postSourceConstruction(edm::ModuleDescription const &)
Definition: NVProfilerService.cc:1102
NVProfilerService::postPathEvent
void postPathEvent(edm::StreamContext const &, edm::PathContext const &, edm::HLTPathStatus const &)
Definition: NVProfilerService.cc:776
NVProfilerService::global_domain_
nvtxDomainHandle_t global_domain_
Definition: NVProfilerService.cc:298
edm::ActivityRegistry::watchPreBeginJob
void watchPreBeginJob(PreBeginJob::slot_type const &iSlot)
convenience function for attaching to signal
Definition: ActivityRegistry.h:150
edm::ActivityRegistry::watchPostModuleEndStream
void watchPostModuleEndStream(PostModuleEndStream::slot_type const &iSlot)
Definition: ActivityRegistry.h:266
NVProfilerService::preModuleEventAcquire
void preModuleEventAcquire(edm::StreamContext const &, edm::ModuleCallingContext const &)
Definition: NVProfilerService.cc:857
edm::service::SystemBounds::maxNumberOfConcurrentRuns
unsigned int maxNumberOfConcurrentRuns() const
Definition: SystemBounds.h:36
NVProfilerService::preStreamEndLumi
void preStreamEndLumi(edm::StreamContext const &)
Definition: NVProfilerService.cc:734
Service.h
NVProfilerService::preModuleConstruction
void preModuleConstruction(edm::ModuleDescription const &)
Definition: NVProfilerService.cc:805
edm::ActivityRegistry::watchPostModuleEventDelayedGet
void watchPostModuleEventDelayedGet(PostModuleEventDelayedGet::slot_type const &iSlot)
Definition: ActivityRegistry.h:764
EventID.h
fillDescriptions
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
edm::ActivityRegistry::watchPreEvent
void watchPreEvent(PreEvent::slot_type const &iSlot)
Definition: ActivityRegistry.h:457
edm::ActivityRegistry::watchPostStreamBeginRun
void watchPostStreamBeginRun(PostStreamBeginRun::slot_type const &iSlot)
Definition: ActivityRegistry.h:371
edm::ActivityRegistry
Definition: ActivityRegistry.h:133
NVProfilerService::postGlobalBeginLumi
void postGlobalBeginLumi(edm::GlobalContext const &)
Definition: NVProfilerService.cc:702
NVProfilerService::postModuleStreamBeginRun
void postModuleStreamBeginRun(edm::StreamContext const &, edm::ModuleCallingContext const &)
Definition: NVProfilerService.cc:955
NVProfilerService::preGlobalBeginLumi
void preGlobalBeginLumi(edm::GlobalContext const &)
Definition: NVProfilerService.cc:696
edm::ActivityRegistry::watchPostBeginJob
void watchPostBeginJob(PostBeginJob::slot_type const &iSlot)
convenience function for attaching to signal
Definition: ActivityRegistry.h:157
NVProfilerService::event_
std::vector< nvtxRangeId_t > event_
Definition: NVProfilerService.cc:293
edm::ActivityRegistry::watchPreModuleStreamBeginLumi
void watchPreModuleStreamBeginLumi(PreModuleStreamBeginLumi::slot_type const &iSlot)
Definition: ActivityRegistry.h:815
NVProfilerService::postEventReadFromSource
void postEventReadFromSource(edm::StreamContext const &, edm::ModuleCallingContext const &)
Definition: NVProfilerService.cc:933
edm::ActivityRegistry::watchPostModuleBeginJob
void watchPostModuleBeginJob(PostModuleBeginJob::slot_type const &iSlot)
Definition: ActivityRegistry.h:690
ParameterSetDescription.h
edm::ActivityRegistry::watchPostModuleConstruction
void watchPostModuleConstruction(PostModuleConstruction::slot_type const &iSlot)
Definition: ActivityRegistry.h:675
edm::ActivityRegistry::watchPreGlobalEndRun
void watchPreGlobalEndRun(PreGlobalEndRun::slot_type const &iSlot)
Definition: ActivityRegistry.h:328
edm::ActivityRegistry::watchPreEventReadFromSource
void watchPreEventReadFromSource(PreEventReadFromSource::slot_type const &iSlot)
Definition: ActivityRegistry.h:772
NVProfilerService::postModuleGlobalBeginRun
void postModuleGlobalBeginRun(edm::GlobalContext const &, edm::ModuleCallingContext const &)
Definition: NVProfilerService.cc:1033
edm::ActivityRegistry::watchPreSourceConstruction
void watchPreSourceConstruction(PreSourceConstruction::slot_type const &iSlot)
Definition: ActivityRegistry.h:1063
edm::ActivityRegistry::watchPreSourceRun
void watchPreSourceRun(PreSourceRun::slot_type const &iSlot)
Definition: ActivityRegistry.h:207
ServiceMaker.h
NVProfilerService::postModuleConstruction
void postModuleConstruction(edm::ModuleDescription const &)
Definition: NVProfilerService.cc:815
edm::ConfigurationDescriptions
Definition: ConfigurationDescriptions.h:28
NVProfilerService::preCloseFile
void preCloseFile(std::string const &, bool)
Definition: NVProfilerService.cc:592
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
edm::ActivityRegistry::watchPostSourceLumi
void watchPostSourceLumi(PostSourceLumi::slot_type const &iSlot)
Definition: ActivityRegistry.h:201
NVProfilerService::stream_modules_
std::vector< std::vector< nvtxRangeId_t > > stream_modules_
Definition: NVProfilerService.cc:294
NVProfilerService
Definition: NVProfilerService.cc:124
NVProfilerService::postGlobalEndLumi
void postGlobalEndLumi(edm::GlobalContext const &)
Definition: NVProfilerService.cc:714
edm::ActivityRegistry::watchPreModuleGlobalEndLumi
void watchPreModuleGlobalEndLumi(PreModuleGlobalEndLumi::slot_type const &iSlot)
Definition: ActivityRegistry.h:928
edm::ActivityRegistry::watchPreModuleStreamEndRun
void watchPreModuleStreamEndRun(PreModuleStreamEndRun::slot_type const &iSlot)
Definition: ActivityRegistry.h:801
edm::GlobalContext
Definition: GlobalContext.h:29
edm::service::SystemBounds
Definition: SystemBounds.h:29
NVProfilerService::preModuleEndJob
void preModuleEndJob(edm::ModuleDescription const &)
Definition: NVProfilerService.cc:840
edm::ActivityRegistry::watchPostEvent
void watchPostEvent(PostEvent::slot_type const &iSlot)
Definition: ActivityRegistry.h:463
NVProfilerService::preStreamBeginRun
void preStreamBeginRun(edm::StreamContext const &)
Definition: NVProfilerService.cc:668
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:494
edm::ActivityRegistry::watchPostModuleGlobalEndLumi
void watchPostModuleGlobalEndLumi(PostModuleGlobalEndLumi::slot_type const &iSlot)
Definition: ActivityRegistry.h:935
Timestamp.h
NVProfilerService::preModuleStreamEndRun
void preModuleStreamEndRun(edm::StreamContext const &, edm::ModuleCallingContext const &)
Definition: NVProfilerService.cc:964
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:1004
edm::ActivityRegistry::watchPreStreamEndLumi
void watchPreStreamEndLumi(PreStreamEndLumi::slot_type const &iSlot)
Definition: ActivityRegistry.h:444
__attribute__
float __attribute__((vector_size(8))) cms_float32x2_t
Definition: ExtVec.h:12
edm::ConfigurationDescriptions::setComment
void setComment(std::string const &value)
Definition: ConfigurationDescriptions.cc:48
NVProfilerService::postGlobalBeginRun
void postGlobalBeginRun(edm::GlobalContext const &)
Definition: NVProfilerService.cc:650
NVProfilerService::preModuleEventDelayedGet
void preModuleEventDelayedGet(edm::StreamContext const &, edm::ModuleCallingContext const &)
Definition: NVProfilerService.cc:896
edm::HLTPathStatus
Definition: HLTPathStatus.h:33
NVProfilerService::globalFirstEventDone_
std::atomic< bool > globalFirstEventDone_
Definition: NVProfilerService.cc:291
NVProfilerService::postModuleEventPrefetching
void postModuleEventPrefetching(edm::StreamContext const &, edm::ModuleCallingContext const &)
Definition: NVProfilerService.cc:796
edm::Service
Definition: Service.h:30
edm::ActivityRegistry::watchPreModuleConstruction
void watchPreModuleConstruction(PreModuleConstruction::slot_type const &iSlot)
Definition: ActivityRegistry.h:666
edm::ActivityRegistry::watchPostGlobalBeginLumi
void watchPostGlobalBeginLumi(PostGlobalBeginLumi::slot_type const &iSlot)
Definition: ActivityRegistry.h:397
NVProfilerService::skipFirstEvent_
const bool skipFirstEvent_
Definition: NVProfilerService.cc:289
NVProfilerService::postSourceEvent
void postSourceEvent(edm::StreamID)
Definition: NVProfilerService.cc:550
NVProfilerService::streamFirstEventDone_
std::vector< std::atomic< bool > > streamFirstEventDone_
Definition: NVProfilerService.cc:292
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:769
NVProfilerService::postModuleEndStream
void postModuleEndStream(edm::StreamContext const &, edm::ModuleCallingContext const &)
Definition: NVProfilerService.cc:635
edm::ActivityRegistry::watchPostPathEvent
void watchPostPathEvent(PostPathEvent::slot_type const &iSlot)
Definition: ActivityRegistry.h:475
edm::ActivityRegistry::watchPreModuleGlobalEndRun
void watchPreModuleGlobalEndRun(PreModuleGlobalEndRun::slot_type const &iSlot)
Definition: ActivityRegistry.h:900
NVProfilerService::preSourceLumi
void preSourceLumi(edm::LuminosityBlockIndex)
Definition: NVProfilerService.cc:556
edm::ActivityRegistry::watchPostModuleStreamEndLumi
void watchPostModuleStreamEndLumi(PostModuleStreamEndLumi::slot_type const &iSlot)
Definition: ActivityRegistry.h:836
PathContext.h
edm::PathContext::pathName
std::string const & pathName() const
Definition: PathContext.h:30
NVProfilerService::showModulePrefetching_
const bool showModulePrefetching_
Definition: NVProfilerService.cc:288
NVProfilerService::preEvent
void preEvent(edm::StreamContext const &)
Definition: NVProfilerService.cc:746
NVProfilerService::preModuleGlobalEndLumi
void preModuleGlobalEndLumi(edm::GlobalContext const &, edm::ModuleCallingContext const &)
Definition: NVProfilerService.cc:1075
identity
T identity(T t)
Definition: trackSplitPlot.h:71
NVProfilerService::preSourceConstruction
void preSourceConstruction(edm::ModuleDescription const &)
Definition: NVProfilerService.cc:1092
NVProfilerService::highlightModules_
std::vector< std::string > highlightModules_
Definition: NVProfilerService.cc:287
edm::ActivityRegistry::watchPostModuleEventPrefetching
void watchPostModuleEventPrefetching(PostModuleEventPrefetching::slot_type const &iSlot)
Definition: ActivityRegistry.h:720
edm::ActivityRegistry::watchPreGlobalEndLumi
void watchPreGlobalEndLumi(PreGlobalEndLumi::slot_type const &iSlot)
Definition: ActivityRegistry.h:404
edm::ActivityRegistry::watchPreallocate
void watchPreallocate(Preallocate::slot_type const &iSlot)
Definition: ActivityRegistry.h:143
NVProfilerService::postStreamBeginRun
void postStreamBeginRun(edm::StreamContext const &)
Definition: NVProfilerService.cc:675
CUDAService.h
edm::ActivityRegistry::watchPostStreamBeginLumi
void watchPostStreamBeginLumi(PostStreamBeginLumi::slot_type const &iSlot)
Definition: ActivityRegistry.h:437
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:390
edm::ActivityRegistry::watchPreModuleBeginJob
void watchPreModuleBeginJob(PreModuleBeginJob::slot_type const &iSlot)
Definition: ActivityRegistry.h:684
edm::ActivityRegistry::watchPreOpenFile
void watchPreOpenFile(PreOpenFile::slot_type const &iSlot)
Definition: ActivityRegistry.h:219
edm::ActivityRegistry::watchPostModuleEvent
void watchPostModuleEvent(PostModuleEvent::slot_type const &iSlot)
Definition: ActivityRegistry.h:734
edm::ActivityRegistry::watchPreStreamEndRun
void watchPreStreamEndRun(PreStreamEndRun::slot_type const &iSlot)
Definition: ActivityRegistry.h:378
edm::ActivityRegistry::watchPreModuleGlobalBeginRun
void watchPreModuleGlobalBeginRun(PreModuleGlobalBeginRun::slot_type const &iSlot)
Definition: ActivityRegistry.h:886
edm::ActivityRegistry::watchPostGlobalBeginRun
void watchPostGlobalBeginRun(PostGlobalBeginRun::slot_type const &iSlot)
Definition: ActivityRegistry.h:321
HLTScalers_cfi.hlts
hlts
Definition: HLTScalers_cfi.py:5
NVProfilerService::stream_domain_
std::vector< nvtxDomainHandle_t > stream_domain_
Definition: NVProfilerService.cc:299
NVProfilerService::preGlobalBeginRun
void preGlobalBeginRun(edm::GlobalContext const &)
Definition: NVProfilerService.cc:644
NVProfilerService::postModuleGlobalBeginLumi
void postModuleGlobalBeginLumi(edm::GlobalContext const &, edm::ModuleCallingContext const &)
Definition: NVProfilerService.cc:1067
edm::PathsAndConsumesOfModulesBase
Definition: PathsAndConsumesOfModulesBase.h:34
NVProfilerService::postStreamBeginLumi
void postStreamBeginLumi(edm::StreamContext const &)
Definition: NVProfilerService.cc:727
NVProfilerService::postGlobalEndRun
void postGlobalEndRun(edm::GlobalContext const &)
Definition: NVProfilerService.cc:662
edm::ActivityRegistry::watchPostModuleEventAcquire
void watchPostModuleEventAcquire(PostModuleEventAcquire::slot_type const &iSlot)
Definition: ActivityRegistry.h:748
edm::ActivityRegistry::watchPreSourceEvent
void watchPreSourceEvent(PreSourceEvent::slot_type const &iSlot)
Definition: ActivityRegistry.h:183
NVProfilerService::postModuleStreamBeginLumi
void postModuleStreamBeginLumi(edm::StreamContext const &, edm::ModuleCallingContext const &)
Definition: NVProfilerService.cc:995
NVProfilerService::postModuleEventDelayedGet
void postModuleEventDelayedGet(edm::StreamContext const &, edm::ModuleCallingContext const &)
Definition: NVProfilerService.cc:909
NVProfilerService::NVProfilerService
NVProfilerService(const edm::ParameterSet &, edm::ActivityRegistry &)
Definition: NVProfilerService.cc:302
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:832
Exception.h
NVProfilerService::global_modules_
tbb::concurrent_vector< nvtxRangeId_t > global_modules_
Definition: NVProfilerService.cc:296
edm::ActivityRegistry::watchPostModuleGlobalBeginLumi
void watchPostModuleGlobalBeginLumi(PostModuleGlobalBeginLumi::slot_type const &iSlot)
Definition: ActivityRegistry.h:921
AlignmentPI::index
index
Definition: AlignmentPayloadInspectorHelper.h:46
NVProfilerService::preModuleEndStream
void preModuleEndStream(edm::StreamContext const &, edm::ModuleCallingContext const &)
Definition: NVProfilerService.cc:624
MillePedeFileConverter_cfg.out
out
Definition: MillePedeFileConverter_cfg.py:31
NVProfilerService::postModuleBeginStream
void postModuleBeginStream(edm::StreamContext const &, edm::ModuleCallingContext const &)
Definition: NVProfilerService.cc:615
edm::ActivityRegistry::watchPreGlobalBeginRun
void watchPreGlobalBeginRun(PreGlobalBeginRun::slot_type const &iSlot)
Definition: ActivityRegistry.h:316
ParameterSet.h
edm::ActivityRegistry::watchPrePathEvent
void watchPrePathEvent(PrePathEvent::slot_type const &iSlot)
Definition: ActivityRegistry.h:469
StreamContext.h
NVProfilerService::preOpenFile
void preOpenFile(std::string const &, bool)
Definition: NVProfilerService.cc:580
TimeOfDay.h
ProcessContext.h
edm::ActivityRegistry::watchPreModuleEventAcquire
void watchPreModuleEventAcquire(PreModuleEventAcquire::slot_type const &iSlot)
Definition: ActivityRegistry.h:740
PathsAndConsumesOfModulesBase.h
ConsumesInfo.h
edm::PathsAndConsumesOfModulesBase::allModules
std::vector< ModuleDescription const * > const & allModules() const
Definition: PathsAndConsumesOfModulesBase.h:41
ProductKindOfType.h
SystemBounds.h
NVProfilerService::preModuleStreamBeginLumi
void preModuleStreamBeginLumi(edm::StreamContext const &, edm::ModuleCallingContext const &)
Definition: NVProfilerService.cc:984
edm::ActivityRegistry::watchPreModuleEventDelayedGet
void watchPreModuleEventDelayedGet(PreModuleEventDelayedGet::slot_type const &iSlot)
Definition: ActivityRegistry.h:756
RunID.h
edm::ActivityRegistry::watchPostSourceConstruction
void watchPostSourceConstruction(PostSourceConstruction::slot_type const &iSlot)
Definition: ActivityRegistry.h:1072
label
const char * label
Definition: PFTauDecayModeTools.cc:11
edm::ActivityRegistry::watchPostModuleStreamBeginRun
void watchPostModuleStreamBeginRun(PostModuleStreamBeginRun::slot_type const &iSlot)
Definition: ActivityRegistry.h:794
edm::ActivityRegistry::watchPostStreamEndRun
void watchPostStreamEndRun(PostStreamEndRun::slot_type const &iSlot)
Definition: ActivityRegistry.h:383
edm::ActivityRegistry::watchPreModuleEvent
void watchPreModuleEvent(PreModuleEvent::slot_type const &iSlot)
Definition: ActivityRegistry.h:728
NVProfilerService::labelColorLight
uint32_t labelColorLight(std::string const &label) const
Definition: NVProfilerService.cc:283
NVProfilerService::postCloseFile
void postCloseFile(std::string const &, bool)
Definition: NVProfilerService.cc:598
edm::ModuleDescription::id
unsigned int id() const
Definition: ModuleDescription.h:46
edm::ModuleCallingContext
Definition: ModuleCallingContext.h:29