CMS 3D CMS Logo

NVProfilerService.cc
Go to the documentation of this file.
1 // -*- C++ -*-
2 //
3 // Package: Services
4 // Class : NVProfilerService
5 
6 #include <algorithm>
7 #include <iostream>
8 #include <sstream>
9 #include <string>
10 #include <vector>
11 
12 #include <tbb/enumerable_thread_specific.h>
13 #include <tbb/concurrent_vector.h>
14 
15 #include <boost/format.hpp>
16 
17 #include <cuda_profiler_api.h>
18 #include <nvToolsExt.h>
19 
43 
44 using namespace std::string_literals;
45 
46 namespace {
47  int nvtxDomainRangePush(nvtxDomainHandle_t domain, const char* message) {
48  nvtxEventAttributes_t eventAttrib = { 0 };
49  eventAttrib.version = NVTX_VERSION;
50  eventAttrib.size = NVTX_EVENT_ATTRIB_STRUCT_SIZE;
51  eventAttrib.messageType = NVTX_MESSAGE_TYPE_ASCII;
52  eventAttrib.message.ascii = message;
53  return nvtxDomainRangePushEx(domain, &eventAttrib);
54  }
55 
56  __attribute__((unused))
57  int nvtxDomainRangePushColor(nvtxDomainHandle_t domain, const char* message, uint32_t color) {
58  nvtxEventAttributes_t eventAttrib = { 0 };
59  eventAttrib.version = NVTX_VERSION;
60  eventAttrib.size = NVTX_EVENT_ATTRIB_STRUCT_SIZE;
61  eventAttrib.colorType = NVTX_COLOR_ARGB;
62  eventAttrib.color = color;
63  eventAttrib.messageType = NVTX_MESSAGE_TYPE_ASCII;
64  eventAttrib.message.ascii = message;
65  return nvtxDomainRangePushEx(domain, &eventAttrib);
66  }
67 
68  __attribute__((unused))
69  nvtxRangeId_t nvtxDomainRangeStart(nvtxDomainHandle_t domain, const char* message) {
70  nvtxEventAttributes_t eventAttrib = { 0 };
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 = { 0 };
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 = { 0 };
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))
99  void nvtxDomainMarkColor(nvtxDomainHandle_t domain, const char* message, uint32_t color) {
100  nvtxEventAttributes_t eventAttrib = { 0 };
101  eventAttrib.version = NVTX_VERSION;
102  eventAttrib.size = NVTX_EVENT_ATTRIB_STRUCT_SIZE;
103  eventAttrib.colorType = NVTX_COLOR_ARGB;
104  eventAttrib.color = color;
105  eventAttrib.messageType = NVTX_MESSAGE_TYPE_ASCII;
106  eventAttrib.message.ascii = message;
107  nvtxDomainMarkEx(domain, &eventAttrib);
108  }
109 
110  enum {
111  nvtxBlack = 0x00000000,
112  nvtxRed = 0x00ff0000,
113  nvtxDarkGreen = 0x00009900,
114  nvtxGreen = 0x0000ff00,
115  nvtxLightGreen = 0x00ccffcc,
116  nvtxBlue = 0x000000ff,
117  nvtxAmber = 0x00ffbf00,
118  nvtxLightAmber = 0x00fff2cc,
119  nvtxWhite = 0x00ffffff
120  };
121 }
122 
124 public:
127 
128  static void fillDescriptions(edm::ConfigurationDescriptions & descriptions);
129 
130  void preallocate(edm::service::SystemBounds const&);
131 
132  // these signal pair are NOT guaranteed to be called by the same thread
133  void preBeginJob(edm::PathsAndConsumesOfModulesBase const&, edm::ProcessContext const&);
134  void postBeginJob();
135 
136  // there is no preEndJob() signal
137  void postEndJob();
138 
139  // these signal pair are NOT guaranteed to be called by the same thread
140  void preGlobalBeginRun(edm::GlobalContext const&);
141  void postGlobalBeginRun(edm::GlobalContext const&);
142 
143  // these signal pair are NOT guaranteed to be called by the same thread
144  void preGlobalEndRun(edm::GlobalContext const&);
145  void postGlobalEndRun(edm::GlobalContext const&);
146 
147  // these signal pair are NOT guaranteed to be called by the same thread
148  void preStreamBeginRun(edm::StreamContext const&);
149  void postStreamBeginRun(edm::StreamContext const&);
150 
151  // these signal pair are NOT guaranteed to be called by the same thread
152  void preStreamEndRun(edm::StreamContext const&);
153  void postStreamEndRun(edm::StreamContext const&);
154 
155  // these signal pair are NOT guaranteed to be called by the same thread
156  void preGlobalBeginLumi(edm::GlobalContext const&);
157  void postGlobalBeginLumi(edm::GlobalContext const&);
158 
159  // these signal pair are NOT guaranteed to be called by the same thread
160  void preGlobalEndLumi(edm::GlobalContext const&);
161  void postGlobalEndLumi(edm::GlobalContext const&);
162 
163  // these signal pair are NOT guaranteed to be called by the same thread
164  void preStreamBeginLumi(edm::StreamContext const&);
165  void postStreamBeginLumi(edm::StreamContext const&);
166 
167  // these signal pair are NOT guaranteed to be called by the same thread
168  void preStreamEndLumi(edm::StreamContext const&);
169  void postStreamEndLumi(edm::StreamContext const&);
170 
171  // these signal pair are NOT guaranteed to be called by the same thread
172  void preEvent(edm::StreamContext const&);
173  void postEvent(edm::StreamContext const&);
174 
175  // these signal pair are NOT guaranteed to be called by the same thread
176  void prePathEvent(edm::StreamContext const&, edm::PathContext const&);
177  void postPathEvent(edm::StreamContext const&, edm::PathContext const&, edm::HLTPathStatus const&);
178 
179  // these signal pair are NOT guaranteed to be called by the same thread
180  void preModuleEventPrefetching(edm::StreamContext const&, edm::ModuleCallingContext const&);
181  void postModuleEventPrefetching(edm::StreamContext const&, edm::ModuleCallingContext const&);
182 
183  // these signal pair are guaranteed to be called by the same thread
184  void preOpenFile(std::string const&, bool);
185  void postOpenFile(std::string const&, bool);
186 
187  // these signal pair are guaranteed to be called by the same thread
188  void preCloseFile(std::string const&, bool);
189  void postCloseFile(std::string const&, bool);
190 
191  // these signal pair are guaranteed to be called by the same thread
192  void preSourceConstruction(edm::ModuleDescription const&);
193  void postSourceConstruction(edm::ModuleDescription const&);
194 
195  // these signal pair are guaranteed to be called by the same thread
196  void preSourceRun(edm::RunIndex);
197  void postSourceRun(edm::RunIndex);
198 
199  // these signal pair are guaranteed to be called by the same thread
200  void preSourceLumi(edm::LuminosityBlockIndex);
201  void postSourceLumi(edm::LuminosityBlockIndex);
202 
203  // these signal pair are guaranteed to be called by the same thread
204  void preSourceEvent(edm::StreamID);
205  void postSourceEvent(edm::StreamID);
206 
207  // these signal pair are guaranteed to be called by the same thread
208  void preModuleConstruction(edm::ModuleDescription const&);
209  void postModuleConstruction(edm::ModuleDescription const&);
210 
211  // these signal pair are guaranteed to be called by the same thread
212  void preModuleBeginJob(edm::ModuleDescription const&);
213  void postModuleBeginJob(edm::ModuleDescription const&);
214 
215  // these signal pair are guaranteed to be called by the same thread
216  void preModuleEndJob(edm::ModuleDescription const&);
217  void postModuleEndJob(edm::ModuleDescription const&);
218 
219  // these signal pair are guaranteed to be called by the same thread
220  void preModuleBeginStream(edm::StreamContext const&, edm::ModuleCallingContext const&);
221  void postModuleBeginStream(edm::StreamContext const&, edm::ModuleCallingContext const&);
222 
223  // these signal pair are guaranteed to be called by the same thread
224  void preModuleEndStream(edm::StreamContext const&, edm::ModuleCallingContext const&);
225  void postModuleEndStream(edm::StreamContext const&, edm::ModuleCallingContext const&);
226 
227  // these signal pair are guaranteed to be called by the same thread
228  void preModuleGlobalBeginRun(edm::GlobalContext const&, edm::ModuleCallingContext const&);
229  void postModuleGlobalBeginRun(edm::GlobalContext const&, edm::ModuleCallingContext const&);
230 
231  // these signal pair are guaranteed to be called by the same thread
232  void preModuleGlobalEndRun(edm::GlobalContext const&, edm::ModuleCallingContext const&);
233  void postModuleGlobalEndRun(edm::GlobalContext const&, edm::ModuleCallingContext const&);
234 
235  // these signal pair are guaranteed to be called by the same thread
236  void preModuleGlobalBeginLumi(edm::GlobalContext const&, edm::ModuleCallingContext const&);
237  void postModuleGlobalBeginLumi(edm::GlobalContext const&, edm::ModuleCallingContext const&);
238 
239  // these signal pair are guaranteed to be called by the same thread
240  void preModuleGlobalEndLumi(edm::GlobalContext const&, edm::ModuleCallingContext const&);
241  void postModuleGlobalEndLumi(edm::GlobalContext const&, edm::ModuleCallingContext const&);
242 
243  // these signal pair are guaranteed to be called by the same thread
244  void preModuleStreamBeginRun(edm::StreamContext const&, edm::ModuleCallingContext const&);
245  void postModuleStreamBeginRun(edm::StreamContext const&, edm::ModuleCallingContext const&);
246 
247  // these signal pair are guaranteed to be called by the same thread
248  void preModuleStreamEndRun(edm::StreamContext const&, edm::ModuleCallingContext const&);
249  void postModuleStreamEndRun(edm::StreamContext const&, edm::ModuleCallingContext const&);
250 
251  // these signal pair are guaranteed to be called by the same thread
252  void preModuleStreamBeginLumi(edm::StreamContext const&, edm::ModuleCallingContext const&);
253  void postModuleStreamBeginLumi(edm::StreamContext const&, edm::ModuleCallingContext const&);
254 
255  // these signal pair are guaranteed to be called by the same thread
256  void preModuleStreamEndLumi(edm::StreamContext const&, edm::ModuleCallingContext const&);
257  void postModuleStreamEndLumi(edm::StreamContext const&, edm::ModuleCallingContext const&);
258 
259  // these signal pair are guaranteed to be called by the same thread
260  void preModuleEventAcquire(edm::StreamContext const&, edm::ModuleCallingContext const&);
261  void postModuleEventAcquire(edm::StreamContext const&, edm::ModuleCallingContext const&);
262 
263  // these signal pair are guaranteed to be called by the same thread
264  void preModuleEvent(edm::StreamContext const&, edm::ModuleCallingContext const&);
265  void postModuleEvent(edm::StreamContext const&, edm::ModuleCallingContext const&);
266 
267  // these signal pair are guaranteed to be called by the same thread
268  void preModuleEventDelayedGet(edm::StreamContext const&, edm::ModuleCallingContext const&);
269  void postModuleEventDelayedGet(edm::StreamContext const&, edm::ModuleCallingContext const&);
270 
271  // these signal pair are guaranteed to be called by the same thread
272  void preEventReadFromSource(edm::StreamContext const&, edm::ModuleCallingContext const&);
273  void postEventReadFromSource(edm::StreamContext const&, edm::ModuleCallingContext const&);
274 
275 private:
276  bool highlight(std::string const&);
277 
278  std::vector<std::string> highlightModules_;
280 
281  unsigned int concurrentStreams_;
282  std::vector<nvtxRangeId_t> event_; // per-stream event ranges
283  std::vector<std::vector<nvtxRangeId_t>> stream_modules_; // per-stream, per-module ranges
284  // use a tbb::concurrent_vector rather than an std::vector because its final size is not known
285  tbb::concurrent_vector<nvtxRangeId_t> global_modules_; // global per-module events
286 
287 private:
288  struct Domains {
289  nvtxDomainHandle_t global;
290  std::vector<nvtxDomainHandle_t> stream;
291 
293  global = nvtxDomainCreate("EDM Global");
294  allocate_streams(service->concurrentStreams_);
295  }
296 
298  nvtxDomainDestroy(global);
299  for (unsigned int sid = 0; sid < stream.size(); ++sid) {
300  nvtxDomainDestroy(stream[sid]);
301  }
302  }
303 
304  void allocate_streams(unsigned int streams) {
305  stream.resize(streams);
306  for (unsigned int sid = 0; sid < streams; ++sid) {
307  stream[sid] = nvtxDomainCreate((boost::format("EDM Stream %d") % sid).str().c_str());
308  }
309  }
310  };
311 
312  // allow access to concurrentStreams_
313  friend struct Domains;
314 
315  tbb::enumerable_thread_specific<Domains> domains_;
316 
317  nvtxDomainHandle_t global_domain() {
318  return domains_.local().global;
319  }
320 
321  nvtxDomainHandle_t stream_domain(unsigned int sid) {
322  return domains_.local().stream.at(sid);
323  }
324 
325 };
326 
328  highlightModules_(config.getUntrackedParameter<std::vector<std::string>>("highlightModules")),
329  showModulePrefetching_(config.getUntrackedParameter<bool>("showModulePrefetching")),
330  concurrentStreams_(0),
331  domains_(this)
332 {
333  std::sort(highlightModules_.begin(), highlightModules_.end());
334 
335  // enables profile collection; if profiling is already enabled, has no effect
336  cudaProfilerStart();
337 
339 
340  // these signal pair are NOT guaranteed to be called by the same thread
343 
344  // there is no preEndJob() signal
346 
347  // these signal pair are NOT guaranteed to be called by the same thread
350 
351  // these signal pair are NOT guaranteed to be called by the same thread
354 
355  // these signal pair are NOT guaranteed to be called by the same thread
358 
359  // these signal pair are NOT guaranteed to be called by the same thread
362 
363  // these signal pair are NOT guaranteed to be called by the same thread
366 
367  // these signal pair are NOT guaranteed to be called by the same thread
370 
371  // these signal pair are NOT guaranteed to be called by the same thread
374 
375  // these signal pair are NOT guaranteed to be called by the same thread
378 
379  // these signal pair are NOT guaranteed to be called by the same thread
382 
383  // these signal pair are NOT guaranteed to be called by the same thread
386 
387  // these signal pair are NOT guaranteed to be called by the same thread
390 
391  // these signal pair are guaranteed to be called by the same thread
394 
395  // these signal pair are guaranteed to be called by the same thread
398 
399  // these signal pair are guaranteed to be called by the same thread
402 
403  // these signal pair are guaranteed to be called by the same thread
406 
407  // these signal pair are guaranteed to be called by the same thread
410 
411  // these signal pair are guaranteed to be called by the same thread
414 
415  // these signal pair are guaranteed to be called by the same thread
418 
419  // these signal pair are guaranteed to be called by the same thread
422 
423  // these signal pair are guaranteed to be called by the same thread
426 
427  // these signal pair are guaranteed to be called by the same thread
430 
431  // these signal pair are guaranteed to be called by the same thread
434 
435  // these signal pair are guaranteed to be called by the same thread
438 
439  // these signal pair are guaranteed to be called by the same thread
442 
443  // these signal pair are guaranteed to be called by the same thread
446 
447  // these signal pair are guaranteed to be called by the same thread
450 
451  // these signal pair are guaranteed to be called by the same thread
454 
455  // these signal pair are guaranteed to be called by the same thread
458 
459  // these signal pair are guaranteed to be called by the same thread
462 
463  // these signal pair are guaranteed to be called by the same thread
466 
467  // these signal pair are guaranteed to be called by the same thread
470 
471  // these signal pair are guaranteed to be called by the same thread
474 
475  // these signal pair are guaranteed to be called by the same thread
478 
479  // these signal pair are guaranteed to be called by the same thread
482 }
483 
485  cudaProfilerStop();
486 }
487 
488 bool
490  return (std::binary_search(highlightModules_.begin(), highlightModules_.end(), label));
491 }
492 
493 void
496  desc.addUntracked<std::vector<std::string>>("highlightModules", {})->setComment("");
497  desc.addUntracked<bool>("showModulePrefetching", false)->setComment("Show the stack of dependencies that requested to run a module.");
498  descriptions.add("NVProfilerService", desc);
499  descriptions.setComment(R"(This Service provides CMSSW-aware annotations to nvprof/nvvm.
500 
501 Notes:
502  - the option '--cpu-profiling on' currently results in cmsRun being stuck at the beginning of the job.
503  - the option '--cpu-thread-tracing on' is not compatible with jemalloc, and should only be used with cmsRunGlibC.)");
504 }
505 
506 void
508  std::stringstream out;
509  out << "preallocate: " << bounds.maxNumberOfConcurrentRuns() << " concurrent runs, "
510  << bounds.maxNumberOfConcurrentLuminosityBlocks() << " luminosity sections, "
511  << bounds.maxNumberOfStreams() << " streams\nrunning on"
512  << bounds.maxNumberOfThreads() << " threads";
513  nvtxDomainMark(global_domain(), out.str().c_str());
514 
516  for (auto& domain: domains_) {
517  domain.allocate_streams(concurrentStreams_);
518  }
519  event_.resize(concurrentStreams_);
520  stream_modules_.resize(concurrentStreams_);
521 }
522 
523 void
525  nvtxDomainMark(global_domain(), "preBeginJob");
526 
527  // FIXME this probably works only in the absence of subprocesses
528  unsigned int modules = pathsAndConsumes.allModules().size();
529  global_modules_.resize(modules);
530  for (unsigned int sid = 0; sid < concurrentStreams_; ++sid) {
531  stream_modules_[sid].resize(modules);
532  }
533 }
534 
535 void
537  nvtxDomainMark(global_domain(), "postBeginJob");
538 }
539 
540 void
542  nvtxDomainMark(global_domain(), "postEndJob");
543 }
544 
545 void
547  nvtxDomainRangePush(stream_domain(sid), "source");
548 }
549 
550 void
552  nvtxDomainRangePop(stream_domain(sid));
553 }
554 
555 void
557  nvtxDomainRangePush(global_domain(), "source lumi");
558 }
559 
560 void
562  nvtxDomainRangePop(global_domain());
563 }
564 
565 void
567  nvtxDomainRangePush(global_domain(), "source run");
568 }
569 
570 void
572  nvtxDomainRangePop(global_domain());
573 }
574 
575 void
577  nvtxDomainRangePush(global_domain(), ("open file "s + lfn).c_str());
578 }
579 
580 void
582  nvtxDomainRangePop(global_domain());
583 }
584 
585 void
587  nvtxDomainRangePush(global_domain(), ("close file "s + lfn).c_str());
588 }
589 
590 void
592  nvtxDomainRangePop(global_domain());
593 }
594 
595 void
597  auto sid = sc.streamID();
598  auto mid = mcc.moduleDescription()->id();
599  auto const & label = mcc.moduleDescription()->moduleLabel();
600  auto const & msg = label + " begin stream";
601  if (highlight(label))
602  stream_modules_[sid][mid] = nvtxDomainRangeStartColor(stream_domain(sid), msg.c_str(), nvtxAmber);
603  else
604  stream_modules_[sid][mid] = nvtxDomainRangeStartColor(stream_domain(sid), msg.c_str(), nvtxGreen);;
605 }
606 
607 void
609  auto sid = sc.streamID();
610  auto mid = mcc.moduleDescription()->id();
611  nvtxDomainRangeEnd(stream_domain(sid), stream_modules_[sid][mid]);
612 }
613 
614 void
616  auto sid = sc.streamID();
617  auto mid = mcc.moduleDescription()->id();
618  auto const & label = mcc.moduleDescription()->moduleLabel();
619  auto const & msg = label + " end stream";
620  if (highlight(label))
621  stream_modules_[sid][mid] = nvtxDomainRangeStartColor(stream_domain(sid), msg.c_str(), nvtxAmber);
622  else
623  stream_modules_[sid][mid] = nvtxDomainRangeStartColor(stream_domain(sid), msg.c_str(), nvtxGreen);;
624 }
625 
626 void
628  auto sid = sc.streamID();
629  auto mid = mcc.moduleDescription()->id();
630  nvtxDomainRangeEnd(stream_domain(sid), stream_modules_[sid][mid]);
631 }
632 
633 void
635  nvtxDomainRangePush(global_domain(), "global begin run");
636 }
637 
638 void
640  nvtxDomainRangePop(global_domain());
641 }
642 
643 void
645  nvtxDomainRangePush(global_domain(), "global end run");
646 }
647 
648 void
650  nvtxDomainRangePop(global_domain());
651 }
652 
653 void
655  auto sid = sc.streamID();
656  nvtxDomainRangePush(stream_domain(sid), "stream begin run");
657 }
658 
659 void
661  auto sid = sc.streamID();
662  nvtxDomainRangePop(stream_domain(sid));
663 }
664 
665 void
667  auto sid = sc.streamID();
668  nvtxDomainRangePush(stream_domain(sid), "stream end run");
669 }
670 
671 void
673  auto sid = sc.streamID();
674  nvtxDomainRangePop(stream_domain(sid));
675 }
676 
677 void
679  nvtxDomainRangePush(global_domain(), "global begin lumi");
680 }
681 
682 void
684  nvtxDomainRangePop(global_domain());
685 }
686 
687 void
689  nvtxDomainRangePush(global_domain(), "global end lumi");
690 }
691 
692 void
694  nvtxDomainRangePop(global_domain());
695 }
696 
697 void
699  auto sid = sc.streamID();
700  nvtxDomainRangePush(stream_domain(sid), "stream begin lumi");
701 }
702 
703 void
705  auto sid = sc.streamID();
706  nvtxDomainRangePop(stream_domain(sid));
707 }
708 
709 void
711  auto sid = sc.streamID();
712  nvtxDomainRangePush(stream_domain(sid), "stream end lumi");
713 }
714 
715 void
717  auto sid = sc.streamID();
718  nvtxDomainRangePop(stream_domain(sid));
719 }
720 
721 void
723  auto sid = sc.streamID();
724  event_[sid] = nvtxDomainRangeStartColor(stream_domain(sid), "event", nvtxDarkGreen);
725 }
726 
727 void
729  auto sid = sc.streamID();
730  nvtxDomainRangeEnd(stream_domain(sid), event_[sid]);
731 }
732 
733 void
735  auto sid = sc.streamID();
736  nvtxDomainMark(global_domain(), ("before path "s + pc.pathName()).c_str());
737 }
738 
739 void
741  auto sid = sc.streamID();
742  nvtxDomainMark(global_domain(), ("after path "s + pc.pathName()).c_str());
743 }
744 
745 void
748  auto sid = sc.streamID();
749  auto mid = mcc.moduleDescription()->id();
750  auto const & label = mcc.moduleDescription()->moduleLabel();
751  auto const & msg = label + " prefetching";
752  if (highlight(label))
753  stream_modules_[sid][mid] = nvtxDomainRangeStartColor(stream_domain(sid), msg.c_str(), nvtxLightAmber);
754  else
755  stream_modules_[sid][mid] = nvtxDomainRangeStartColor(stream_domain(sid), msg.c_str(), nvtxLightGreen);
756  }
757 }
758 
759 void
762  auto sid = sc.streamID();
763  auto mid = mcc.moduleDescription()->id();
764  nvtxDomainRangeEnd(stream_domain(sid), stream_modules_[sid][mid]);
765  }
766 }
767 
768 void
770  auto mid = desc.id();
771  global_modules_.grow_to_at_least(mid+1);
772  auto const & label = desc.moduleLabel();
773  auto const & msg = label + " construction";
774  if (highlight(label))
775  global_modules_[mid] = nvtxDomainRangeStartColor(global_domain(), msg.c_str(), nvtxAmber);
776  else
777  global_modules_[mid] = nvtxDomainRangeStartColor(global_domain(), msg.c_str(), nvtxGreen);;
778 }
779 
780 void
782  auto mid = desc.id();
783  nvtxDomainRangeEnd(global_domain(), global_modules_[mid]);
784 }
785 
786 void
788  auto mid = desc.id();
789  auto const & label = desc.moduleLabel();
790  auto const & msg = label + " begin job";
791  if (highlight(label))
792  global_modules_[mid] = nvtxDomainRangeStartColor(global_domain(), msg.c_str(), nvtxAmber);
793  else
794  global_modules_[mid] = nvtxDomainRangeStartColor(global_domain(), msg.c_str(), nvtxGreen);;
795 }
796 
797 void
799  auto mid = desc.id();
800  nvtxDomainRangeEnd(global_domain(), global_modules_[mid]);
801 }
802 
803 void
805  auto mid = desc.id();
806  auto const & label = desc.moduleLabel();
807  auto const & msg = label + " end job";
808  if (highlight(label))
809  global_modules_[mid] = nvtxDomainRangeStartColor(global_domain(), msg.c_str(), nvtxAmber);
810  else
811  global_modules_[mid] = nvtxDomainRangeStartColor(global_domain(), msg.c_str(), nvtxGreen);;
812 }
813 
814 void
816  auto mid = desc.id();
817  nvtxDomainRangeEnd(global_domain(), global_modules_[mid]);
818 }
819 
820 void
822  auto sid = sc.streamID();
823  auto mid = mcc.moduleDescription()->id();
824  auto const & label = mcc.moduleDescription()->moduleLabel();
825  auto const & msg = label + " acquire";
826  if (highlight(label))
827  stream_modules_[sid][mid] = nvtxDomainRangeStartColor(stream_domain(sid), msg.c_str(), nvtxAmber);
828  else
829  stream_modules_[sid][mid] = nvtxDomainRangeStartColor(stream_domain(sid), msg.c_str(), nvtxGreen);;
830 }
831 
832 void
834  auto sid = sc.streamID();
835  auto mid = mcc.moduleDescription()->id();
836  nvtxDomainRangeEnd(stream_domain(sid), stream_modules_[sid][mid]);
837 }
838 
839 void
841  auto sid = sc.streamID();
842  auto mid = mcc.moduleDescription()->id();
843  auto const & label = mcc.moduleDescription()->moduleLabel();
844  if (highlight(label))
845  stream_modules_[sid][mid] = nvtxDomainRangeStartColor(stream_domain(sid), label.c_str(), nvtxAmber);
846  else
847  stream_modules_[sid][mid] = nvtxDomainRangeStartColor(stream_domain(sid), label.c_str(), nvtxGreen);;
848 }
849 
850 void
852  auto sid = sc.streamID();
853  auto mid = mcc.moduleDescription()->id();
854  nvtxDomainRangeEnd(stream_domain(sid), stream_modules_[sid][mid]);
855 }
856 
857 void
859  /* FIXME
860  auto sid = sc.streamID();
861  auto mid = mcc.moduleDescription()->id();
862  auto const & label = mcc.moduleDescription()->moduleLabel();
863  auto const & msg = label + " delayed get";
864  if (highlight(label))
865  stream_modules_[sid][mid] = nvtxDomainRangeStartColor(stream_domain(sid), label.c_str(), nvtxAmber);
866  else
867  stream_modules_[sid][mid] = nvtxDomainRangeStartColor(stream_domain(sid), label.c_str(), nvtxGreen);;
868  */
869 }
870 
871 void
873  /* FIXME
874  auto sid = sc.streamID();
875  auto mid = mcc.moduleDescription()->id();
876  nvtxDomainRangeEnd(stream_domain(sid), stream_modules_[sid][mid]);
877  */
878 }
879 
880 void
882  /* FIXME
883  auto sid = sc.streamID();
884  auto mid = mcc.moduleDescription()->id();
885  auto const & label = mcc.moduleDescription()->moduleLabel();
886  auto const & msg = label + " read from source";
887  if (highlight(label))
888  stream_modules_[sid][mid] = nvtxDomainRangeStartColor(stream_domain(sid), msg.c_str(), nvtxAmber);
889  else
890  stream_modules_[sid][mid] = nvtxDomainRangeStartColor(stream_domain(sid), msg.c_str(), nvtxGreen);;
891  */
892 }
893 
894 void
896  /* FIXME
897  auto sid = sc.streamID();
898  auto mid = mcc.moduleDescription()->id();
899  nvtxDomainRangeEnd(stream_domain(sid), stream_modules_[sid][mid]);
900  */
901 }
902 
903 void
905  auto sid = sc.streamID();
906  auto mid = mcc.moduleDescription()->id();
907  auto const & label = mcc.moduleDescription()->moduleLabel();
908  auto const & msg = label + " stream begin run";
909  if (highlight(label))
910  stream_modules_[sid][mid] = nvtxDomainRangeStartColor(stream_domain(sid), msg.c_str(), nvtxAmber);
911  else
912  stream_modules_[sid][mid] = nvtxDomainRangeStartColor(stream_domain(sid), msg.c_str(), nvtxGreen);;
913 }
914 
915 void
917  auto sid = sc.streamID();
918  auto mid = mcc.moduleDescription()->id();
919  nvtxDomainRangeEnd(stream_domain(sid), stream_modules_[sid][mid]);
920 }
921 
922 void
924  auto sid = sc.streamID();
925  auto mid = mcc.moduleDescription()->id();
926  auto const & label = mcc.moduleDescription()->moduleLabel();
927  auto const & msg = label + " stream end run";
928  if (highlight(label))
929  stream_modules_[sid][mid] = nvtxDomainRangeStartColor(stream_domain(sid), msg.c_str(), nvtxAmber);
930  else
931  stream_modules_[sid][mid] = nvtxDomainRangeStartColor(stream_domain(sid), msg.c_str(), nvtxGreen);;
932 }
933 
934 void
936  auto sid = sc.streamID();
937  auto mid = mcc.moduleDescription()->id();
938  nvtxDomainRangeEnd(stream_domain(sid), stream_modules_[sid][mid]);
939 }
940 
941 void
943  auto sid = sc.streamID();
944  auto mid = mcc.moduleDescription()->id();
945  auto const & label = mcc.moduleDescription()->moduleLabel();
946  auto const & msg = label + " stream begin lumi";
947  if (highlight(label))
948  stream_modules_[sid][mid] = nvtxDomainRangeStartColor(stream_domain(sid), msg.c_str(), nvtxAmber);
949  else
950  stream_modules_[sid][mid] = nvtxDomainRangeStartColor(stream_domain(sid), msg.c_str(), nvtxGreen);;
951 }
952 
953 void
955  auto sid = sc.streamID();
956  auto mid = mcc.moduleDescription()->id();
957  nvtxDomainRangeEnd(stream_domain(sid), stream_modules_[sid][mid]);
958 }
959 
960 void
962  auto sid = sc.streamID();
963  auto mid = mcc.moduleDescription()->id();
964  auto const & label = mcc.moduleDescription()->moduleLabel();
965  auto const & msg = label + " stream end lumi";
966  if (highlight(label))
967  stream_modules_[sid][mid] = nvtxDomainRangeStartColor(stream_domain(sid), msg.c_str(), nvtxAmber);
968  else
969  stream_modules_[sid][mid] = nvtxDomainRangeStartColor(stream_domain(sid), msg.c_str(), nvtxGreen);;
970 }
971 
972 void
974  auto sid = sc.streamID();
975  auto mid = mcc.moduleDescription()->id();
976  nvtxDomainRangeEnd(stream_domain(sid), stream_modules_[sid][mid]);
977 }
978 
979 void
981  auto mid = mcc.moduleDescription()->id();
982  auto const & label = mcc.moduleDescription()->moduleLabel();
983  auto const & msg = label + " global begin run";
984  if (highlight(label))
985  global_modules_[mid] = nvtxDomainRangeStartColor(global_domain(), msg.c_str(), nvtxAmber);
986  else
987  global_modules_[mid] = nvtxDomainRangeStartColor(global_domain(), msg.c_str(), nvtxGreen);;
988 }
989 
990 void
992  auto mid = mcc.moduleDescription()->id();
993  nvtxDomainRangeEnd(global_domain(), global_modules_[mid]);
994 }
995 
996 void
998  auto mid = mcc.moduleDescription()->id();
999  auto const & label = mcc.moduleDescription()->moduleLabel();
1000  auto const & msg = label + " global end run";
1001  if (highlight(label))
1002  global_modules_[mid] = nvtxDomainRangeStartColor(global_domain(), msg.c_str(), nvtxAmber);
1003  else
1004  global_modules_[mid] = nvtxDomainRangeStartColor(global_domain(), msg.c_str(), nvtxGreen);;
1005 }
1006 
1007 void
1009  auto mid = mcc.moduleDescription()->id();
1010  nvtxDomainRangeEnd(global_domain(), global_modules_[mid]);
1011 }
1012 
1013 void
1015  auto mid = mcc.moduleDescription()->id();
1016  auto const & label = mcc.moduleDescription()->moduleLabel();
1017  auto const & msg = label + " global begin lumi";
1018  if (highlight(label))
1019  global_modules_[mid] = nvtxDomainRangeStartColor(global_domain(), msg.c_str(), nvtxAmber);
1020  else
1021  global_modules_[mid] = nvtxDomainRangeStartColor(global_domain(), msg.c_str(), nvtxGreen);;
1022 }
1023 
1024 void
1026  auto mid = mcc.moduleDescription()->id();
1027  nvtxDomainRangeEnd(global_domain(), global_modules_[mid]);
1028 }
1029 
1030 void
1032  auto mid = mcc.moduleDescription()->id();
1033  auto const & label = mcc.moduleDescription()->moduleLabel();
1034  auto const & msg = label + " global end lumi";
1035  if (highlight(label))
1036  global_modules_[mid] = nvtxDomainRangeStartColor(global_domain(), msg.c_str(), nvtxAmber);
1037  else
1038  global_modules_[mid] = nvtxDomainRangeStartColor(global_domain(), msg.c_str(), nvtxGreen);;
1039 }
1040 
1041 void
1043  auto mid = mcc.moduleDescription()->id();
1044  nvtxDomainRangeEnd(global_domain(), global_modules_[mid]);
1045 }
1046 
1047 void
1049  auto mid = desc.id();
1050  global_modules_.grow_to_at_least(mid+1);
1051  auto const & label = desc.moduleLabel();
1052  auto const & msg = label + " construction";
1053  if (highlight(label))
1054  global_modules_[mid] = nvtxDomainRangeStartColor(global_domain(), msg.c_str(), nvtxAmber);
1055  else
1056  global_modules_[mid] = nvtxDomainRangeStartColor(global_domain(), msg.c_str(), nvtxGreen);;
1057 }
1058 
1059 void
1061  auto mid = desc.id();
1062  nvtxDomainRangeEnd(global_domain(), global_modules_[mid]);
1063 }
1064 
void watchPostModuleGlobalEndLumi(PostModuleGlobalEndLumi::slot_type const &iSlot)
void watchPostModuleConstruction(PostModuleConstruction::slot_type const &iSlot)
std::string const & pathName() const
Definition: PathContext.h:37
unsigned int maxNumberOfThreads() const
Definition: SystemBounds.h:46
void watchPreModuleGlobalBeginRun(PreModuleGlobalBeginRun::slot_type const &iSlot)
void watchPreEvent(PreEvent::slot_type const &iSlot)
void postStreamEndLumi(edm::StreamContext const &)
void preOpenFile(std::string const &, bool)
void preModuleEventPrefetching(edm::StreamContext const &, edm::ModuleCallingContext const &)
void preGlobalBeginRun(edm::GlobalContext const &)
void postGlobalEndRun(edm::GlobalContext const &)
void preGlobalEndLumi(edm::GlobalContext const &)
void postOpenFile(std::string const &, bool)
void postModuleEventDelayedGet(edm::StreamContext const &, edm::ModuleCallingContext const &)
void postModuleStreamBeginLumi(edm::StreamContext const &, edm::ModuleCallingContext const &)
void watchPrePathEvent(PrePathEvent::slot_type const &iSlot)
void watchPreallocate(Preallocate::slot_type const &iSlot)
void postModuleEvent(edm::StreamContext const &, edm::ModuleCallingContext const &)
ParameterDescriptionBase * addUntracked(U const &iLabel, T const &value)
tbb::enumerable_thread_specific< Domains > domains_
void watchPreModuleEventAcquire(PreModuleEventAcquire::slot_type const &iSlot)
void watchPostEndJob(PostEndJob::slot_type const &iSlot)
void preModuleEndStream(edm::StreamContext const &, edm::ModuleCallingContext const &)
void preModuleEventAcquire(edm::StreamContext const &, edm::ModuleCallingContext const &)
void watchPostModuleEndStream(PostModuleEndStream::slot_type const &iSlot)
void postCloseFile(std::string const &, bool)
void watchPreModuleEvent(PreModuleEvent::slot_type const &iSlot)
void postModuleEventAcquire(edm::StreamContext const &, edm::ModuleCallingContext const &)
void watchPreModuleConstruction(PreModuleConstruction::slot_type const &iSlot)
void watchPreGlobalEndLumi(PreGlobalEndLumi::slot_type const &iSlot)
void watchPostEvent(PostEvent::slot_type const &iSlot)
void preStreamBeginLumi(edm::StreamContext const &)
void preModuleEvent(edm::StreamContext const &, edm::ModuleCallingContext const &)
Domains(NVProfilerService *service)
void watchPreStreamEndRun(PreStreamEndRun::slot_type const &iSlot)
void watchPreSourceConstruction(PreSourceConstruction::slot_type const &iSlot)
void preSourceRun(edm::RunIndex)
void watchPostSourceConstruction(PostSourceConstruction::slot_type const &iSlot)
void watchPostStreamEndLumi(PostStreamEndLumi::slot_type const &iSlot)
void watchPreGlobalBeginLumi(PreGlobalBeginLumi::slot_type const &iSlot)
void preModuleStreamBeginLumi(edm::StreamContext const &, edm::ModuleCallingContext const &)
void postSourceConstruction(edm::ModuleDescription const &)
void preModuleStreamBeginRun(edm::StreamContext const &, edm::ModuleCallingContext const &)
void watchPreEventReadFromSource(PreEventReadFromSource::slot_type const &iSlot)
void watchPostPathEvent(PostPathEvent::slot_type const &iSlot)
float __attribute__((vector_size(8))) cms_float32x2_t
Definition: ExtVec.h:12
void watchPostModuleEvent(PostModuleEvent::slot_type const &iSlot)
void watchPostModuleGlobalBeginLumi(PostModuleGlobalBeginLumi::slot_type const &iSlot)
void preCloseFile(std::string const &, bool)
void watchPostModuleStreamEndLumi(PostModuleStreamEndLumi::slot_type const &iSlot)
void watchPostGlobalBeginLumi(PostGlobalBeginLumi::slot_type const &iSlot)
void watchPostModuleStreamBeginRun(PostModuleStreamBeginRun::slot_type const &iSlot)
void watchPostSourceEvent(PostSourceEvent::slot_type const &iSlot)
nvtxDomainHandle_t global_domain()
void postStreamEndRun(edm::StreamContext const &)
std::vector< nvtxDomainHandle_t > stream
Definition: config.py:1
std::vector< std::vector< nvtxRangeId_t > > stream_modules_
void postModuleEndJob(edm::ModuleDescription const &)
void postGlobalEndLumi(edm::GlobalContext const &)
void preModuleEndJob(edm::ModuleDescription const &)
void preModuleGlobalBeginLumi(edm::GlobalContext const &, edm::ModuleCallingContext const &)
void watchPreModuleBeginStream(PreModuleBeginStream::slot_type const &iSlot)
void preGlobalBeginLumi(edm::GlobalContext const &)
void postSourceLumi(edm::LuminosityBlockIndex)
void watchPreStreamEndLumi(PreStreamEndLumi::slot_type const &iSlot)
std::string const & moduleLabel() const
void watchPreModuleGlobalEndRun(PreModuleGlobalEndRun::slot_type const &iSlot)
void watchPreModuleEventPrefetching(PreModuleEventPrefetching::slot_type const &iSlot)
void preModuleStreamEndLumi(edm::StreamContext const &, edm::ModuleCallingContext const &)
void postModuleConstruction(edm::ModuleDescription const &)
std::vector< ModuleDescription const * > const & allModules() const
void postModuleEventPrefetching(edm::StreamContext const &, edm::ModuleCallingContext const &)
void preModuleGlobalBeginRun(edm::GlobalContext const &, edm::ModuleCallingContext const &)
void preGlobalEndRun(edm::GlobalContext const &)
void postSourceEvent(edm::StreamID)
void watchPostModuleEventPrefetching(PostModuleEventPrefetching::slot_type const &iSlot)
void preStreamEndRun(edm::StreamContext const &)
unsigned int maxNumberOfStreams() const
Definition: SystemBounds.h:43
void postModuleGlobalEndLumi(edm::GlobalContext const &, edm::ModuleCallingContext const &)
void watchPreOpenFile(PreOpenFile::slot_type const &iSlot)
void watchPostGlobalBeginRun(PostGlobalBeginRun::slot_type const &iSlot)
void watchPostCloseFile(PostCloseFile::slot_type const &iSlot)
void watchPreGlobalEndRun(PreGlobalEndRun::slot_type const &iSlot)
void preModuleEventDelayedGet(edm::StreamContext const &, edm::ModuleCallingContext const &)
void watchPostSourceRun(PostSourceRun::slot_type const &iSlot)
void watchPostStreamBeginLumi(PostStreamBeginLumi::slot_type const &iSlot)
void preSourceConstruction(edm::ModuleDescription const &)
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
void watchPreSourceLumi(PreSourceLumi::slot_type const &iSlot)
void postModuleGlobalEndRun(edm::GlobalContext const &, edm::ModuleCallingContext const &)
void watchPreModuleEventDelayedGet(PreModuleEventDelayedGet::slot_type const &iSlot)
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
ModuleDescription const * moduleDescription() const
void preModuleGlobalEndRun(edm::GlobalContext const &, edm::ModuleCallingContext const &)
void preBeginJob(edm::PathsAndConsumesOfModulesBase const &, edm::ProcessContext const &)
void watchPostModuleEventAcquire(PostModuleEventAcquire::slot_type const &iSlot)
void watchPreModuleEndJob(PreModuleEndJob::slot_type const &iSlot)
void postPathEvent(edm::StreamContext const &, edm::PathContext const &, edm::HLTPathStatus const &)
void postStreamBeginLumi(edm::StreamContext const &)
void preStreamEndLumi(edm::StreamContext const &)
void watchPostGlobalEndLumi(PostGlobalEndLumi::slot_type const &iSlot)
format
Some error handling for the usage.
void watchPreSourceRun(PreSourceRun::slot_type const &iSlot)
void preModuleBeginJob(edm::ModuleDescription const &)
void watchPreModuleBeginJob(PreModuleBeginJob::slot_type const &iSlot)
void postGlobalBeginLumi(edm::GlobalContext const &)
void watchPostStreamEndRun(PostStreamEndRun::slot_type const &iSlot)
tbb::concurrent_vector< nvtxRangeId_t > global_modules_
std::vector< nvtxRangeId_t > event_
void postEventReadFromSource(edm::StreamContext const &, edm::ModuleCallingContext const &)
void postModuleBeginStream(edm::StreamContext const &, edm::ModuleCallingContext const &)
void watchPostModuleStreamEndRun(PostModuleStreamEndRun::slot_type const &iSlot)
void watchPreModuleGlobalBeginLumi(PreModuleGlobalBeginLumi::slot_type const &iSlot)
void postModuleGlobalBeginRun(edm::GlobalContext const &, edm::ModuleCallingContext const &)
void preModuleBeginStream(edm::StreamContext const &, edm::ModuleCallingContext const &)
StreamID const & streamID() const
Definition: StreamContext.h:57
void preSourceEvent(edm::StreamID)
void watchPreGlobalBeginRun(PreGlobalBeginRun::slot_type const &iSlot)
void watchPreModuleStreamBeginLumi(PreModuleStreamBeginLumi::slot_type const &iSlot)
#define DEFINE_FWK_SERVICE(type)
Definition: ServiceMaker.h:113
void setComment(std::string const &value)
void watchPostModuleBeginStream(PostModuleBeginStream::slot_type const &iSlot)
void allocate_streams(unsigned int streams)
void preModuleConstruction(edm::ModuleDescription const &)
unsigned int maxNumberOfConcurrentLuminosityBlocks() const
Definition: SystemBounds.h:45
void watchPostSourceLumi(PostSourceLumi::slot_type const &iSlot)
NVProfilerService(const edm::ParameterSet &, edm::ActivityRegistry &)
unsigned int concurrentStreams_
void watchPreCloseFile(PreCloseFile::slot_type const &iSlot)
void watchPostModuleEventDelayedGet(PostModuleEventDelayedGet::slot_type const &iSlot)
void watchPostModuleGlobalEndRun(PostModuleGlobalEndRun::slot_type const &iSlot)
void watchPostModuleStreamBeginLumi(PostModuleStreamBeginLumi::slot_type const &iSlot)
void preStreamBeginRun(edm::StreamContext const &)
void postModuleStreamBeginRun(edm::StreamContext const &, edm::ModuleCallingContext const &)
void preModuleStreamEndRun(edm::StreamContext const &, edm::ModuleCallingContext const &)
void watchPreModuleStreamEndLumi(PreModuleStreamEndLumi::slot_type const &iSlot)
void watchPreModuleStreamBeginRun(PreModuleStreamBeginRun::slot_type const &iSlot)
void watchPostGlobalEndRun(PostGlobalEndRun::slot_type const &iSlot)
void watchPreStreamBeginLumi(PreStreamBeginLumi::slot_type const &iSlot)
void add(std::string const &label, ParameterSetDescription const &psetDescription)
void watchPostOpenFile(PostOpenFile::slot_type const &iSlot)
tuple msg
Definition: mps_check.py:277
void watchPreModuleEndStream(PreModuleEndStream::slot_type const &iSlot)
void postGlobalBeginRun(edm::GlobalContext const &)
void watchPreBeginJob(PreBeginJob::slot_type const &iSlot)
convenience function for attaching to signal
void postModuleStreamEndLumi(edm::StreamContext const &, edm::ModuleCallingContext const &)
void postEvent(edm::StreamContext const &)
void watchPostStreamBeginRun(PostStreamBeginRun::slot_type const &iSlot)
void postSourceRun(edm::RunIndex)
void watchPreStreamBeginRun(PreStreamBeginRun::slot_type const &iSlot)
void preallocate(edm::service::SystemBounds const &)
void watchPreModuleStreamEndRun(PreModuleStreamEndRun::slot_type const &iSlot)
void postModuleEndStream(edm::StreamContext const &, edm::ModuleCallingContext const &)
void preSourceLumi(edm::LuminosityBlockIndex)
void watchPostModuleBeginJob(PostModuleBeginJob::slot_type const &iSlot)
bool highlight(std::string const &)
void watchPostEventReadFromSource(PostEventReadFromSource::slot_type const &iSlot)
void watchPostModuleGlobalBeginRun(PostModuleGlobalBeginRun::slot_type const &iSlot)
void preEventReadFromSource(edm::StreamContext const &, edm::ModuleCallingContext const &)
unsigned int maxNumberOfConcurrentRuns() const
Definition: SystemBounds.h:44
nvtxDomainHandle_t stream_domain(unsigned int sid)
void preEvent(edm::StreamContext const &)
void preModuleGlobalEndLumi(edm::GlobalContext const &, edm::ModuleCallingContext const &)
void watchPreSourceEvent(PreSourceEvent::slot_type const &iSlot)
void postStreamBeginRun(edm::StreamContext const &)
void prePathEvent(edm::StreamContext const &, edm::PathContext const &)
static Interceptor::Registry registry("Interceptor")
#define str(s)
void postModuleStreamEndRun(edm::StreamContext const &, edm::ModuleCallingContext const &)
void postModuleGlobalBeginLumi(edm::GlobalContext const &, edm::ModuleCallingContext const &)
void watchPostModuleEndJob(PostModuleEndJob::slot_type const &iSlot)
std::vector< std::string > highlightModules_
void watchPreModuleGlobalEndLumi(PreModuleGlobalEndLumi::slot_type const &iSlot)
unsigned int id() const
void postModuleBeginJob(edm::ModuleDescription const &)
void watchPostBeginJob(PostBeginJob::slot_type const &iSlot)
convenience function for attaching to signal