CMS 3D CMS Logo

List of all members | Classes | Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes | Friends
NVProfilerService Class Reference

Classes

struct  Domains
 

Public Member Functions

 NVProfilerService (const edm::ParameterSet &, edm::ActivityRegistry &)
 
void postBeginJob ()
 
void postCloseFile (std::string const &, bool)
 
void postEndJob ()
 
void postEvent (edm::StreamContext const &)
 
void postEventReadFromSource (edm::StreamContext const &, edm::ModuleCallingContext const &)
 
void postGlobalBeginLumi (edm::GlobalContext const &)
 
void postGlobalBeginRun (edm::GlobalContext const &)
 
void postGlobalEndLumi (edm::GlobalContext const &)
 
void postGlobalEndRun (edm::GlobalContext const &)
 
void postModuleBeginJob (edm::ModuleDescription const &)
 
void postModuleBeginStream (edm::StreamContext const &, edm::ModuleCallingContext const &)
 
void postModuleConstruction (edm::ModuleDescription const &)
 
void postModuleEndJob (edm::ModuleDescription const &)
 
void postModuleEndStream (edm::StreamContext const &, edm::ModuleCallingContext const &)
 
void postModuleEvent (edm::StreamContext const &, edm::ModuleCallingContext const &)
 
void postModuleEventDelayedGet (edm::StreamContext const &, edm::ModuleCallingContext const &)
 
void postModuleEventPrefetching (edm::StreamContext const &, edm::ModuleCallingContext const &)
 
void postModuleGlobalBeginLumi (edm::GlobalContext const &, edm::ModuleCallingContext const &)
 
void postModuleGlobalBeginRun (edm::GlobalContext const &, edm::ModuleCallingContext const &)
 
void postModuleGlobalEndLumi (edm::GlobalContext const &, edm::ModuleCallingContext const &)
 
void postModuleGlobalEndRun (edm::GlobalContext const &, edm::ModuleCallingContext const &)
 
void postModuleStreamBeginLumi (edm::StreamContext const &, edm::ModuleCallingContext const &)
 
void postModuleStreamBeginRun (edm::StreamContext const &, edm::ModuleCallingContext const &)
 
void postModuleStreamEndLumi (edm::StreamContext const &, edm::ModuleCallingContext const &)
 
void postModuleStreamEndRun (edm::StreamContext const &, edm::ModuleCallingContext const &)
 
void postOpenFile (std::string const &, bool)
 
void postPathEvent (edm::StreamContext const &, edm::PathContext const &, edm::HLTPathStatus const &)
 
void postSourceConstruction (edm::ModuleDescription const &)
 
void postSourceEvent (edm::StreamID)
 
void postSourceLumi ()
 
void postSourceRun ()
 
void postStreamBeginLumi (edm::StreamContext const &)
 
void postStreamBeginRun (edm::StreamContext const &)
 
void postStreamEndLumi (edm::StreamContext const &)
 
void postStreamEndRun (edm::StreamContext const &)
 
void preallocate (edm::service::SystemBounds const &)
 
void preBeginJob (edm::PathsAndConsumesOfModulesBase const &, edm::ProcessContext const &)
 
void preCloseFile (std::string const &, bool)
 
void preEvent (edm::StreamContext const &)
 
void preEventReadFromSource (edm::StreamContext const &, edm::ModuleCallingContext const &)
 
void preGlobalBeginLumi (edm::GlobalContext const &)
 
void preGlobalBeginRun (edm::GlobalContext const &)
 
void preGlobalEndLumi (edm::GlobalContext const &)
 
void preGlobalEndRun (edm::GlobalContext const &)
 
void preModuleBeginJob (edm::ModuleDescription const &)
 
void preModuleBeginStream (edm::StreamContext const &, edm::ModuleCallingContext const &)
 
void preModuleConstruction (edm::ModuleDescription const &)
 
void preModuleEndJob (edm::ModuleDescription const &)
 
void preModuleEndStream (edm::StreamContext const &, edm::ModuleCallingContext const &)
 
void preModuleEvent (edm::StreamContext const &, edm::ModuleCallingContext const &)
 
void preModuleEventDelayedGet (edm::StreamContext const &, edm::ModuleCallingContext const &)
 
void preModuleEventPrefetching (edm::StreamContext const &, edm::ModuleCallingContext const &)
 
void preModuleGlobalBeginLumi (edm::GlobalContext const &, edm::ModuleCallingContext const &)
 
void preModuleGlobalBeginRun (edm::GlobalContext const &, edm::ModuleCallingContext const &)
 
void preModuleGlobalEndLumi (edm::GlobalContext const &, edm::ModuleCallingContext const &)
 
void preModuleGlobalEndRun (edm::GlobalContext const &, edm::ModuleCallingContext const &)
 
void preModuleStreamBeginLumi (edm::StreamContext const &, edm::ModuleCallingContext const &)
 
void preModuleStreamBeginRun (edm::StreamContext const &, edm::ModuleCallingContext const &)
 
void preModuleStreamEndLumi (edm::StreamContext const &, edm::ModuleCallingContext const &)
 
void preModuleStreamEndRun (edm::StreamContext const &, edm::ModuleCallingContext const &)
 
void preOpenFile (std::string const &, bool)
 
void prePathEvent (edm::StreamContext const &, edm::PathContext const &)
 
void preSourceConstruction (edm::ModuleDescription const &)
 
void preSourceEvent (edm::StreamID)
 
void preSourceLumi ()
 
void preSourceRun ()
 
void preStreamBeginLumi (edm::StreamContext const &)
 
void preStreamBeginRun (edm::StreamContext const &)
 
void preStreamEndLumi (edm::StreamContext const &)
 
void preStreamEndRun (edm::StreamContext const &)
 
 ~NVProfilerService ()
 

Static Public Member Functions

static void fillDescriptions (edm::ConfigurationDescriptions &descriptions)
 

Private Member Functions

nvtxDomainHandle_t global_domain ()
 
bool highlight (std::string const &)
 
nvtxDomainHandle_t stream_domain (unsigned int sid)
 

Private Attributes

unsigned int concurrentStreams_
 
tbb::enumerable_thread_specific< Domainsdomains_
 
std::vector< nvtxRangeId_t > event_
 
tbb::concurrent_vector< nvtxRangeId_t > global_modules_
 
std::vector< std::string > highlightModules_
 
std::vector< std::vector< nvtxRangeId_t > > stream_modules_
 

Friends

struct Domains
 

Detailed Description

Definition at line 120 of file NVProfilerService.cc.

Constructor & Destructor Documentation

NVProfilerService::NVProfilerService ( const edm::ParameterSet ,
edm::ActivityRegistry  
)

Definition at line 319 of file NVProfilerService.cc.

References highlightModules_, postBeginJob(), postCloseFile(), postEndJob(), postEvent(), postEventReadFromSource(), postGlobalBeginLumi(), postGlobalBeginRun(), postGlobalEndLumi(), postGlobalEndRun(), postModuleBeginJob(), postModuleBeginStream(), postModuleConstruction(), postModuleEndJob(), postModuleEndStream(), postModuleEvent(), postModuleEventDelayedGet(), postModuleEventPrefetching(), postModuleGlobalBeginLumi(), postModuleGlobalBeginRun(), postModuleGlobalEndLumi(), postModuleGlobalEndRun(), postModuleStreamBeginLumi(), postModuleStreamBeginRun(), postModuleStreamEndLumi(), postModuleStreamEndRun(), postOpenFile(), postPathEvent(), postSourceConstruction(), postSourceEvent(), postSourceLumi(), postSourceRun(), postStreamBeginLumi(), postStreamBeginRun(), postStreamEndLumi(), postStreamEndRun(), preallocate(), preBeginJob(), preCloseFile(), preEvent(), preEventReadFromSource(), preGlobalBeginLumi(), preGlobalBeginRun(), preGlobalEndLumi(), preGlobalEndRun(), preModuleBeginJob(), preModuleBeginStream(), preModuleConstruction(), preModuleEndJob(), preModuleEndStream(), preModuleEvent(), preModuleEventDelayedGet(), preModuleEventPrefetching(), preModuleGlobalBeginLumi(), preModuleGlobalBeginRun(), preModuleGlobalEndLumi(), preModuleGlobalEndRun(), preModuleStreamBeginLumi(), preModuleStreamBeginRun(), preModuleStreamEndLumi(), preModuleStreamEndRun(), preOpenFile(), prePathEvent(), preSourceConstruction(), preSourceEvent(), preSourceLumi(), preSourceRun(), preStreamBeginLumi(), preStreamBeginRun(), preStreamEndLumi(), preStreamEndRun(), edm::ActivityRegistry::watchPostBeginJob(), edm::ActivityRegistry::watchPostCloseFile(), edm::ActivityRegistry::watchPostEndJob(), edm::ActivityRegistry::watchPostEvent(), edm::ActivityRegistry::watchPostEventReadFromSource(), edm::ActivityRegistry::watchPostGlobalBeginLumi(), edm::ActivityRegistry::watchPostGlobalBeginRun(), edm::ActivityRegistry::watchPostGlobalEndLumi(), edm::ActivityRegistry::watchPostGlobalEndRun(), edm::ActivityRegistry::watchPostModuleBeginJob(), edm::ActivityRegistry::watchPostModuleBeginStream(), edm::ActivityRegistry::watchPostModuleConstruction(), edm::ActivityRegistry::watchPostModuleEndJob(), edm::ActivityRegistry::watchPostModuleEndStream(), edm::ActivityRegistry::watchPostModuleEvent(), edm::ActivityRegistry::watchPostModuleEventDelayedGet(), edm::ActivityRegistry::watchPostModuleEventPrefetching(), edm::ActivityRegistry::watchPostModuleGlobalBeginLumi(), edm::ActivityRegistry::watchPostModuleGlobalBeginRun(), edm::ActivityRegistry::watchPostModuleGlobalEndLumi(), edm::ActivityRegistry::watchPostModuleGlobalEndRun(), edm::ActivityRegistry::watchPostModuleStreamBeginLumi(), edm::ActivityRegistry::watchPostModuleStreamBeginRun(), edm::ActivityRegistry::watchPostModuleStreamEndLumi(), edm::ActivityRegistry::watchPostModuleStreamEndRun(), edm::ActivityRegistry::watchPostOpenFile(), edm::ActivityRegistry::watchPostPathEvent(), edm::ActivityRegistry::watchPostSourceConstruction(), edm::ActivityRegistry::watchPostSourceEvent(), edm::ActivityRegistry::watchPostSourceLumi(), edm::ActivityRegistry::watchPostSourceRun(), edm::ActivityRegistry::watchPostStreamBeginLumi(), edm::ActivityRegistry::watchPostStreamBeginRun(), edm::ActivityRegistry::watchPostStreamEndLumi(), edm::ActivityRegistry::watchPostStreamEndRun(), edm::ActivityRegistry::watchPreallocate(), edm::ActivityRegistry::watchPreBeginJob(), edm::ActivityRegistry::watchPreCloseFile(), edm::ActivityRegistry::watchPreEvent(), edm::ActivityRegistry::watchPreEventReadFromSource(), edm::ActivityRegistry::watchPreGlobalBeginLumi(), edm::ActivityRegistry::watchPreGlobalBeginRun(), edm::ActivityRegistry::watchPreGlobalEndLumi(), edm::ActivityRegistry::watchPreGlobalEndRun(), edm::ActivityRegistry::watchPreModuleBeginJob(), edm::ActivityRegistry::watchPreModuleBeginStream(), edm::ActivityRegistry::watchPreModuleConstruction(), edm::ActivityRegistry::watchPreModuleEndJob(), edm::ActivityRegistry::watchPreModuleEndStream(), edm::ActivityRegistry::watchPreModuleEvent(), edm::ActivityRegistry::watchPreModuleEventDelayedGet(), edm::ActivityRegistry::watchPreModuleEventPrefetching(), edm::ActivityRegistry::watchPreModuleGlobalBeginLumi(), edm::ActivityRegistry::watchPreModuleGlobalBeginRun(), edm::ActivityRegistry::watchPreModuleGlobalEndLumi(), edm::ActivityRegistry::watchPreModuleGlobalEndRun(), edm::ActivityRegistry::watchPreModuleStreamBeginLumi(), edm::ActivityRegistry::watchPreModuleStreamBeginRun(), edm::ActivityRegistry::watchPreModuleStreamEndLumi(), edm::ActivityRegistry::watchPreModuleStreamEndRun(), edm::ActivityRegistry::watchPreOpenFile(), edm::ActivityRegistry::watchPrePathEvent(), edm::ActivityRegistry::watchPreSourceConstruction(), edm::ActivityRegistry::watchPreSourceEvent(), edm::ActivityRegistry::watchPreSourceLumi(), edm::ActivityRegistry::watchPreSourceRun(), edm::ActivityRegistry::watchPreStreamBeginLumi(), edm::ActivityRegistry::watchPreStreamBeginRun(), edm::ActivityRegistry::watchPreStreamEndLumi(), and edm::ActivityRegistry::watchPreStreamEndRun().

319  :
320  highlightModules_(config.getUntrackedParameter<std::vector<std::string>>("highlightModules")),
322  domains_(this)
323 {
324  std::sort(highlightModules_.begin(), highlightModules_.end());
325 
326  // enables profile collection; if profiling is already enabled, has no effect
327  cudaProfilerStart();
328 
329  registry.watchPreallocate(this, &NVProfilerService::preallocate);
330 
331  // these signal pair are NOT guaranteed to be called by the same thread
332  registry.watchPreBeginJob(this, &NVProfilerService::preBeginJob);
333  registry.watchPostBeginJob(this, &NVProfilerService::postBeginJob);
334 
335  // there is no preEndJob() signal
336  registry.watchPostEndJob(this, &NVProfilerService::postEndJob);
337 
338  // these signal pair are NOT guaranteed to be called by the same thread
339  registry.watchPreGlobalBeginRun(this, &NVProfilerService::preGlobalBeginRun);
340  registry.watchPostGlobalBeginRun(this, &NVProfilerService::postGlobalBeginRun);
341 
342  // these signal pair are NOT guaranteed to be called by the same thread
343  registry.watchPreGlobalEndRun(this, &NVProfilerService::preGlobalEndRun);
344  registry.watchPostGlobalEndRun(this, &NVProfilerService::postGlobalEndRun);
345 
346  // these signal pair are NOT guaranteed to be called by the same thread
347  registry.watchPreStreamBeginRun(this, &NVProfilerService::preStreamBeginRun);
348  registry.watchPostStreamBeginRun(this, &NVProfilerService::postStreamBeginRun);
349 
350  // these signal pair are NOT guaranteed to be called by the same thread
351  registry.watchPreStreamEndRun(this, &NVProfilerService::preStreamEndRun);
352  registry.watchPostStreamEndRun(this, &NVProfilerService::postStreamEndRun);
353 
354  // these signal pair are NOT guaranteed to be called by the same thread
355  registry.watchPreGlobalBeginLumi(this, &NVProfilerService::preGlobalBeginLumi);
356  registry.watchPostGlobalBeginLumi(this, &NVProfilerService::postGlobalBeginLumi);
357 
358  // these signal pair are NOT guaranteed to be called by the same thread
359  registry.watchPreGlobalEndLumi(this, &NVProfilerService::preGlobalEndLumi);
360  registry.watchPostGlobalEndLumi(this, &NVProfilerService::postGlobalEndLumi);
361 
362  // these signal pair are NOT guaranteed to be called by the same thread
363  registry.watchPreStreamBeginLumi(this, &NVProfilerService::preStreamBeginLumi);
364  registry.watchPostStreamBeginLumi(this, &NVProfilerService::postStreamBeginLumi);
365 
366  // these signal pair are NOT guaranteed to be called by the same thread
367  registry.watchPreStreamEndLumi(this, &NVProfilerService::preStreamEndLumi);
368  registry.watchPostStreamEndLumi(this, &NVProfilerService::postStreamEndLumi);
369 
370  // these signal pair are NOT guaranteed to be called by the same thread
371  registry.watchPreEvent(this, &NVProfilerService::preEvent);
372  registry.watchPostEvent(this, &NVProfilerService::postEvent);
373 
374  // these signal pair are NOT guaranteed to be called by the same thread
375  registry.watchPrePathEvent(this, &NVProfilerService::prePathEvent);
376  registry.watchPostPathEvent(this, &NVProfilerService::postPathEvent);
377 
378  // these signal pair are NOT guaranteed to be called by the same thread
379  registry.watchPreModuleEventPrefetching(this, &NVProfilerService::preModuleEventPrefetching);
380  registry.watchPostModuleEventPrefetching(this, &NVProfilerService::postModuleEventPrefetching);
381 
382  // these signal pair are guaranteed to be called by the same thread
383  registry.watchPreOpenFile(this, &NVProfilerService::preOpenFile);
384  registry.watchPostOpenFile(this, &NVProfilerService::postOpenFile);
385 
386  // these signal pair are guaranteed to be called by the same thread
387  registry.watchPreCloseFile(this, &NVProfilerService::preCloseFile);
388  registry.watchPostCloseFile(this, &NVProfilerService::postCloseFile);
389 
390  // these signal pair are guaranteed to be called by the same thread
391  registry.watchPreSourceConstruction(this, &NVProfilerService::preSourceConstruction);
392  registry.watchPostSourceConstruction(this, &NVProfilerService::postSourceConstruction);
393 
394  // these signal pair are guaranteed to be called by the same thread
395  registry.watchPreSourceRun(this, &NVProfilerService::preSourceRun);
396  registry.watchPostSourceRun(this, &NVProfilerService::postSourceRun);
397 
398  // these signal pair are guaranteed to be called by the same thread
399  registry.watchPreSourceLumi(this, &NVProfilerService::preSourceLumi);
400  registry.watchPostSourceLumi(this, &NVProfilerService::postSourceLumi);
401 
402  // these signal pair are guaranteed to be called by the same thread
403  registry.watchPreSourceEvent(this, &NVProfilerService::preSourceEvent);
404  registry.watchPostSourceEvent(this, &NVProfilerService::postSourceEvent);
405 
406  // these signal pair are guaranteed to be called by the same thread
407  registry.watchPreModuleConstruction(this, &NVProfilerService::preModuleConstruction);
408  registry.watchPostModuleConstruction(this, &NVProfilerService::postModuleConstruction);
409 
410  // these signal pair are guaranteed to be called by the same thread
411  registry.watchPreModuleBeginJob(this, &NVProfilerService::preModuleBeginJob);
412  registry.watchPostModuleBeginJob(this, &NVProfilerService::postModuleBeginJob);
413 
414  // these signal pair are guaranteed to be called by the same thread
415  registry.watchPreModuleEndJob(this, &NVProfilerService::preModuleEndJob);
416  registry.watchPostModuleEndJob(this, &NVProfilerService::postModuleEndJob);
417 
418  // these signal pair are guaranteed to be called by the same thread
419  registry.watchPreModuleBeginStream(this, &NVProfilerService::preModuleBeginStream);
420  registry.watchPostModuleBeginStream(this, &NVProfilerService::postModuleBeginStream);
421 
422  // these signal pair are guaranteed to be called by the same thread
423  registry.watchPreModuleEndStream(this, &NVProfilerService::preModuleEndStream);
424  registry.watchPostModuleEndStream(this, &NVProfilerService::postModuleEndStream);
425 
426  // these signal pair are guaranteed to be called by the same thread
427  registry.watchPreModuleGlobalBeginRun(this, &NVProfilerService::preModuleGlobalBeginRun);
428  registry.watchPostModuleGlobalBeginRun(this, &NVProfilerService::postModuleGlobalBeginRun);
429 
430  // these signal pair are guaranteed to be called by the same thread
431  registry.watchPreModuleGlobalEndRun(this, &NVProfilerService::preModuleGlobalEndRun);
432  registry.watchPostModuleGlobalEndRun(this, &NVProfilerService::postModuleGlobalEndRun);
433 
434  // these signal pair are guaranteed to be called by the same thread
435  registry.watchPreModuleGlobalBeginLumi(this, &NVProfilerService::preModuleGlobalBeginLumi);
436  registry.watchPostModuleGlobalBeginLumi(this, &NVProfilerService::postModuleGlobalBeginLumi);
437 
438  // these signal pair are guaranteed to be called by the same thread
439  registry.watchPreModuleGlobalEndLumi(this, &NVProfilerService::preModuleGlobalEndLumi);
440  registry.watchPostModuleGlobalEndLumi(this, &NVProfilerService::postModuleGlobalEndLumi);
441 
442  // these signal pair are guaranteed to be called by the same thread
443  registry.watchPreModuleStreamBeginRun(this, &NVProfilerService::preModuleStreamBeginRun);
444  registry.watchPostModuleStreamBeginRun(this, &NVProfilerService::postModuleStreamBeginRun);
445 
446  // these signal pair are guaranteed to be called by the same thread
447  registry.watchPreModuleStreamEndRun(this, &NVProfilerService::preModuleStreamEndRun);
448  registry.watchPostModuleStreamEndRun(this, &NVProfilerService::postModuleStreamEndRun);
449 
450  // these signal pair are guaranteed to be called by the same thread
451  registry.watchPreModuleStreamBeginLumi(this, &NVProfilerService::preModuleStreamBeginLumi);
452  registry.watchPostModuleStreamBeginLumi(this, &NVProfilerService::postModuleStreamBeginLumi);
453 
454  // these signal pair are guaranteed to be called by the same thread
455  registry.watchPreModuleStreamEndLumi(this, &NVProfilerService::preModuleStreamEndLumi);
456  registry.watchPostModuleStreamEndLumi(this, &NVProfilerService::postModuleStreamEndLumi);
457 
458  // these signal pair are guaranteed to be called by the same thread
459  registry.watchPreModuleEvent(this, &NVProfilerService::preModuleEvent);
460  registry.watchPostModuleEvent(this, &NVProfilerService::postModuleEvent);
461 
462  // these signal pair are guaranteed to be called by the same thread
463  registry.watchPreModuleEventDelayedGet(this, &NVProfilerService::preModuleEventDelayedGet);
464  registry.watchPostModuleEventDelayedGet(this, &NVProfilerService::postModuleEventDelayedGet);
465 
466  // these signal pair are guaranteed to be called by the same thread
467  registry.watchPreEventReadFromSource(this, &NVProfilerService::preEventReadFromSource);
468  registry.watchPostEventReadFromSource(this, &NVProfilerService::postEventReadFromSource);
469 }
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 postModuleEvent(edm::StreamContext const &, edm::ModuleCallingContext const &)
tbb::enumerable_thread_specific< Domains > domains_
void preModuleEndStream(edm::StreamContext const &, edm::ModuleCallingContext const &)
void postCloseFile(std::string const &, bool)
void preStreamBeginLumi(edm::StreamContext const &)
void preModuleEvent(edm::StreamContext const &, edm::ModuleCallingContext const &)
void preModuleStreamBeginLumi(edm::StreamContext const &, edm::ModuleCallingContext const &)
void postSourceConstruction(edm::ModuleDescription const &)
void preModuleStreamBeginRun(edm::StreamContext const &, edm::ModuleCallingContext const &)
void preCloseFile(std::string const &, bool)
void postStreamEndRun(edm::StreamContext const &)
Definition: config.py:1
void postModuleEndJob(edm::ModuleDescription const &)
void postGlobalEndLumi(edm::GlobalContext const &)
void preModuleEndJob(edm::ModuleDescription const &)
void preModuleGlobalBeginLumi(edm::GlobalContext const &, edm::ModuleCallingContext const &)
void preGlobalBeginLumi(edm::GlobalContext const &)
void preModuleStreamEndLumi(edm::StreamContext const &, edm::ModuleCallingContext const &)
void postModuleConstruction(edm::ModuleDescription 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 preStreamEndRun(edm::StreamContext const &)
void postModuleGlobalEndLumi(edm::GlobalContext const &, edm::ModuleCallingContext const &)
void preModuleEventDelayedGet(edm::StreamContext const &, edm::ModuleCallingContext const &)
void preSourceConstruction(edm::ModuleDescription const &)
void postModuleGlobalEndRun(edm::GlobalContext const &, edm::ModuleCallingContext const &)
void preModuleGlobalEndRun(edm::GlobalContext const &, edm::ModuleCallingContext const &)
void preBeginJob(edm::PathsAndConsumesOfModulesBase const &, edm::ProcessContext const &)
void postPathEvent(edm::StreamContext const &, edm::PathContext const &, edm::HLTPathStatus const &)
void postStreamBeginLumi(edm::StreamContext const &)
void preStreamEndLumi(edm::StreamContext const &)
void preModuleBeginJob(edm::ModuleDescription const &)
void postGlobalBeginLumi(edm::GlobalContext const &)
void postEventReadFromSource(edm::StreamContext const &, edm::ModuleCallingContext const &)
void postModuleBeginStream(edm::StreamContext const &, edm::ModuleCallingContext const &)
void postModuleGlobalBeginRun(edm::GlobalContext const &, edm::ModuleCallingContext const &)
void preModuleBeginStream(edm::StreamContext const &, edm::ModuleCallingContext const &)
void preSourceEvent(edm::StreamID)
void preModuleConstruction(edm::ModuleDescription const &)
unsigned int concurrentStreams_
void preStreamBeginRun(edm::StreamContext const &)
void postModuleStreamBeginRun(edm::StreamContext const &, edm::ModuleCallingContext const &)
void preModuleStreamEndRun(edm::StreamContext const &, edm::ModuleCallingContext const &)
void postGlobalBeginRun(edm::GlobalContext const &)
void postModuleStreamEndLumi(edm::StreamContext const &, edm::ModuleCallingContext const &)
void postEvent(edm::StreamContext const &)
void preallocate(edm::service::SystemBounds const &)
void postModuleEndStream(edm::StreamContext const &, edm::ModuleCallingContext const &)
void preEventReadFromSource(edm::StreamContext const &, edm::ModuleCallingContext const &)
void preEvent(edm::StreamContext const &)
void preModuleGlobalEndLumi(edm::GlobalContext const &, edm::ModuleCallingContext const &)
void postStreamBeginRun(edm::StreamContext const &)
void prePathEvent(edm::StreamContext const &, edm::PathContext const &)
static Interceptor::Registry registry("Interceptor")
void postModuleStreamEndRun(edm::StreamContext const &, edm::ModuleCallingContext const &)
void postModuleGlobalBeginLumi(edm::GlobalContext const &, edm::ModuleCallingContext const &)
std::vector< std::string > highlightModules_
void postModuleBeginJob(edm::ModuleDescription const &)
NVProfilerService::~NVProfilerService ( )

Definition at line 471 of file NVProfilerService.cc.

471  {
472  cudaProfilerStop();
473 }

Member Function Documentation

void NVProfilerService::fillDescriptions ( edm::ConfigurationDescriptions descriptions)
static

Definition at line 481 of file NVProfilerService.cc.

References edm::ConfigurationDescriptions::add(), edm::ParameterSetDescription::addUntracked(), and edm::ConfigurationDescriptions::setComment().

481  {
483  desc.addUntracked<std::vector<std::string>>("highlightModules", {})->setComment("");
484  desc.addUntracked<bool>("showDelayedModules", true)->setComment("");
485  descriptions.add("NVProfilerService", desc);
486  descriptions.setComment("This Service provides CMSSW-aware annotations to nvprof/nvvm.");
487 }
ParameterDescriptionBase * addUntracked(U const &iLabel, T const &value)
void setComment(std::string const &value)
void add(std::string const &label, ParameterSetDescription const &psetDescription)
nvtxDomainHandle_t NVProfilerService::global_domain ( )
inlineprivate
bool NVProfilerService::highlight ( std::string const &  label)
private
void NVProfilerService::postBeginJob ( )

Definition at line 519 of file NVProfilerService.cc.

References global_domain().

Referenced by NVProfilerService().

519  {
520  nvtxDomainMark(global_domain(), "postBeginJob");
521 }
nvtxDomainHandle_t global_domain()
void NVProfilerService::postCloseFile ( std::string const &  lfn,
bool   
)

Definition at line 574 of file NVProfilerService.cc.

References global_domain().

Referenced by NVProfilerService().

574  {
575  nvtxDomainRangePop(global_domain());
576 }
nvtxDomainHandle_t global_domain()
void NVProfilerService::postEndJob ( )

Definition at line 524 of file NVProfilerService.cc.

References global_domain().

Referenced by NVProfilerService().

524  {
525  nvtxDomainMark(global_domain(), "postEndJob");
526 }
nvtxDomainHandle_t global_domain()
void NVProfilerService::postEvent ( edm::StreamContext const &  sc)

Definition at line 711 of file NVProfilerService.cc.

References event_, stream_domain(), and edm::StreamContext::streamID().

Referenced by NVProfilerService().

711  {
712  auto sid = sc.streamID();
713  nvtxDomainRangeEnd(stream_domain(sid), event_[sid]);
714 }
std::vector< nvtxRangeId_t > event_
nvtxDomainHandle_t stream_domain(unsigned int sid)
void NVProfilerService::postEventReadFromSource ( edm::StreamContext const &  sc,
edm::ModuleCallingContext const &  mcc 
)

Definition at line 855 of file NVProfilerService.cc.

Referenced by NVProfilerService().

855  {
856  /* FIXME
857  auto sid = sc.streamID();
858  auto mid = mcc.moduleDescription()->id();
859  nvtxDomainRangeEnd(stream_domain(sid), stream_modules_[sid][mid]);
860  */
861 }
void NVProfilerService::postGlobalBeginLumi ( edm::GlobalContext const &  gc)

Definition at line 666 of file NVProfilerService.cc.

References global_domain().

Referenced by NVProfilerService().

666  {
667  nvtxDomainRangePop(global_domain());
668 }
nvtxDomainHandle_t global_domain()
void NVProfilerService::postGlobalBeginRun ( edm::GlobalContext const &  gc)

Definition at line 622 of file NVProfilerService.cc.

References global_domain().

Referenced by NVProfilerService().

622  {
623  nvtxDomainRangePop(global_domain());
624 }
nvtxDomainHandle_t global_domain()
void NVProfilerService::postGlobalEndLumi ( edm::GlobalContext const &  gc)

Definition at line 676 of file NVProfilerService.cc.

References global_domain().

Referenced by NVProfilerService().

676  {
677  nvtxDomainRangePop(global_domain());
678 }
nvtxDomainHandle_t global_domain()
void NVProfilerService::postGlobalEndRun ( edm::GlobalContext const &  gc)

Definition at line 632 of file NVProfilerService.cc.

References global_domain().

Referenced by NVProfilerService().

632  {
633  nvtxDomainRangePop(global_domain());
634 }
nvtxDomainHandle_t global_domain()
void NVProfilerService::postModuleBeginJob ( edm::ModuleDescription const &  desc)

Definition at line 777 of file NVProfilerService.cc.

References global_domain(), global_modules_, and edm::ModuleDescription::id().

Referenced by NVProfilerService().

777  {
778  auto mid = desc.id();
779  nvtxDomainRangeEnd(global_domain(), global_modules_[mid]);
780 }
nvtxDomainHandle_t global_domain()
tbb::concurrent_vector< nvtxRangeId_t > global_modules_
void NVProfilerService::postModuleBeginStream ( edm::StreamContext const &  sc,
edm::ModuleCallingContext const &  mcc 
)

Definition at line 591 of file NVProfilerService.cc.

References edm::ModuleDescription::id(), edm::ModuleCallingContext::moduleDescription(), stream_domain(), stream_modules_, and edm::StreamContext::streamID().

Referenced by NVProfilerService().

591  {
592  auto sid = sc.streamID();
593  auto mid = mcc.moduleDescription()->id();
594  nvtxDomainRangeEnd(stream_domain(sid), stream_modules_[sid][mid]);
595 }
std::vector< std::vector< nvtxRangeId_t > > stream_modules_
nvtxDomainHandle_t stream_domain(unsigned int sid)
void NVProfilerService::postModuleConstruction ( edm::ModuleDescription const &  desc)

Definition at line 760 of file NVProfilerService.cc.

References global_domain(), global_modules_, and edm::ModuleDescription::id().

Referenced by NVProfilerService().

760  {
761  auto mid = desc.id();
762  nvtxDomainRangeEnd(global_domain(), global_modules_[mid]);
763 }
nvtxDomainHandle_t global_domain()
tbb::concurrent_vector< nvtxRangeId_t > global_modules_
void NVProfilerService::postModuleEndJob ( edm::ModuleDescription const &  desc)

Definition at line 794 of file NVProfilerService.cc.

References global_domain(), global_modules_, and edm::ModuleDescription::id().

Referenced by NVProfilerService().

794  {
795  auto mid = desc.id();
796  nvtxDomainRangeEnd(global_domain(), global_modules_[mid]);
797 }
nvtxDomainHandle_t global_domain()
tbb::concurrent_vector< nvtxRangeId_t > global_modules_
void NVProfilerService::postModuleEndStream ( edm::StreamContext const &  sc,
edm::ModuleCallingContext const &  mcc 
)

Definition at line 610 of file NVProfilerService.cc.

References edm::ModuleDescription::id(), edm::ModuleCallingContext::moduleDescription(), stream_domain(), stream_modules_, and edm::StreamContext::streamID().

Referenced by NVProfilerService().

610  {
611  auto sid = sc.streamID();
612  auto mid = mcc.moduleDescription()->id();
613  nvtxDomainRangeEnd(stream_domain(sid), stream_modules_[sid][mid]);
614 }
std::vector< std::vector< nvtxRangeId_t > > stream_modules_
nvtxDomainHandle_t stream_domain(unsigned int sid)
void NVProfilerService::postModuleEvent ( edm::StreamContext const &  sc,
edm::ModuleCallingContext const &  mcc 
)

Definition at line 811 of file NVProfilerService.cc.

References edm::ModuleDescription::id(), edm::ModuleCallingContext::moduleDescription(), stream_domain(), stream_modules_, and edm::StreamContext::streamID().

Referenced by NVProfilerService().

811  {
812  auto sid = sc.streamID();
813  auto mid = mcc.moduleDescription()->id();
814  nvtxDomainRangeEnd(stream_domain(sid), stream_modules_[sid][mid]);
815 }
std::vector< std::vector< nvtxRangeId_t > > stream_modules_
nvtxDomainHandle_t stream_domain(unsigned int sid)
void NVProfilerService::postModuleEventDelayedGet ( edm::StreamContext const &  sc,
edm::ModuleCallingContext const &  mcc 
)

Definition at line 832 of file NVProfilerService.cc.

Referenced by NVProfilerService().

832  {
833  /* FIXME
834  auto sid = sc.streamID();
835  auto mid = mcc.moduleDescription()->id();
836  nvtxDomainRangeEnd(stream_domain(sid), stream_modules_[sid][mid]);
837  */
838 }
void NVProfilerService::postModuleEventPrefetching ( edm::StreamContext const &  sc,
edm::ModuleCallingContext const &  mcc 
)

Definition at line 741 of file NVProfilerService.cc.

References edm::ModuleDescription::id(), edm::ModuleCallingContext::moduleDescription(), stream_domain(), stream_modules_, and edm::StreamContext::streamID().

Referenced by NVProfilerService().

741  {
742  auto sid = sc.streamID();
743  auto mid = mcc.moduleDescription()->id();
744  nvtxDomainRangeEnd(stream_domain(sid), stream_modules_[sid][mid]);
745 }
std::vector< std::vector< nvtxRangeId_t > > stream_modules_
nvtxDomainHandle_t stream_domain(unsigned int sid)
void NVProfilerService::postModuleGlobalBeginLumi ( edm::GlobalContext const &  gc,
edm::ModuleCallingContext const &  mcc 
)

Definition at line 985 of file NVProfilerService.cc.

References global_domain(), global_modules_, edm::ModuleDescription::id(), and edm::ModuleCallingContext::moduleDescription().

Referenced by NVProfilerService().

985  {
986  auto mid = mcc.moduleDescription()->id();
987  nvtxDomainRangeEnd(global_domain(), global_modules_[mid]);
988 }
nvtxDomainHandle_t global_domain()
tbb::concurrent_vector< nvtxRangeId_t > global_modules_
void NVProfilerService::postModuleGlobalBeginRun ( edm::GlobalContext const &  gc,
edm::ModuleCallingContext const &  mcc 
)

Definition at line 951 of file NVProfilerService.cc.

References global_domain(), global_modules_, edm::ModuleDescription::id(), and edm::ModuleCallingContext::moduleDescription().

Referenced by NVProfilerService().

951  {
952  auto mid = mcc.moduleDescription()->id();
953  nvtxDomainRangeEnd(global_domain(), global_modules_[mid]);
954 }
nvtxDomainHandle_t global_domain()
tbb::concurrent_vector< nvtxRangeId_t > global_modules_
void NVProfilerService::postModuleGlobalEndLumi ( edm::GlobalContext const &  gc,
edm::ModuleCallingContext const &  mcc 
)

Definition at line 1002 of file NVProfilerService.cc.

References global_domain(), global_modules_, edm::ModuleDescription::id(), and edm::ModuleCallingContext::moduleDescription().

Referenced by NVProfilerService().

1002  {
1003  auto mid = mcc.moduleDescription()->id();
1004  nvtxDomainRangeEnd(global_domain(), global_modules_[mid]);
1005 }
nvtxDomainHandle_t global_domain()
tbb::concurrent_vector< nvtxRangeId_t > global_modules_
void NVProfilerService::postModuleGlobalEndRun ( edm::GlobalContext const &  gc,
edm::ModuleCallingContext const &  mcc 
)

Definition at line 968 of file NVProfilerService.cc.

References global_domain(), global_modules_, edm::ModuleDescription::id(), and edm::ModuleCallingContext::moduleDescription().

Referenced by NVProfilerService().

968  {
969  auto mid = mcc.moduleDescription()->id();
970  nvtxDomainRangeEnd(global_domain(), global_modules_[mid]);
971 }
nvtxDomainHandle_t global_domain()
tbb::concurrent_vector< nvtxRangeId_t > global_modules_
void NVProfilerService::postModuleStreamBeginLumi ( edm::StreamContext const &  sc,
edm::ModuleCallingContext const &  mcc 
)

Definition at line 914 of file NVProfilerService.cc.

References edm::ModuleDescription::id(), edm::ModuleCallingContext::moduleDescription(), stream_domain(), stream_modules_, and edm::StreamContext::streamID().

Referenced by NVProfilerService().

914  {
915  auto sid = sc.streamID();
916  auto mid = mcc.moduleDescription()->id();
917  nvtxDomainRangeEnd(stream_domain(sid), stream_modules_[sid][mid]);
918 }
std::vector< std::vector< nvtxRangeId_t > > stream_modules_
nvtxDomainHandle_t stream_domain(unsigned int sid)
void NVProfilerService::postModuleStreamBeginRun ( edm::StreamContext const &  sc,
edm::ModuleCallingContext const &  mcc 
)

Definition at line 876 of file NVProfilerService.cc.

References edm::ModuleDescription::id(), edm::ModuleCallingContext::moduleDescription(), stream_domain(), stream_modules_, and edm::StreamContext::streamID().

Referenced by NVProfilerService().

876  {
877  auto sid = sc.streamID();
878  auto mid = mcc.moduleDescription()->id();
879  nvtxDomainRangeEnd(stream_domain(sid), stream_modules_[sid][mid]);
880 }
std::vector< std::vector< nvtxRangeId_t > > stream_modules_
nvtxDomainHandle_t stream_domain(unsigned int sid)
void NVProfilerService::postModuleStreamEndLumi ( edm::StreamContext const &  sc,
edm::ModuleCallingContext const &  mcc 
)

Definition at line 933 of file NVProfilerService.cc.

References edm::ModuleDescription::id(), edm::ModuleCallingContext::moduleDescription(), stream_domain(), stream_modules_, and edm::StreamContext::streamID().

Referenced by NVProfilerService().

933  {
934  auto sid = sc.streamID();
935  auto mid = mcc.moduleDescription()->id();
936  nvtxDomainRangeEnd(stream_domain(sid), stream_modules_[sid][mid]);
937 }
std::vector< std::vector< nvtxRangeId_t > > stream_modules_
nvtxDomainHandle_t stream_domain(unsigned int sid)
void NVProfilerService::postModuleStreamEndRun ( edm::StreamContext const &  sc,
edm::ModuleCallingContext const &  mcc 
)

Definition at line 895 of file NVProfilerService.cc.

References edm::ModuleDescription::id(), edm::ModuleCallingContext::moduleDescription(), stream_domain(), stream_modules_, and edm::StreamContext::streamID().

Referenced by NVProfilerService().

895  {
896  auto sid = sc.streamID();
897  auto mid = mcc.moduleDescription()->id();
898  nvtxDomainRangeEnd(stream_domain(sid), stream_modules_[sid][mid]);
899 }
std::vector< std::vector< nvtxRangeId_t > > stream_modules_
nvtxDomainHandle_t stream_domain(unsigned int sid)
void NVProfilerService::postOpenFile ( std::string const &  lfn,
bool   
)

Definition at line 564 of file NVProfilerService.cc.

References global_domain().

Referenced by NVProfilerService().

564  {
565  nvtxDomainRangePop(global_domain());
566 }
nvtxDomainHandle_t global_domain()
void NVProfilerService::postPathEvent ( edm::StreamContext const &  sc,
edm::PathContext const &  pc,
edm::HLTPathStatus const &  hlts 
)

Definition at line 723 of file NVProfilerService.cc.

References global_domain(), edm::PathContext::pathName(), alignCSCRings::s, and edm::StreamContext::streamID().

Referenced by NVProfilerService().

723  {
724  auto sid = sc.streamID();
725  nvtxDomainMark(global_domain(), ("after path "s + pc.pathName()).c_str());
726 }
nvtxDomainHandle_t global_domain()
void NVProfilerService::postSourceConstruction ( edm::ModuleDescription const &  desc)

Definition at line 1020 of file NVProfilerService.cc.

References DEFINE_FWK_SERVICE, global_domain(), global_modules_, and edm::ModuleDescription::id().

Referenced by NVProfilerService().

1020  {
1021  auto mid = desc.id();
1022  nvtxDomainRangeEnd(global_domain(), global_modules_[mid]);
1023 }
nvtxDomainHandle_t global_domain()
tbb::concurrent_vector< nvtxRangeId_t > global_modules_
void NVProfilerService::postSourceEvent ( edm::StreamID  sid)

Definition at line 534 of file NVProfilerService.cc.

References stream_domain().

Referenced by NVProfilerService().

534  {
535  nvtxDomainRangePop(stream_domain(sid));
536 }
nvtxDomainHandle_t stream_domain(unsigned int sid)
void NVProfilerService::postSourceLumi ( )

Definition at line 544 of file NVProfilerService.cc.

References global_domain().

Referenced by NVProfilerService().

544  {
545  nvtxDomainRangePop(global_domain());
546 }
nvtxDomainHandle_t global_domain()
void NVProfilerService::postSourceRun ( )

Definition at line 554 of file NVProfilerService.cc.

References global_domain().

Referenced by NVProfilerService().

554  {
555  nvtxDomainRangePop(global_domain());
556 }
nvtxDomainHandle_t global_domain()
void NVProfilerService::postStreamBeginLumi ( edm::StreamContext const &  sc)

Definition at line 687 of file NVProfilerService.cc.

References stream_domain(), and edm::StreamContext::streamID().

Referenced by NVProfilerService().

687  {
688  auto sid = sc.streamID();
689  nvtxDomainRangePop(stream_domain(sid));
690 }
nvtxDomainHandle_t stream_domain(unsigned int sid)
void NVProfilerService::postStreamBeginRun ( edm::StreamContext const &  sc)

Definition at line 643 of file NVProfilerService.cc.

References stream_domain(), and edm::StreamContext::streamID().

Referenced by NVProfilerService().

643  {
644  auto sid = sc.streamID();
645  nvtxDomainRangePop(stream_domain(sid));
646 }
nvtxDomainHandle_t stream_domain(unsigned int sid)
void NVProfilerService::postStreamEndLumi ( edm::StreamContext const &  sc)

Definition at line 699 of file NVProfilerService.cc.

References stream_domain(), and edm::StreamContext::streamID().

Referenced by NVProfilerService().

699  {
700  auto sid = sc.streamID();
701  nvtxDomainRangePop(stream_domain(sid));
702 }
nvtxDomainHandle_t stream_domain(unsigned int sid)
void NVProfilerService::postStreamEndRun ( edm::StreamContext const &  sc)

Definition at line 655 of file NVProfilerService.cc.

References stream_domain(), and edm::StreamContext::streamID().

Referenced by NVProfilerService().

655  {
656  auto sid = sc.streamID();
657  nvtxDomainRangePop(stream_domain(sid));
658 }
nvtxDomainHandle_t stream_domain(unsigned int sid)
void NVProfilerService::preallocate ( edm::service::SystemBounds const &  bounds)

Definition at line 490 of file NVProfilerService.cc.

References concurrentStreams_, domains_, event_, global_domain(), edm::service::SystemBounds::maxNumberOfConcurrentLuminosityBlocks(), edm::service::SystemBounds::maxNumberOfConcurrentRuns(), edm::service::SystemBounds::maxNumberOfStreams(), edm::service::SystemBounds::maxNumberOfThreads(), MillePedeFileConverter_cfg::out, and stream_modules_.

Referenced by NVProfilerService().

490  {
491  std::stringstream out;
492  out << "preallocate: " << bounds.maxNumberOfConcurrentRuns() << " concurrent runs, "
493  << bounds.maxNumberOfConcurrentLuminosityBlocks() << " luminosity sections, "
494  << bounds.maxNumberOfStreams() << " streams\nrunning on"
495  << bounds.maxNumberOfThreads() << " threads";
496  nvtxDomainMark(global_domain(), out.str().c_str());
497 
498  concurrentStreams_ = bounds.maxNumberOfStreams();
499  for (auto& domain: domains_) {
500  domain.allocate_streams(concurrentStreams_);
501  }
502  event_.resize(concurrentStreams_);
503  stream_modules_.resize(concurrentStreams_);
504 }
tbb::enumerable_thread_specific< Domains > domains_
nvtxDomainHandle_t global_domain()
std::vector< std::vector< nvtxRangeId_t > > stream_modules_
std::vector< nvtxRangeId_t > event_
unsigned int concurrentStreams_
void NVProfilerService::preBeginJob ( edm::PathsAndConsumesOfModulesBase const &  pathsAndConsumes,
edm::ProcessContext const &  pc 
)

Definition at line 507 of file NVProfilerService.cc.

References edm::PathsAndConsumesOfModulesBase::allModules(), concurrentStreams_, global_domain(), global_modules_, and stream_modules_.

Referenced by NVProfilerService().

507  {
508  nvtxDomainMark(global_domain(), "preBeginJob");
509 
510  // FIXME this probably works only in the absence of subprocesses
511  unsigned int modules = pathsAndConsumes.allModules().size();
512  global_modules_.resize(modules);
513  for (unsigned int sid = 0; sid < concurrentStreams_; ++sid) {
514  stream_modules_[sid].resize(modules);
515  }
516 }
nvtxDomainHandle_t global_domain()
std::vector< std::vector< nvtxRangeId_t > > stream_modules_
tbb::concurrent_vector< nvtxRangeId_t > global_modules_
unsigned int concurrentStreams_
void NVProfilerService::preCloseFile ( std::string const &  lfn,
bool   
)

Definition at line 569 of file NVProfilerService.cc.

References global_domain(), and alignCSCRings::s.

Referenced by NVProfilerService().

569  {
570  nvtxDomainRangePush(global_domain(), ("close file "s + lfn).c_str());
571 }
nvtxDomainHandle_t global_domain()
void NVProfilerService::preEvent ( edm::StreamContext const &  sc)

Definition at line 705 of file NVProfilerService.cc.

References event_, stream_domain(), and edm::StreamContext::streamID().

Referenced by NVProfilerService().

705  {
706  auto sid = sc.streamID();
707  event_[sid] = nvtxDomainRangeStartColor(stream_domain(sid), "event", nvtxDarkGreen);
708 }
std::vector< nvtxRangeId_t > event_
nvtxDomainHandle_t stream_domain(unsigned int sid)
void NVProfilerService::preEventReadFromSource ( edm::StreamContext const &  sc,
edm::ModuleCallingContext const &  mcc 
)

Definition at line 841 of file NVProfilerService.cc.

Referenced by NVProfilerService().

841  {
842  /* FIXME
843  auto sid = sc.streamID();
844  auto mid = mcc.moduleDescription()->id();
845  auto const & label = mcc.moduleDescription()->moduleLabel();
846  auto const & msg = label + " read from source";
847  if (highlight(label))
848  stream_modules_[sid][mid] = nvtxDomainRangeStartColor(stream_domain(sid), msg.c_str(), nvtxAmber);
849  else
850  stream_modules_[sid][mid] = nvtxDomainRangeStart(stream_domain(sid), msg.c_str());
851  */
852 }
void NVProfilerService::preGlobalBeginLumi ( edm::GlobalContext const &  gc)

Definition at line 661 of file NVProfilerService.cc.

References global_domain().

Referenced by NVProfilerService().

661  {
662  nvtxDomainRangePush(global_domain(), "global begin lumi");
663 }
nvtxDomainHandle_t global_domain()
void NVProfilerService::preGlobalBeginRun ( edm::GlobalContext const &  gc)

Definition at line 617 of file NVProfilerService.cc.

References global_domain().

Referenced by NVProfilerService().

617  {
618  nvtxDomainRangePush(global_domain(), "global begin run");
619 }
nvtxDomainHandle_t global_domain()
void NVProfilerService::preGlobalEndLumi ( edm::GlobalContext const &  gc)

Definition at line 671 of file NVProfilerService.cc.

References global_domain().

Referenced by NVProfilerService().

671  {
672  nvtxDomainRangePush(global_domain(), "global end lumi");
673 }
nvtxDomainHandle_t global_domain()
void NVProfilerService::preGlobalEndRun ( edm::GlobalContext const &  gc)

Definition at line 627 of file NVProfilerService.cc.

References global_domain().

Referenced by NVProfilerService().

627  {
628  nvtxDomainRangePush(global_domain(), "global end run");
629 }
nvtxDomainHandle_t global_domain()
void NVProfilerService::preModuleBeginJob ( edm::ModuleDescription const &  desc)

Definition at line 766 of file NVProfilerService.cc.

References global_domain(), global_modules_, highlight(), edm::ModuleDescription::id(), diffTwoXMLs::label, edm::ModuleDescription::moduleLabel(), and mps_check::msg.

Referenced by NVProfilerService().

766  {
767  auto mid = desc.id();
768  auto const & label = desc.moduleLabel();
769  auto const & msg = label + " begin job";
770  if (highlight(label))
771  global_modules_[mid] = nvtxDomainRangeStartColor(global_domain(), msg.c_str(), nvtxAmber);
772  else
773  global_modules_[mid] = nvtxDomainRangeStart(global_domain(), msg.c_str());
774 }
nvtxDomainHandle_t global_domain()
tbb::concurrent_vector< nvtxRangeId_t > global_modules_
tuple msg
Definition: mps_check.py:277
bool highlight(std::string const &)
void NVProfilerService::preModuleBeginStream ( edm::StreamContext const &  sc,
edm::ModuleCallingContext const &  mcc 
)

Definition at line 579 of file NVProfilerService.cc.

References highlight(), edm::ModuleDescription::id(), diffTwoXMLs::label, edm::ModuleCallingContext::moduleDescription(), edm::ModuleDescription::moduleLabel(), mps_check::msg, stream_domain(), stream_modules_, and edm::StreamContext::streamID().

Referenced by NVProfilerService().

579  {
580  auto sid = sc.streamID();
581  auto mid = mcc.moduleDescription()->id();
582  auto const & label = mcc.moduleDescription()->moduleLabel();
583  auto const & msg = label + " begin stream";
584  if (highlight(label))
585  stream_modules_[sid][mid] = nvtxDomainRangeStartColor(stream_domain(sid), msg.c_str(), nvtxAmber);
586  else
587  stream_modules_[sid][mid] = nvtxDomainRangeStart(stream_domain(sid), msg.c_str());
588 }
std::vector< std::vector< nvtxRangeId_t > > stream_modules_
tuple msg
Definition: mps_check.py:277
bool highlight(std::string const &)
nvtxDomainHandle_t stream_domain(unsigned int sid)
void NVProfilerService::preModuleConstruction ( edm::ModuleDescription const &  desc)

Definition at line 748 of file NVProfilerService.cc.

References global_domain(), global_modules_, highlight(), edm::ModuleDescription::id(), diffTwoXMLs::label, edm::ModuleDescription::moduleLabel(), and mps_check::msg.

Referenced by NVProfilerService().

748  {
749  auto mid = desc.id();
750  global_modules_.grow_to_at_least(mid+1);
751  auto const & label = desc.moduleLabel();
752  auto const & msg = label + " construction";
753  if (highlight(label))
754  global_modules_[mid] = nvtxDomainRangeStartColor(global_domain(), msg.c_str(), nvtxAmber);
755  else
756  global_modules_[mid] = nvtxDomainRangeStart(global_domain(), msg.c_str());
757 }
nvtxDomainHandle_t global_domain()
tbb::concurrent_vector< nvtxRangeId_t > global_modules_
tuple msg
Definition: mps_check.py:277
bool highlight(std::string const &)
void NVProfilerService::preModuleEndJob ( edm::ModuleDescription const &  desc)

Definition at line 783 of file NVProfilerService.cc.

References global_domain(), global_modules_, highlight(), edm::ModuleDescription::id(), diffTwoXMLs::label, edm::ModuleDescription::moduleLabel(), and mps_check::msg.

Referenced by NVProfilerService().

783  {
784  auto mid = desc.id();
785  auto const & label = desc.moduleLabel();
786  auto const & msg = label + " end job";
787  if (highlight(label))
788  global_modules_[mid] = nvtxDomainRangeStartColor(global_domain(), msg.c_str(), nvtxAmber);
789  else
790  global_modules_[mid] = nvtxDomainRangeStart(global_domain(), msg.c_str());
791 }
nvtxDomainHandle_t global_domain()
tbb::concurrent_vector< nvtxRangeId_t > global_modules_
tuple msg
Definition: mps_check.py:277
bool highlight(std::string const &)
void NVProfilerService::preModuleEndStream ( edm::StreamContext const &  sc,
edm::ModuleCallingContext const &  mcc 
)

Definition at line 598 of file NVProfilerService.cc.

References highlight(), edm::ModuleDescription::id(), diffTwoXMLs::label, edm::ModuleCallingContext::moduleDescription(), edm::ModuleDescription::moduleLabel(), mps_check::msg, stream_domain(), stream_modules_, and edm::StreamContext::streamID().

Referenced by NVProfilerService().

598  {
599  auto sid = sc.streamID();
600  auto mid = mcc.moduleDescription()->id();
601  auto const & label = mcc.moduleDescription()->moduleLabel();
602  auto const & msg = label + " end stream";
603  if (highlight(label))
604  stream_modules_[sid][mid] = nvtxDomainRangeStartColor(stream_domain(sid), msg.c_str(), nvtxAmber);
605  else
606  stream_modules_[sid][mid] = nvtxDomainRangeStart(stream_domain(sid), msg.c_str());
607 }
std::vector< std::vector< nvtxRangeId_t > > stream_modules_
tuple msg
Definition: mps_check.py:277
bool highlight(std::string const &)
nvtxDomainHandle_t stream_domain(unsigned int sid)
void NVProfilerService::preModuleEvent ( edm::StreamContext const &  sc,
edm::ModuleCallingContext const &  mcc 
)

Definition at line 800 of file NVProfilerService.cc.

References highlight(), edm::ModuleDescription::id(), diffTwoXMLs::label, edm::ModuleCallingContext::moduleDescription(), edm::ModuleDescription::moduleLabel(), stream_domain(), stream_modules_, and edm::StreamContext::streamID().

Referenced by NVProfilerService().

800  {
801  auto sid = sc.streamID();
802  auto mid = mcc.moduleDescription()->id();
803  auto const & label = mcc.moduleDescription()->moduleLabel();
804  if (highlight(label))
805  stream_modules_[sid][mid] = nvtxDomainRangeStartColor(stream_domain(sid), label.c_str(), nvtxAmber);
806  else
807  stream_modules_[sid][mid] = nvtxDomainRangeStart(stream_domain(sid), label.c_str());
808 }
std::vector< std::vector< nvtxRangeId_t > > stream_modules_
bool highlight(std::string const &)
nvtxDomainHandle_t stream_domain(unsigned int sid)
void NVProfilerService::preModuleEventDelayedGet ( edm::StreamContext const &  sc,
edm::ModuleCallingContext const &  mcc 
)

Definition at line 818 of file NVProfilerService.cc.

Referenced by NVProfilerService().

818  {
819  /* FIXME
820  auto sid = sc.streamID();
821  auto mid = mcc.moduleDescription()->id();
822  auto const & label = mcc.moduleDescription()->moduleLabel();
823  auto const & msg = label + " delayed get";
824  if (highlight(label))
825  stream_modules_[sid][mid] = nvtxDomainRangeStartColor(stream_domain(sid), label.c_str(), nvtxAmber);
826  else
827  stream_modules_[sid][mid] = nvtxDomainRangeStart(stream_domain(sid), label.c_str());
828  */
829 }
void NVProfilerService::preModuleEventPrefetching ( edm::StreamContext const &  sc,
edm::ModuleCallingContext const &  mcc 
)

Definition at line 729 of file NVProfilerService.cc.

References highlight(), edm::ModuleDescription::id(), diffTwoXMLs::label, edm::ModuleCallingContext::moduleDescription(), edm::ModuleDescription::moduleLabel(), mps_check::msg, stream_domain(), stream_modules_, and edm::StreamContext::streamID().

Referenced by NVProfilerService().

729  {
730  auto sid = sc.streamID();
731  auto mid = mcc.moduleDescription()->id();
732  auto const & label = mcc.moduleDescription()->moduleLabel();
733  auto const & msg = label + " prefetching";
734  if (highlight(label))
735  stream_modules_[sid][mid] = nvtxDomainRangeStartColor(stream_domain(sid), label.c_str(), nvtxAmber);
736  else
737  stream_modules_[sid][mid] = nvtxDomainRangeStart(stream_domain(sid), label.c_str());
738 }
std::vector< std::vector< nvtxRangeId_t > > stream_modules_
tuple msg
Definition: mps_check.py:277
bool highlight(std::string const &)
nvtxDomainHandle_t stream_domain(unsigned int sid)
void NVProfilerService::preModuleGlobalBeginLumi ( edm::GlobalContext const &  gc,
edm::ModuleCallingContext const &  mcc 
)

Definition at line 974 of file NVProfilerService.cc.

References global_domain(), global_modules_, highlight(), edm::ModuleDescription::id(), diffTwoXMLs::label, edm::ModuleCallingContext::moduleDescription(), edm::ModuleDescription::moduleLabel(), and mps_check::msg.

Referenced by NVProfilerService().

974  {
975  auto mid = mcc.moduleDescription()->id();
976  auto const & label = mcc.moduleDescription()->moduleLabel();
977  auto const & msg = label + " global begin lumi";
978  if (highlight(label))
979  global_modules_[mid] = nvtxDomainRangeStartColor(global_domain(), msg.c_str(), nvtxAmber);
980  else
981  global_modules_[mid] = nvtxDomainRangeStart(global_domain(), msg.c_str());
982 }
nvtxDomainHandle_t global_domain()
tbb::concurrent_vector< nvtxRangeId_t > global_modules_
tuple msg
Definition: mps_check.py:277
bool highlight(std::string const &)
void NVProfilerService::preModuleGlobalBeginRun ( edm::GlobalContext const &  gc,
edm::ModuleCallingContext const &  mcc 
)

Definition at line 940 of file NVProfilerService.cc.

References global_domain(), global_modules_, highlight(), edm::ModuleDescription::id(), diffTwoXMLs::label, edm::ModuleCallingContext::moduleDescription(), edm::ModuleDescription::moduleLabel(), and mps_check::msg.

Referenced by NVProfilerService().

940  {
941  auto mid = mcc.moduleDescription()->id();
942  auto const & label = mcc.moduleDescription()->moduleLabel();
943  auto const & msg = label + " global begin run";
944  if (highlight(label))
945  global_modules_[mid] = nvtxDomainRangeStartColor(global_domain(), msg.c_str(), nvtxAmber);
946  else
947  global_modules_[mid] = nvtxDomainRangeStart(global_domain(), msg.c_str());
948 }
nvtxDomainHandle_t global_domain()
tbb::concurrent_vector< nvtxRangeId_t > global_modules_
tuple msg
Definition: mps_check.py:277
bool highlight(std::string const &)
void NVProfilerService::preModuleGlobalEndLumi ( edm::GlobalContext const &  gc,
edm::ModuleCallingContext const &  mcc 
)

Definition at line 991 of file NVProfilerService.cc.

References global_domain(), global_modules_, highlight(), edm::ModuleDescription::id(), diffTwoXMLs::label, edm::ModuleCallingContext::moduleDescription(), edm::ModuleDescription::moduleLabel(), and mps_check::msg.

Referenced by NVProfilerService().

991  {
992  auto mid = mcc.moduleDescription()->id();
993  auto const & label = mcc.moduleDescription()->moduleLabel();
994  auto const & msg = label + " global end lumi";
995  if (highlight(label))
996  global_modules_[mid] = nvtxDomainRangeStartColor(global_domain(), msg.c_str(), nvtxAmber);
997  else
998  global_modules_[mid] = nvtxDomainRangeStart(global_domain(), msg.c_str());
999 }
nvtxDomainHandle_t global_domain()
tbb::concurrent_vector< nvtxRangeId_t > global_modules_
tuple msg
Definition: mps_check.py:277
bool highlight(std::string const &)
void NVProfilerService::preModuleGlobalEndRun ( edm::GlobalContext const &  gc,
edm::ModuleCallingContext const &  mcc 
)

Definition at line 957 of file NVProfilerService.cc.

References global_domain(), global_modules_, highlight(), edm::ModuleDescription::id(), diffTwoXMLs::label, edm::ModuleCallingContext::moduleDescription(), edm::ModuleDescription::moduleLabel(), and mps_check::msg.

Referenced by NVProfilerService().

957  {
958  auto mid = mcc.moduleDescription()->id();
959  auto const & label = mcc.moduleDescription()->moduleLabel();
960  auto const & msg = label + " global end run";
961  if (highlight(label))
962  global_modules_[mid] = nvtxDomainRangeStartColor(global_domain(), msg.c_str(), nvtxAmber);
963  else
964  global_modules_[mid] = nvtxDomainRangeStart(global_domain(), msg.c_str());
965 }
nvtxDomainHandle_t global_domain()
tbb::concurrent_vector< nvtxRangeId_t > global_modules_
tuple msg
Definition: mps_check.py:277
bool highlight(std::string const &)
void NVProfilerService::preModuleStreamBeginLumi ( edm::StreamContext const &  sc,
edm::ModuleCallingContext const &  mcc 
)

Definition at line 902 of file NVProfilerService.cc.

References highlight(), edm::ModuleDescription::id(), diffTwoXMLs::label, edm::ModuleCallingContext::moduleDescription(), edm::ModuleDescription::moduleLabel(), mps_check::msg, stream_domain(), stream_modules_, and edm::StreamContext::streamID().

Referenced by NVProfilerService().

902  {
903  auto sid = sc.streamID();
904  auto mid = mcc.moduleDescription()->id();
905  auto const & label = mcc.moduleDescription()->moduleLabel();
906  auto const & msg = label + " stream begin lumi";
907  if (highlight(label))
908  stream_modules_[sid][mid] = nvtxDomainRangeStartColor(stream_domain(sid), msg.c_str(), nvtxAmber);
909  else
910  stream_modules_[sid][mid] = nvtxDomainRangeStart(stream_domain(sid), msg.c_str());
911 }
std::vector< std::vector< nvtxRangeId_t > > stream_modules_
tuple msg
Definition: mps_check.py:277
bool highlight(std::string const &)
nvtxDomainHandle_t stream_domain(unsigned int sid)
void NVProfilerService::preModuleStreamBeginRun ( edm::StreamContext const &  sc,
edm::ModuleCallingContext const &  mcc 
)

Definition at line 864 of file NVProfilerService.cc.

References highlight(), edm::ModuleDescription::id(), diffTwoXMLs::label, edm::ModuleCallingContext::moduleDescription(), edm::ModuleDescription::moduleLabel(), mps_check::msg, stream_domain(), stream_modules_, and edm::StreamContext::streamID().

Referenced by NVProfilerService().

864  {
865  auto sid = sc.streamID();
866  auto mid = mcc.moduleDescription()->id();
867  auto const & label = mcc.moduleDescription()->moduleLabel();
868  auto const & msg = label + " stream begin run";
869  if (highlight(label))
870  stream_modules_[sid][mid] = nvtxDomainRangeStartColor(stream_domain(sid), msg.c_str(), nvtxAmber);
871  else
872  stream_modules_[sid][mid] = nvtxDomainRangeStart(stream_domain(sid), msg.c_str());
873 }
std::vector< std::vector< nvtxRangeId_t > > stream_modules_
tuple msg
Definition: mps_check.py:277
bool highlight(std::string const &)
nvtxDomainHandle_t stream_domain(unsigned int sid)
void NVProfilerService::preModuleStreamEndLumi ( edm::StreamContext const &  sc,
edm::ModuleCallingContext const &  mcc 
)

Definition at line 921 of file NVProfilerService.cc.

References highlight(), edm::ModuleDescription::id(), diffTwoXMLs::label, edm::ModuleCallingContext::moduleDescription(), edm::ModuleDescription::moduleLabel(), mps_check::msg, stream_domain(), stream_modules_, and edm::StreamContext::streamID().

Referenced by NVProfilerService().

921  {
922  auto sid = sc.streamID();
923  auto mid = mcc.moduleDescription()->id();
924  auto const & label = mcc.moduleDescription()->moduleLabel();
925  auto const & msg = label + " stream end lumi";
926  if (highlight(label))
927  stream_modules_[sid][mid] = nvtxDomainRangeStartColor(stream_domain(sid), msg.c_str(), nvtxAmber);
928  else
929  stream_modules_[sid][mid] = nvtxDomainRangeStart(stream_domain(sid), msg.c_str());
930 }
std::vector< std::vector< nvtxRangeId_t > > stream_modules_
tuple msg
Definition: mps_check.py:277
bool highlight(std::string const &)
nvtxDomainHandle_t stream_domain(unsigned int sid)
void NVProfilerService::preModuleStreamEndRun ( edm::StreamContext const &  sc,
edm::ModuleCallingContext const &  mcc 
)

Definition at line 883 of file NVProfilerService.cc.

References highlight(), edm::ModuleDescription::id(), diffTwoXMLs::label, edm::ModuleCallingContext::moduleDescription(), edm::ModuleDescription::moduleLabel(), mps_check::msg, stream_domain(), stream_modules_, and edm::StreamContext::streamID().

Referenced by NVProfilerService().

883  {
884  auto sid = sc.streamID();
885  auto mid = mcc.moduleDescription()->id();
886  auto const & label = mcc.moduleDescription()->moduleLabel();
887  auto const & msg = label + " stream end run";
888  if (highlight(label))
889  stream_modules_[sid][mid] = nvtxDomainRangeStartColor(stream_domain(sid), msg.c_str(), nvtxAmber);
890  else
891  stream_modules_[sid][mid] = nvtxDomainRangeStart(stream_domain(sid), msg.c_str());
892 }
std::vector< std::vector< nvtxRangeId_t > > stream_modules_
tuple msg
Definition: mps_check.py:277
bool highlight(std::string const &)
nvtxDomainHandle_t stream_domain(unsigned int sid)
void NVProfilerService::preOpenFile ( std::string const &  lfn,
bool   
)

Definition at line 559 of file NVProfilerService.cc.

References global_domain(), and alignCSCRings::s.

Referenced by NVProfilerService().

559  {
560  nvtxDomainRangePush(global_domain(), ("open file "s + lfn).c_str());
561 }
nvtxDomainHandle_t global_domain()
void NVProfilerService::prePathEvent ( edm::StreamContext const &  sc,
edm::PathContext const &  pc 
)

Definition at line 717 of file NVProfilerService.cc.

References global_domain(), edm::PathContext::pathName(), alignCSCRings::s, and edm::StreamContext::streamID().

Referenced by NVProfilerService().

717  {
718  auto sid = sc.streamID();
719  nvtxDomainMark(global_domain(), ("before path "s + pc.pathName()).c_str());
720 }
nvtxDomainHandle_t global_domain()
void NVProfilerService::preSourceConstruction ( edm::ModuleDescription const &  desc)

Definition at line 1008 of file NVProfilerService.cc.

References global_domain(), global_modules_, highlight(), edm::ModuleDescription::id(), diffTwoXMLs::label, edm::ModuleDescription::moduleLabel(), and mps_check::msg.

Referenced by NVProfilerService().

1008  {
1009  auto mid = desc.id();
1010  global_modules_.grow_to_at_least(mid+1);
1011  auto const & label = desc.moduleLabel();
1012  auto const & msg = label + " construction";
1013  if (highlight(label))
1014  global_modules_[mid] = nvtxDomainRangeStartColor(global_domain(), msg.c_str(), nvtxAmber);
1015  else
1016  global_modules_[mid] = nvtxDomainRangeStart(global_domain(), msg.c_str());
1017 }
nvtxDomainHandle_t global_domain()
tbb::concurrent_vector< nvtxRangeId_t > global_modules_
tuple msg
Definition: mps_check.py:277
bool highlight(std::string const &)
void NVProfilerService::preSourceEvent ( edm::StreamID  sid)

Definition at line 529 of file NVProfilerService.cc.

References stream_domain().

Referenced by NVProfilerService().

529  {
530  nvtxDomainRangePush(stream_domain(sid), "source");
531 }
nvtxDomainHandle_t stream_domain(unsigned int sid)
void NVProfilerService::preSourceLumi ( )

Definition at line 539 of file NVProfilerService.cc.

References global_domain().

Referenced by NVProfilerService().

539  {
540  nvtxDomainRangePush(global_domain(), "source lumi");
541 }
nvtxDomainHandle_t global_domain()
void NVProfilerService::preSourceRun ( )

Definition at line 549 of file NVProfilerService.cc.

References global_domain().

Referenced by NVProfilerService().

549  {
550  nvtxDomainRangePush(global_domain(), "source run");
551 }
nvtxDomainHandle_t global_domain()
void NVProfilerService::preStreamBeginLumi ( edm::StreamContext const &  sc)

Definition at line 681 of file NVProfilerService.cc.

References stream_domain(), and edm::StreamContext::streamID().

Referenced by NVProfilerService().

681  {
682  auto sid = sc.streamID();
683  nvtxDomainRangePush(stream_domain(sid), "stream begin lumi");
684 }
nvtxDomainHandle_t stream_domain(unsigned int sid)
void NVProfilerService::preStreamBeginRun ( edm::StreamContext const &  sc)

Definition at line 637 of file NVProfilerService.cc.

References stream_domain(), and edm::StreamContext::streamID().

Referenced by NVProfilerService().

637  {
638  auto sid = sc.streamID();
639  nvtxDomainRangePush(stream_domain(sid), "stream begin run");
640 }
nvtxDomainHandle_t stream_domain(unsigned int sid)
void NVProfilerService::preStreamEndLumi ( edm::StreamContext const &  sc)

Definition at line 693 of file NVProfilerService.cc.

References stream_domain(), and edm::StreamContext::streamID().

Referenced by NVProfilerService().

693  {
694  auto sid = sc.streamID();
695  nvtxDomainRangePush(stream_domain(sid), "stream end lumi");
696 }
nvtxDomainHandle_t stream_domain(unsigned int sid)
void NVProfilerService::preStreamEndRun ( edm::StreamContext const &  sc)

Definition at line 649 of file NVProfilerService.cc.

References stream_domain(), and edm::StreamContext::streamID().

Referenced by NVProfilerService().

649  {
650  auto sid = sc.streamID();
651  nvtxDomainRangePush(stream_domain(sid), "stream end run");
652 }
nvtxDomainHandle_t stream_domain(unsigned int sid)
nvtxDomainHandle_t NVProfilerService::stream_domain ( unsigned int  sid)
inlineprivate

Friends And Related Function Documentation

friend struct Domains
friend

Definition at line 305 of file NVProfilerService.cc.

Member Data Documentation

unsigned int NVProfilerService::concurrentStreams_
private
tbb::enumerable_thread_specific<Domains> NVProfilerService::domains_
private

Definition at line 307 of file NVProfilerService.cc.

Referenced by preallocate().

std::vector<nvtxRangeId_t> NVProfilerService::event_
private

Definition at line 274 of file NVProfilerService.cc.

Referenced by postEvent(), preallocate(), and preEvent().

tbb::concurrent_vector<nvtxRangeId_t> NVProfilerService::global_modules_
private
std::vector<std::string> NVProfilerService::highlightModules_
private

Definition at line 271 of file NVProfilerService.cc.

Referenced by highlight(), and NVProfilerService().

std::vector<std::vector<nvtxRangeId_t> > NVProfilerService::stream_modules_
private