CMS 3D CMS Logo

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

#include <FastTimerService.h>

Inheritance diagram for FastTimerService:

Classes

struct  AtomicResources
 
struct  GroupOfModules
 
struct  Measurement
 
struct  PlotRanges
 
class  PlotsPerElement
 
class  PlotsPerJob
 
class  PlotsPerPath
 
class  PlotsPerProcess
 
struct  Resources
 
struct  ResourcesPerJob
 
struct  ResourcesPerModule
 
struct  ResourcesPerPath
 
struct  ResourcesPerProcess
 

Public Member Functions

 FastTimerService (const edm::ParameterSet &, edm::ActivityRegistry &)
 
template<typename T >
void printEvent (T &out, ResourcesPerJob const &data) const
 
template<typename T >
void printEventHeader (T &out, std::string const &label) const
 
template<typename T >
void printEventLine (T &out, Resources const &data, std::string const &label) const
 
template<typename T >
void printEventLine (T &out, AtomicResources const &data, std::string const &label) const
 
template<typename T >
void printHeader (T &out, std::string const &label) const
 
template<typename T >
void printPathSummaryHeader (T &out, std::string const &label) const
 
template<typename T >
void printPathSummaryLine (T &out, Resources const &data, Resources const &total, uint64_t events, std::string const &label) const
 
template<typename T >
void printSummary (T &out, ResourcesPerJob const &data, std::string const &label) const
 
template<typename T >
void printSummaryHeader (T &out, std::string const &label, bool detailed) const
 
template<typename T >
void printSummaryLine (T &out, Resources const &data, uint64_t events, std::string const &label) const
 
template<typename T >
void printSummaryLine (T &out, Resources const &data, uint64_t events, uint64_t active, std::string const &label) const
 
template<typename T >
void printTransition (T &out, AtomicResources const &data, std::string const &label) const
 
 ~FastTimerService () override=default
 

Static Public Member Functions

static void fillDescriptions (edm::ConfigurationDescriptions &descriptions)
 

Private Member Functions

void ignoredSignal (const std::string &signal) const
 
bool isFirstSubprocess (edm::StreamContext const &)
 
bool isFirstSubprocess (edm::GlobalContext const &)
 
bool isLastSubprocess (std::atomic< unsigned int > &check)
 
void on_scheduler_entry (bool worker) final
 
void on_scheduler_exit (bool worker) final
 
void postBeginJob ()
 
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 postModuleEvent (edm::StreamContext const &, edm::ModuleCallingContext const &)
 
void postModuleEventAcquire (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 postPathEvent (edm::StreamContext const &, edm::PathContext const &, edm::HLTPathStatus const &)
 
void postSourceEvent (edm::StreamID)
 
void postSourceLumi (edm::LuminosityBlockIndex)
 
void postSourceRun (edm::RunIndex)
 
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 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 preModuleEvent (edm::StreamContext const &, edm::ModuleCallingContext const &)
 
void preModuleEventAcquire (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 prePathEvent (edm::StreamContext const &, edm::PathContext const &)
 
void preSourceConstruction (edm::ModuleDescription const &)
 
void preSourceEvent (edm::StreamID)
 
void preSourceLumi (edm::LuminosityBlockIndex)
 
void preSourceRun (edm::RunIndex)
 
void preStreamBeginLumi (edm::StreamContext const &)
 
void preStreamBeginRun (edm::StreamContext const &)
 
void preStreamEndLumi (edm::StreamContext const &)
 
void preStreamEndRun (edm::StreamContext const &)
 
template<typename T >
void printEvent (T &out, ResourcesPerJob const &) const
 
template<typename T >
void printEventHeader (T &out, std::string const &label) const
 
template<typename T >
void printEventLine (T &out, Resources const &data, std::string const &label) const
 
template<typename T >
void printEventLine (T &out, AtomicResources const &data, std::string const &label) const
 
template<typename T >
void printHeader (T &out, std::string const &label) const
 
template<typename T >
void printPathSummaryHeader (T &out, std::string const &label) const
 
template<typename T >
void printPathSummaryLine (T &out, Resources const &data, Resources const &total, uint64_t events, std::string const &label) const
 
template<typename T >
void printSummary (T &out, ResourcesPerJob const &data, std::string const &label) const
 
template<typename T >
void printSummaryHeader (T &out, std::string const &label, bool detailed) const
 
template<typename T >
void printSummaryLine (T &out, Resources const &data, uint64_t events, std::string const &label) const
 
template<typename T >
void printSummaryLine (T &out, Resources const &data, uint64_t events, uint64_t active, std::string const &label) const
 
template<typename T >
void printTransition (T &out, AtomicResources const &data, std::string const &label) const
 
Measurementthread ()
 
void unsupportedSignal (const std::string &signal) const
 

Private Attributes

ProcessCallGraph callgraph_
 
unsigned int concurrent_lumis_
 
unsigned int concurrent_runs_
 
unsigned int concurrent_streams_
 
unsigned int concurrent_threads_
 
const PlotRanges dqm_event_ranges_
 
const unsigned int dqm_lumisections_range_
 
const PlotRanges dqm_module_ranges_
 
std::string dqm_path_
 
const PlotRanges dqm_path_ranges_
 
bool enable_dqm_
 
const bool enable_dqm_byls_
 
const bool enable_dqm_bymodule_
 
const bool enable_dqm_bynproc_
 
const bool enable_dqm_bypath_
 
const bool enable_dqm_transitions_
 
std::vector< edm::ParameterSethighlight_module_psets_
 
std::vector< GroupOfModuleshighlight_modules_
 
ResourcesPerJob job_summary_
 
std::vector< AtomicResourceslumi_transition_
 
AtomicResources overhead_
 
std::unique_ptr< PlotsPerJobplots_
 
const bool print_event_summary_
 
const bool print_job_summary_
 
const bool print_run_summary_
 
std::vector< ResourcesPerJobrun_summary_
 
std::vector< AtomicResourcesrun_transition_
 
std::vector< ResourcesPerJobstreams_
 
std::unique_ptr< std::atomic< unsigned int >[]> subprocess_event_check_
 
std::unique_ptr< std::atomic< unsigned int >[]> subprocess_global_lumi_check_
 
std::unique_ptr< std::atomic< unsigned int >[]> subprocess_global_run_check_
 
std::mutex summary_mutex_
 
tbb::enumerable_thread_specific< Measurement, tbb::cache_aligned_allocator< Measurement >, tbb::ets_key_per_instance > threads_
 
tbb::concurrent_unordered_set< std::string > unsupported_signals_
 

Detailed Description

Definition at line 51 of file FastTimerService.h.

Constructor & Destructor Documentation

FastTimerService::FastTimerService ( const edm::ParameterSet config,
edm::ActivityRegistry registry 
)

Definition at line 870 of file FastTimerService.cc.

References dqm_lumisections_range_, dqm_module_ranges_, dqm_path_, dqm_path_ranges_, edm::ParameterSet::getUntrackedParameter(), highlight_module_psets_, highlight_modules_, postBeginJob(), postEndJob(), postEvent(), postGlobalEndLumi(), postGlobalEndRun(), postModuleEvent(), postModuleEventAcquire(), postModuleEventDelayedGet(), postModuleGlobalBeginLumi(), postModuleGlobalBeginRun(), postModuleGlobalEndLumi(), postModuleGlobalEndRun(), postModuleStreamBeginLumi(), postModuleStreamBeginRun(), postModuleStreamEndLumi(), postModuleStreamEndRun(), postPathEvent(), postSourceEvent(), postSourceLumi(), postSourceRun(), postStreamEndLumi(), postStreamEndRun(), preallocate(), preBeginJob(), preEvent(), preGlobalBeginLumi(), preGlobalBeginRun(), preModuleEvent(), preModuleEventAcquire(), preModuleEventDelayedGet(), preModuleGlobalBeginLumi(), preModuleGlobalBeginRun(), preModuleGlobalEndLumi(), preModuleGlobalEndRun(), preModuleStreamBeginLumi(), preModuleStreamBeginRun(), preModuleStreamEndLumi(), preModuleStreamEndRun(), prePathEvent(), preSourceConstruction(), preSourceEvent(), preSourceLumi(), preSourceRun(), preStreamBeginLumi(), preStreamBeginRun(), PhysicsTools::registry, and AlCaHLTBitMon_QueryRunRegistry::string.

Referenced by fillDescriptions().

870  :
871  // configuration
872  callgraph_(),
873  // job configuration
874  concurrent_lumis_( 0 ),
875  concurrent_runs_( 0 ),
876  concurrent_streams_( 0 ),
877  concurrent_threads_( 0 ),
878  print_event_summary_( config.getUntrackedParameter<bool>( "printEventSummary" ) ),
879  print_run_summary_( config.getUntrackedParameter<bool>( "printRunSummary" ) ),
880  print_job_summary_( config.getUntrackedParameter<bool>( "printJobSummary" ) ),
881  // dqm configuration
882  enable_dqm_( config.getUntrackedParameter<bool>( "enableDQM" ) ),
883  enable_dqm_bymodule_( config.getUntrackedParameter<bool>( "enableDQMbyModule" ) ),
884  enable_dqm_bypath_( config.getUntrackedParameter<bool>( "enableDQMbyPath" ) ),
885  enable_dqm_byls_( config.getUntrackedParameter<bool>( "enableDQMbyLumiSection" ) ),
886  enable_dqm_bynproc_( config.getUntrackedParameter<bool>( "enableDQMbyProcesses" ) ),
887  enable_dqm_transitions_( config.getUntrackedParameter<bool>( "enableDQMTransitions" ) ),
888  dqm_event_ranges_( { config.getUntrackedParameter<double>( "dqmTimeRange" ), // ms
889  config.getUntrackedParameter<double>( "dqmTimeResolution" ), // ms
890  config.getUntrackedParameter<double>( "dqmMemoryRange" ), // kB
891  config.getUntrackedParameter<double>( "dqmMemoryResolution" ) } ), // kB
892  dqm_path_ranges_( { config.getUntrackedParameter<double>( "dqmPathTimeRange" ), // ms
893  config.getUntrackedParameter<double>( "dqmPathTimeResolution" ), // ms
894  config.getUntrackedParameter<double>( "dqmPathMemoryRange" ), // kB
895  config.getUntrackedParameter<double>( "dqmPathMemoryResolution" ) } ), // kB
896  dqm_module_ranges_( { config.getUntrackedParameter<double>( "dqmModuleTimeRange" ), // ms
897  config.getUntrackedParameter<double>( "dqmModuleTimeResolution" ), // ms
898  config.getUntrackedParameter<double>( "dqmModuleMemoryRange" ), // kB
899  config.getUntrackedParameter<double>( "dqmModuleMemoryResolution") } ), // kB
900  dqm_lumisections_range_( config.getUntrackedParameter<unsigned int>( "dqmLumiSectionsRange" ) ),
901  dqm_path_( config.getUntrackedParameter<std::string>("dqmPath" ) ),
902  // highlight configuration
903  highlight_module_psets_( config.getUntrackedParameter<std::vector<edm::ParameterSet>>("highlightModules") ),
904  highlight_modules_( highlight_module_psets_.size()) // filled in postBeginJob()
905 {
906  // start observing when a thread enters or leaves the TBB global thread arena
907  tbb::task_scheduler_observer::observe();
908 
909  // register EDM call backs
913  registry.watchPostEndJob( this, & FastTimerService::postEndJob );
915 //registry.watchPostGlobalBeginRun( this, & FastTimerService::postGlobalBeginRun );
916 //registry.watchPreGlobalEndRun( this, & FastTimerService::preGlobalEndRun );
919 //registry.watchPostStreamBeginRun( this, & FastTimerService::postStreamBeginRun );
920 //registry.watchPreStreamEndRun( this, & FastTimerService::preStreamEndRun );
923 //registry.watchPostGlobalBeginLumi( this, & FastTimerService::postGlobalBeginLumi );
924 //registry.watchPreGlobalEndLumi( this, & FastTimerService::preGlobalEndLumi );
927 //registry.watchPostStreamBeginLumi( this, & FastTimerService::postStreamBeginLumi );
928 //registry.watchPreStreamEndLumi( this, & FastTimerService::preStreamEndLumi );
930  registry.watchPreEvent( this, & FastTimerService::preEvent );
931  registry.watchPostEvent( this, & FastTimerService::postEvent );
935 //registry.watchPostSourceConstruction( this, & FastTimerService::postSourceConstruction);
942 //registry.watchPreModuleConstruction( this, & FastTimerService::preModuleConstruction);
943 //registry.watchPostModuleConstruction( this, & FastTimerService::postModuleConstruction);
944 //registry.watchPreModuleBeginJob( this, & FastTimerService::preModuleBeginJob );
945 //registry.watchPostModuleBeginJob( this, & FastTimerService::postModuleBeginJob );
946 //registry.watchPreModuleEndJob( this, & FastTimerService::preModuleEndJob );
947 //registry.watchPostModuleEndJob( this, & FastTimerService::postModuleEndJob );
948 //registry.watchPreModuleBeginStream( this, & FastTimerService::preModuleBeginStream );
949 //registry.watchPostModuleBeginStream( this, & FastTimerService::postModuleBeginStream );
950 //registry.watchPreModuleEndStream( this, & FastTimerService::preModuleEndStream );
951 //registry.watchPostModuleEndStream( this, & FastTimerService::postModuleEndStream );
968 //registry.watchPreModuleEventPrefetching( this, & FastTimerService::preModuleEventPrefetching );
969 //registry.watchPostModuleEventPrefetching( this, & FastTimerService::postModuleEventPrefetching );
976 //registry.watchPreEventReadFromSource( this, & FastTimerService::preEventReadFromSource );
977 //registry.watchPostEventReadFromSource( this, & FastTimerService::postEventReadFromSource );
978 }
void watchPostModuleGlobalEndLumi(PostModuleGlobalEndLumi::slot_type const &iSlot)
void preGlobalBeginRun(edm::GlobalContext const &)
void preModuleEventDelayedGet(edm::StreamContext const &, edm::ModuleCallingContext const &)
const bool print_run_summary_
void watchPreModuleGlobalBeginRun(PreModuleGlobalBeginRun::slot_type const &iSlot)
T getUntrackedParameter(std::string const &, T const &) const
void watchPreEvent(PreEvent::slot_type const &iSlot)
void postGlobalEndLumi(edm::GlobalContext const &)
void postStreamEndLumi(edm::StreamContext const &)
std::vector< edm::ParameterSet > highlight_module_psets_
void postModuleGlobalEndLumi(edm::GlobalContext const &, edm::ModuleCallingContext const &)
void preBeginJob(edm::PathsAndConsumesOfModulesBase const &, edm::ProcessContext const &)
void watchPrePathEvent(PrePathEvent::slot_type const &iSlot)
void preSourceLumi(edm::LuminosityBlockIndex)
void watchPreallocate(Preallocate::slot_type const &iSlot)
unsigned int concurrent_threads_
void watchPreModuleEventAcquire(PreModuleEventAcquire::slot_type const &iSlot)
void watchPostEndJob(PostEndJob::slot_type const &iSlot)
const PlotRanges dqm_event_ranges_
void postModuleGlobalEndRun(edm::GlobalContext const &, edm::ModuleCallingContext const &)
void preSourceRun(edm::RunIndex)
void postModuleEvent(edm::StreamContext const &, edm::ModuleCallingContext const &)
std::vector< GroupOfModules > highlight_modules_
void watchPreModuleEvent(PreModuleEvent::slot_type const &iSlot)
void watchPostEvent(PostEvent::slot_type const &iSlot)
void watchPreSourceConstruction(PreSourceConstruction::slot_type const &iSlot)
const bool enable_dqm_bynproc_
unsigned int concurrent_runs_
void watchPostStreamEndLumi(PostStreamEndLumi::slot_type const &iSlot)
void watchPreGlobalBeginLumi(PreGlobalBeginLumi::slot_type const &iSlot)
void watchPostPathEvent(PostPathEvent::slot_type const &iSlot)
void watchPostModuleEvent(PostModuleEvent::slot_type const &iSlot)
void watchPostModuleGlobalBeginLumi(PostModuleGlobalBeginLumi::slot_type const &iSlot)
void watchPostModuleStreamEndLumi(PostModuleStreamEndLumi::slot_type const &iSlot)
void watchPostModuleStreamBeginRun(PostModuleStreamBeginRun::slot_type const &iSlot)
void watchPostSourceEvent(PostSourceEvent::slot_type const &iSlot)
void postSourceRun(edm::RunIndex)
void postPathEvent(edm::StreamContext const &, edm::PathContext const &, edm::HLTPathStatus const &)
void preModuleGlobalBeginLumi(edm::GlobalContext const &, edm::ModuleCallingContext const &)
const bool print_job_summary_
void watchPreModuleGlobalEndRun(PreModuleGlobalEndRun::slot_type const &iSlot)
const bool enable_dqm_bypath_
const PlotRanges dqm_path_ranges_
void postModuleStreamEndLumi(edm::StreamContext const &, edm::ModuleCallingContext const &)
void prePathEvent(edm::StreamContext const &, edm::PathContext const &)
void watchPostSourceRun(PostSourceRun::slot_type const &iSlot)
void watchPreSourceLumi(PreSourceLumi::slot_type const &iSlot)
void preModuleStreamEndLumi(edm::StreamContext const &, edm::ModuleCallingContext const &)
void watchPreModuleEventDelayedGet(PreModuleEventDelayedGet::slot_type const &iSlot)
void postEvent(edm::StreamContext const &)
void postGlobalEndRun(edm::GlobalContext const &)
const unsigned int dqm_lumisections_range_
void postStreamEndRun(edm::StreamContext const &)
void preModuleEvent(edm::StreamContext const &, edm::ModuleCallingContext const &)
void watchPostModuleEventAcquire(PostModuleEventAcquire::slot_type const &iSlot)
unsigned int concurrent_lumis_
std::string dqm_path_
void watchPostGlobalEndLumi(PostGlobalEndLumi::slot_type const &iSlot)
const bool enable_dqm_transitions_
void watchPreSourceRun(PreSourceRun::slot_type const &iSlot)
void watchPostStreamEndRun(PostStreamEndRun::slot_type const &iSlot)
const bool enable_dqm_bymodule_
void watchPostModuleStreamEndRun(PostModuleStreamEndRun::slot_type const &iSlot)
void watchPreModuleGlobalBeginLumi(PreModuleGlobalBeginLumi::slot_type const &iSlot)
void watchPreGlobalBeginRun(PreGlobalBeginRun::slot_type const &iSlot)
void watchPreModuleStreamBeginLumi(PreModuleStreamBeginLumi::slot_type const &iSlot)
const PlotRanges dqm_module_ranges_
const bool enable_dqm_byls_
void postModuleEventAcquire(edm::StreamContext const &, edm::ModuleCallingContext const &)
void postModuleEventDelayedGet(edm::StreamContext const &, edm::ModuleCallingContext const &)
const bool print_event_summary_
void watchPostSourceLumi(PostSourceLumi::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 postModuleStreamBeginLumi(edm::StreamContext const &, edm::ModuleCallingContext const &)
void preModuleStreamEndRun(edm::StreamContext const &, edm::ModuleCallingContext const &)
void postModuleStreamEndRun(edm::StreamContext const &, edm::ModuleCallingContext const &)
void watchPreModuleStreamEndLumi(PreModuleStreamEndLumi::slot_type const &iSlot)
void watchPreModuleStreamBeginRun(PreModuleStreamBeginRun::slot_type const &iSlot)
void postModuleStreamBeginRun(edm::StreamContext const &, edm::ModuleCallingContext const &)
void watchPostGlobalEndRun(PostGlobalEndRun::slot_type const &iSlot)
void preSourceEvent(edm::StreamID)
void watchPreStreamBeginLumi(PreStreamBeginLumi::slot_type const &iSlot)
void preEvent(edm::StreamContext const &)
void watchPreBeginJob(PreBeginJob::slot_type const &iSlot)
convenience function for attaching to signal
void preStreamBeginLumi(edm::StreamContext const &)
void postSourceEvent(edm::StreamID)
void preModuleStreamBeginLumi(edm::StreamContext const &, edm::ModuleCallingContext const &)
void preModuleStreamBeginRun(edm::StreamContext const &, edm::ModuleCallingContext const &)
void watchPreStreamBeginRun(PreStreamBeginRun::slot_type const &iSlot)
void watchPreModuleStreamEndRun(PreModuleStreamEndRun::slot_type const &iSlot)
void preModuleGlobalEndLumi(edm::GlobalContext const &, edm::ModuleCallingContext const &)
void watchPostModuleGlobalBeginRun(PostModuleGlobalBeginRun::slot_type const &iSlot)
void preGlobalBeginLumi(edm::GlobalContext const &)
void preSourceConstruction(edm::ModuleDescription const &)
void preModuleEventAcquire(edm::StreamContext const &, edm::ModuleCallingContext const &)
void preModuleGlobalEndRun(edm::GlobalContext const &, edm::ModuleCallingContext const &)
void postSourceLumi(edm::LuminosityBlockIndex)
void postModuleGlobalBeginRun(edm::GlobalContext const &, edm::ModuleCallingContext const &)
void watchPreSourceEvent(PreSourceEvent::slot_type const &iSlot)
ProcessCallGraph callgraph_
void postModuleGlobalBeginLumi(edm::GlobalContext const &, edm::ModuleCallingContext const &)
void preStreamBeginRun(edm::StreamContext const &)
void preModuleGlobalBeginRun(edm::GlobalContext const &, edm::ModuleCallingContext const &)
unsigned int concurrent_streams_
void watchPreModuleGlobalEndLumi(PreModuleGlobalEndLumi::slot_type const &iSlot)
void preallocate(edm::service::SystemBounds const &)
void watchPostBeginJob(PostBeginJob::slot_type const &iSlot)
convenience function for attaching to signal
FastTimerService::~FastTimerService ( )
overridedefault

Member Function Documentation

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

Definition at line 1830 of file FastTimerService.cc.

References edm::ConfigurationDescriptions::add(), edm::ParameterSetDescription::addOptionalNode(), edm::ParameterSetDescription::addUntracked(), edm::ParameterSetDescription::addVPSetUntracked(), DEFINE_FWK_SERVICE, FastTimerService(), edm::ParameterDescriptionNode::setComment(), and AlCaHLTBitMon_QueryRunRegistry::string.

1831 {
1833  desc.addUntracked<bool>( "printEventSummary", false);
1834  desc.addUntracked<bool>( "printRunSummary", true);
1835  desc.addUntracked<bool>( "printJobSummary", true);
1836  desc.addUntracked<bool>( "enableDQM", true);
1837  desc.addUntracked<bool>( "enableDQMbyModule", false);
1838  desc.addUntracked<bool>( "enableDQMbyPath", false);
1839  desc.addUntracked<bool>( "enableDQMbyLumiSection", false);
1840  desc.addUntracked<bool>( "enableDQMbyProcesses", false);
1841  desc.addUntracked<bool>( "enableDQMTransitions", false);
1842  desc.addUntracked<double>( "dqmTimeRange", 1000. ); // ms
1843  desc.addUntracked<double>( "dqmTimeResolution", 5. ); // ms
1844  desc.addUntracked<double>( "dqmMemoryRange", 1000000. ); // kB
1845  desc.addUntracked<double>( "dqmMemoryResolution", 5000. ); // kB
1846  desc.addUntracked<double>( "dqmPathTimeRange", 100. ); // ms
1847  desc.addUntracked<double>( "dqmPathTimeResolution", 0.5); // ms
1848  desc.addUntracked<double>( "dqmPathMemoryRange", 1000000. ); // kB
1849  desc.addUntracked<double>( "dqmPathMemoryResolution", 5000. ); // kB
1850  desc.addUntracked<double>( "dqmModuleTimeRange", 40. ); // ms
1851  desc.addUntracked<double>( "dqmModuleTimeResolution", 0.2); // ms
1852  desc.addUntracked<double>( "dqmModuleMemoryRange", 100000. ); // kB
1853  desc.addUntracked<double>( "dqmModuleMemoryResolution", 500. ); // kB
1854  desc.addUntracked<unsigned>( "dqmLumiSectionsRange", 2500 ); // ~ 16 hours
1855  desc.addUntracked<std::string>( "dqmPath", "HLT/TimerService");
1856 
1857  edm::ParameterSetDescription highlightModulesDescription;
1858  highlightModulesDescription.addUntracked<std::vector<std::string>>("modules", {});
1859  highlightModulesDescription.addUntracked<std::string>("label", "producers");
1860  desc.addVPSetUntracked("highlightModules", highlightModulesDescription, {});
1861 
1862  // # OBSOLETE - these parameters are ignored, they are left only not to break old configurations
1863  // they will not be printed in the generated cfi.py file
1864  desc.addOptionalNode(edm::ParameterDescription<bool>("useRealTimeClock", true, false), false)->setComment("This parameter is obsolete and will be ignored.");
1865  desc.addOptionalNode(edm::ParameterDescription<bool>("enableTimingPaths", true, false), false)->setComment("This parameter is obsolete and will be ignored.");
1866  desc.addOptionalNode(edm::ParameterDescription<bool>("enableTimingModules", true, false), false)->setComment("This parameter is obsolete and will be ignored.");
1867  desc.addOptionalNode(edm::ParameterDescription<bool>("enableTimingExclusive", false, false), false)->setComment("This parameter is obsolete and will be ignored.");
1868  desc.addOptionalNode(edm::ParameterDescription<bool>("enableTimingSummary", false, false), false)->setComment("This parameter is obsolete and will be ignored.");
1869  desc.addOptionalNode(edm::ParameterDescription<bool>("skipFirstPath", false, false), false)->setComment("This parameter is obsolete and will be ignored.");
1870  desc.addOptionalNode(edm::ParameterDescription<bool>("enableDQMbyPathActive", false, false), false)->setComment("This parameter is obsolete and will be ignored.");
1871  desc.addOptionalNode(edm::ParameterDescription<bool>("enableDQMbyPathTotal", true, false), false)->setComment("This parameter is obsolete and will be ignored.");
1872  desc.addOptionalNode(edm::ParameterDescription<bool>("enableDQMbyPathOverhead", false, false), false)->setComment("This parameter is obsolete and will be ignored.");
1873  desc.addOptionalNode(edm::ParameterDescription<bool>("enableDQMbyPathDetails", false, false), false)->setComment("This parameter is obsolete and will be ignored.");
1874  desc.addOptionalNode(edm::ParameterDescription<bool>("enableDQMbyPathCounters", true, false), false)->setComment("This parameter is obsolete and will be ignored.");
1875  desc.addOptionalNode(edm::ParameterDescription<bool>("enableDQMbyPathExclusive", false, false), false)->setComment("This parameter is obsolete and will be ignored.");
1876  desc.addOptionalNode(edm::ParameterDescription<bool>("enableDQMbyModuleType", false, false), false)->setComment("This parameter is obsolete and will be ignored.");
1877  desc.addOptionalNode(edm::ParameterDescription<bool>("enableDQMSummary", false, false), false)->setComment("This parameter is obsolete and will be ignored.");
1878 
1879  descriptions.add("FastTimerService", desc);
1880 }
ParameterDescriptionBase * addUntracked(U const &iLabel, T const &value)
void add(std::string const &label, ParameterSetDescription const &psetDescription)
void FastTimerService::ignoredSignal ( const std::string &  signal) const
private
bool FastTimerService::isFirstSubprocess ( edm::StreamContext const &  )
private
bool FastTimerService::isFirstSubprocess ( edm::GlobalContext const &  )
private
bool FastTimerService::isLastSubprocess ( std::atomic< unsigned int > &  check)
private

Definition at line 1499 of file FastTimerService.cc.

References callgraph_, and ProcessCallGraph::processes().

Referenced by postEvent(), postGlobalEndLumi(), and postGlobalEndRun().

1500 {
1501  // release-acquire semantic guarantees that all writes in this and other threads are visible
1502  // after this operation; full sequentially-consistent ordering is (probably) not needed.
1503  unsigned int old_value = check.fetch_add(1, std::memory_order_acq_rel);
1504  return (old_value == callgraph_.processes().size() - 1);
1505 }
std::vector< ProcessType > const & processes() const
def check(config)
Definition: trackerTree.py:14
ProcessCallGraph callgraph_
void FastTimerService::on_scheduler_entry ( bool  worker)
finalprivate

Definition at line 1808 of file FastTimerService.cc.

References FastTimerService::Measurement::measure(), and thread().

1809 {
1810  // initialise the measurement point for a thread that has newly joining the TBB pool
1811  thread().measure();
1812 }
Measurement & thread()
void FastTimerService::on_scheduler_exit ( bool  worker)
finalprivate

Definition at line 1815 of file FastTimerService.cc.

References FastTimerService::Measurement::measure_and_accumulate(), overhead_, and thread().

1816 {
1817  // account any resources used or freed by the thread before leaving the TBB pool
1819 }
AtomicResources overhead_
Measurement & thread()
void measure_and_accumulate(Resources &store)
void FastTimerService::postBeginJob ( )
private

Definition at line 1088 of file FastTimerService.cc.

References callgraph_, concurrent_runs_, concurrent_streams_, enable_dqm_, edmIntegrityCheck::group, highlight_module_psets_, highlight_modules_, mps_fire::i, job_summary_, diffTwoXMLs::label, tablePrinter::labels, ProcessCallGraph::module(), edm::ModuleDescription::moduleLabel(), electrons_cff::modules, plots_, run_summary_, ProcessCallGraph::size(), streams_, AlCaHLTBitMon_QueryRunRegistry::string, and groupFilesInBlocks::temp.

Referenced by FastTimerService().

1088  {
1089  unsigned int modules = callgraph_.size();
1090 
1091  // module highlights
1092  for (unsigned int group: boost::irange(0ul, highlight_module_psets_.size())) {
1093  // copy and sort for faster search via std::binary_search
1094  auto labels = highlight_module_psets_[group].getUntrackedParameter<std::vector<std::string>>("modules");
1095  std::sort(labels.begin(), labels.end());
1096 
1097  highlight_modules_[group].label = highlight_module_psets_[group].getUntrackedParameter<std::string>("label");
1098  highlight_modules_[group].modules.reserve(labels.size());
1099  // convert the module labels in module ids
1100  for (unsigned int i = 0; i < modules; ++i) {
1101  auto const & label = callgraph_.module(i).moduleLabel();
1102  if (std::binary_search(labels.begin(), labels.end(), label))
1103  highlight_modules_[group].modules.push_back(i);
1104  }
1105  }
1106  highlight_module_psets_.clear();
1107 
1108  // allocate the resource counters for each stream, process, path and module
1109  ResourcesPerJob temp(callgraph_, highlight_modules_);
1112  job_summary_ = temp;
1113 
1114  // check that the DQMStore service is available
1115  if (enable_dqm_ and not edm::Service<DQMStore>().isAvailable()) {
1116  // the DQMStore is not available, disable all DQM plots
1117  enable_dqm_ = false;
1118  // FIXME issue a LogWarning ?
1119  }
1120 
1121  // allocate the structures to hold pointers to the DQM plots
1122  if (enable_dqm_) {
1123  plots_ = std::make_unique<PlotsPerJob>(callgraph_, highlight_modules_);
1124  }
1125 
1126 }
std::vector< edm::ParameterSet > highlight_module_psets_
std::vector< GroupOfModules > highlight_modules_
ResourcesPerJob job_summary_
unsigned int concurrent_runs_
std::vector< ResourcesPerJob > streams_
std::string const & moduleLabel() const
std::vector< ResourcesPerJob > run_summary_
std::unique_ptr< PlotsPerJob > plots_
unsigned int size() const
edm::ModuleDescription const & module(unsigned int module) const
ProcessCallGraph callgraph_
unsigned int concurrent_streams_
void FastTimerService::postEndJob ( )
private

Definition at line 1268 of file FastTimerService.cc.

References job_summary_, MillePedeFileConverter_cfg::out, print_job_summary_, and printSummary().

Referenced by FastTimerService().

1269 {
1270  if (print_job_summary_) {
1271  edm::LogVerbatim out("FastReport");
1272  printSummary(out, job_summary_, "Job");
1273  }
1274 }
void printSummary(T &out, ResourcesPerJob const &data, std::string const &label) const
ResourcesPerJob job_summary_
const bool print_job_summary_
void FastTimerService::postEvent ( edm::StreamContext const &  sc)
private

Definition at line 1514 of file FastTimerService.cc.

References callgraph_, data, enable_dqm_, edm::StreamContext::eventID(), edmIntegrityCheck::group, highlight_modules_, mps_fire::i, ignoredSignal(), isLastSubprocess(), job_summary_, plotBeamSpotDB::last, edm::EventID::luminosityBlock(), MillePedeFileConverter_cfg::out, sysUtil::pid, plots_, print_event_summary_, printEvent(), LaserDQM_cfg::process, edm::StreamContext::processContext(), ProcessCallGraph::processDescription(), ProcessCallGraph::processId(), run_summary_, edm::StreamContext::runIndex(), edm::StreamContext::streamID(), streams_, subprocess_event_check_, and summary_mutex_.

Referenced by FastTimerService().

1515 {
1516  ignoredSignal(__func__);
1517 
1518  unsigned int pid = callgraph_.processId(* sc.processContext());
1519  unsigned int sid = sc.streamID();
1520  auto & stream = streams_[sid];
1521  auto & process = callgraph_.processDescription(pid);
1522 
1523  // measure the event resources as the sum of all modules' resources
1524  auto & data = stream.processes[pid].total;
1525  for (unsigned int i: process.modules_)
1526  data += stream.modules[i].total;
1527  stream.total += data;
1528 
1529  // handle the summaries and fill the plots only after the last subprocess has run
1531  if (not last)
1532  return;
1533 
1534  // measure the event resources explicitly
1535  stream.event_measurement.measure_and_store(stream.event);
1536 
1537  // highlighted modules
1538  for (unsigned int group: boost::irange(0ul, highlight_modules_.size()))
1539  for (unsigned int i: highlight_modules_[group].modules)
1540  stream.highlight[group] += stream.modules[i].total;
1541 
1542  // avoid concurrent access to the summary objects
1543  {
1544  std::lock_guard<std::mutex> guard(summary_mutex_);
1545  job_summary_ += stream;
1546  run_summary_[sc.runIndex()] += stream;
1547  }
1548 
1549  if (print_event_summary_) {
1550  edm::LogVerbatim out("FastReport");
1551  printEvent(out, stream);
1552  }
1553 
1554  if (enable_dqm_) {
1555  plots_->fill(callgraph_, stream, sc.eventID().luminosityBlock());
1556  }
1557 }
std::vector< GroupOfModules > highlight_modules_
ResourcesPerJob job_summary_
unsigned int processId(edm::ProcessContext const &) const
std::vector< ResourcesPerJob > streams_
void printEvent(T &out, ResourcesPerJob const &) const
std::mutex summary_mutex_
std::vector< ResourcesPerJob > run_summary_
std::unique_ptr< std::atomic< unsigned int >[]> subprocess_event_check_
ProcessType const & processDescription(unsigned int) const
const bool print_event_summary_
void ignoredSignal(const std::string &signal) const
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:82
std::unique_ptr< PlotsPerJob > plots_
ProcessCallGraph callgraph_
bool isLastSubprocess(std::atomic< unsigned int > &check)
void FastTimerService::postEventReadFromSource ( edm::StreamContext const &  sc,
edm::ModuleCallingContext const &  mcc 
)
private

Definition at line 1698 of file FastTimerService.cc.

References ignoredSignal().

1699 {
1700  ignoredSignal(__func__);
1701 }
void ignoredSignal(const std::string &signal) const
void FastTimerService::postGlobalBeginLumi ( edm::GlobalContext const &  gc)
private

Definition at line 1160 of file FastTimerService.cc.

References ignoredSignal().

1161 {
1162  ignoredSignal(__func__);
1163 }
void ignoredSignal(const std::string &signal) const
void FastTimerService::postGlobalBeginRun ( edm::GlobalContext const &  gc)
private

Definition at line 1032 of file FastTimerService.cc.

References ignoredSignal().

1033 {
1034  ignoredSignal(__func__);
1035 }
void ignoredSignal(const std::string &signal) const
void FastTimerService::postGlobalEndLumi ( edm::GlobalContext const &  gc)
private

Definition at line 1172 of file FastTimerService.cc.

References enable_dqm_transitions_, cmsPerfStripChart::format, ignoredSignal(), isLastSubprocess(), diffTwoXMLs::label, plotBeamSpotDB::last, lumi_transition_, edm::LuminosityBlockID::luminosityBlock(), edm::GlobalContext::luminosityBlockID(), edm::GlobalContext::luminosityBlockIndex(), MillePedeFileConverter_cfg::out, plots_, printTransition(), edm::LuminosityBlockID::run(), str, and subprocess_global_lumi_check_.

Referenced by FastTimerService().

1173 {
1174  ignoredSignal(__func__);
1175 
1176  // handle the summaries only after the last subprocess has run
1177  auto index = gc.luminosityBlockIndex();
1179  if (not last)
1180  return;
1181 
1182  edm::LogVerbatim out("FastReport");
1183  auto const& label = (boost::format("run %d, lumisection %d") % gc.luminosityBlockID().run() % gc.luminosityBlockID().luminosityBlock()).str();
1185 
1187  plots_->fill_lumi(lumi_transition_[index], gc.luminosityBlockID().luminosityBlock());
1188  }
1189 }
std::unique_ptr< std::atomic< unsigned int >[]> subprocess_global_lumi_check_
format
Some error handling for the usage.
const bool enable_dqm_transitions_
void printTransition(T &out, AtomicResources const &data, std::string const &label) const
void ignoredSignal(const std::string &signal) const
std::unique_ptr< PlotsPerJob > plots_
#define str(s)
std::vector< AtomicResources > lumi_transition_
bool isLastSubprocess(std::atomic< unsigned int > &check)
void FastTimerService::postGlobalEndRun ( edm::GlobalContext const &  gc)
private

Definition at line 1221 of file FastTimerService.cc.

References enable_dqm_transitions_, cmsPerfStripChart::format, ignoredSignal(), isLastSubprocess(), diffTwoXMLs::label, plotBeamSpotDB::last, edm::GlobalContext::luminosityBlockID(), MillePedeFileConverter_cfg::out, plots_, print_run_summary_, printSummary(), printTransition(), edm::LuminosityBlockID::run(), run_summary_, run_transition_, edm::GlobalContext::runIndex(), str, and subprocess_global_run_check_.

Referenced by FastTimerService().

1222 {
1223  ignoredSignal(__func__);
1224 
1225  // handle the summaries only after the last subprocess has run
1226  auto index = gc.runIndex();
1228  if (not last)
1229  return;
1230 
1231  edm::LogVerbatim out("FastReport");
1232  auto const& label = (boost::format("Run %d") % gc.luminosityBlockID().run()).str();
1233  if (print_run_summary_) {
1235  }
1237 
1239  plots_->fill_run(run_transition_[index]);
1240  }
1241 }
const bool print_run_summary_
void printSummary(T &out, ResourcesPerJob const &data, std::string const &label) const
std::unique_ptr< std::atomic< unsigned int >[]> subprocess_global_run_check_
std::vector< ResourcesPerJob > run_summary_
format
Some error handling for the usage.
const bool enable_dqm_transitions_
std::vector< AtomicResources > run_transition_
void printTransition(T &out, AtomicResources const &data, std::string const &label) const
void ignoredSignal(const std::string &signal) const
std::unique_ptr< PlotsPerJob > plots_
#define str(s)
bool isLastSubprocess(std::atomic< unsigned int > &check)
void FastTimerService::postModuleEvent ( edm::StreamContext const &  sc,
edm::ModuleCallingContext const &  mcc 
)
private

Definition at line 1651 of file FastTimerService.cc.

References triggerObjects_cff::id, edm::ModuleDescription::id(), FastTimerService::Measurement::measure_and_accumulate(), FastTimerService::Measurement::measure_and_store(), edm::ModuleCallingContext::moduleDescription(), edm::StreamContext::streamID(), streams_, thread(), and edm::StreamID::value().

Referenced by FastTimerService().

1652 {
1653  edm::ModuleDescription const& md = * mcc.moduleDescription();
1654  unsigned int id = md.id();
1655  unsigned int sid = sc.streamID().value();
1656  auto & stream = streams_[sid];
1657  auto & module = stream.modules[id];
1658 
1659  if (module.has_acquire) {
1661  } else {
1662  thread().measure_and_store(module.total);
1663  }
1664  ++module.events;
1665 }
std::vector< ResourcesPerJob > streams_
Measurement & thread()
void measure_and_store(Resources &store)
Definition: vlib.h:208
unsigned int id() const
void measure_and_accumulate(Resources &store)
void FastTimerService::postModuleEventAcquire ( edm::StreamContext const &  sc,
edm::ModuleCallingContext const &  mcc 
)
private

Definition at line 1630 of file FastTimerService.cc.

References triggerObjects_cff::id, edm::ModuleDescription::id(), FastTimerService::Measurement::measure_and_store(), edm::ModuleCallingContext::moduleDescription(), edm::StreamContext::streamID(), streams_, thread(), and edm::StreamID::value().

Referenced by FastTimerService().

1631 {
1632  edm::ModuleDescription const& md = * mcc.moduleDescription();
1633  unsigned int id = md.id();
1634  unsigned int sid = sc.streamID().value();
1635  auto & stream = streams_[sid];
1636  auto & module = stream.modules[id];
1637 
1638  module.has_acquire = true;
1639  thread().measure_and_store(module.total);
1640 }
std::vector< ResourcesPerJob > streams_
Measurement & thread()
void measure_and_store(Resources &store)
Definition: vlib.h:208
unsigned int id() const
void FastTimerService::postModuleEventDelayedGet ( edm::StreamContext const &  sc,
edm::ModuleCallingContext const &  mcc 
)
private

Definition at line 1674 of file FastTimerService.cc.

References unsupportedSignal().

Referenced by FastTimerService().

1675 {
1676  unsupportedSignal(__func__);
1677 }
void unsupportedSignal(const std::string &signal) const
void FastTimerService::postModuleEventPrefetching ( edm::StreamContext const &  sc,
edm::ModuleCallingContext const &  mcc 
)
private

Definition at line 1686 of file FastTimerService.cc.

References ignoredSignal().

1687 {
1688  ignoredSignal(__func__);
1689 }
void ignoredSignal(const std::string &signal) const
void FastTimerService::postModuleGlobalBeginLumi ( edm::GlobalContext const &  gc,
edm::ModuleCallingContext const &  mcc 
)
private

Definition at line 1736 of file FastTimerService.cc.

References lumi_transition_, edm::GlobalContext::luminosityBlockIndex(), FastTimerService::Measurement::measure_and_accumulate(), and thread().

Referenced by FastTimerService().

1737 {
1738  auto index = gc.luminosityBlockIndex();
1740 }
Measurement & thread()
std::vector< AtomicResources > lumi_transition_
void measure_and_accumulate(Resources &store)
void FastTimerService::postModuleGlobalBeginRun ( edm::GlobalContext const &  gc,
edm::ModuleCallingContext const &  mcc 
)
private

Definition at line 1710 of file FastTimerService.cc.

References FastTimerService::Measurement::measure_and_accumulate(), run_transition_, edm::GlobalContext::runIndex(), and thread().

Referenced by FastTimerService().

1711 {
1712  auto index = gc.runIndex();
1714 }
Measurement & thread()
std::vector< AtomicResources > run_transition_
void measure_and_accumulate(Resources &store)
void FastTimerService::postModuleGlobalEndLumi ( edm::GlobalContext const &  gc,
edm::ModuleCallingContext const &  mcc 
)
private

Definition at line 1749 of file FastTimerService.cc.

References lumi_transition_, edm::GlobalContext::luminosityBlockIndex(), FastTimerService::Measurement::measure_and_accumulate(), and thread().

Referenced by FastTimerService().

1750 {
1751  auto index = gc.luminosityBlockIndex();
1753 }
Measurement & thread()
std::vector< AtomicResources > lumi_transition_
void measure_and_accumulate(Resources &store)
void FastTimerService::postModuleGlobalEndRun ( edm::GlobalContext const &  gc,
edm::ModuleCallingContext const &  mcc 
)
private

Definition at line 1723 of file FastTimerService.cc.

References FastTimerService::Measurement::measure_and_accumulate(), run_transition_, edm::GlobalContext::runIndex(), and thread().

Referenced by FastTimerService().

1724 {
1725  auto index = gc.runIndex();
1727 }
Measurement & thread()
std::vector< AtomicResources > run_transition_
void measure_and_accumulate(Resources &store)
void FastTimerService::postModuleStreamBeginLumi ( edm::StreamContext const &  sc,
edm::ModuleCallingContext const &  mcc 
)
private

Definition at line 1788 of file FastTimerService.cc.

References lumi_transition_, edm::StreamContext::luminosityBlockIndex(), FastTimerService::Measurement::measure_and_accumulate(), and thread().

Referenced by FastTimerService().

1789 {
1790  auto index = sc.luminosityBlockIndex();
1792 }
Measurement & thread()
std::vector< AtomicResources > lumi_transition_
void measure_and_accumulate(Resources &store)
void FastTimerService::postModuleStreamBeginRun ( edm::StreamContext const &  sc,
edm::ModuleCallingContext const &  mcc 
)
private

Definition at line 1762 of file FastTimerService.cc.

References FastTimerService::Measurement::measure_and_accumulate(), run_transition_, edm::StreamContext::runIndex(), and thread().

Referenced by FastTimerService().

1763 {
1764  auto index = sc.runIndex();
1766 }
Measurement & thread()
std::vector< AtomicResources > run_transition_
void measure_and_accumulate(Resources &store)
void FastTimerService::postModuleStreamEndLumi ( edm::StreamContext const &  sc,
edm::ModuleCallingContext const &  mcc 
)
private

Definition at line 1801 of file FastTimerService.cc.

References lumi_transition_, edm::StreamContext::luminosityBlockIndex(), FastTimerService::Measurement::measure_and_accumulate(), and thread().

Referenced by FastTimerService().

1802 {
1803  auto index = sc.luminosityBlockIndex();
1805 }
Measurement & thread()
std::vector< AtomicResources > lumi_transition_
void measure_and_accumulate(Resources &store)
void FastTimerService::postModuleStreamEndRun ( edm::StreamContext const &  sc,
edm::ModuleCallingContext const &  mcc 
)
private

Definition at line 1775 of file FastTimerService.cc.

References FastTimerService::Measurement::measure_and_accumulate(), run_transition_, edm::StreamContext::runIndex(), and thread().

Referenced by FastTimerService().

1776 {
1777  auto index = sc.runIndex();
1779 }
Measurement & thread()
std::vector< AtomicResources > run_transition_
void measure_and_accumulate(Resources &store)
void FastTimerService::postPathEvent ( edm::StreamContext const &  sc,
edm::PathContext const &  pc,
edm::HLTPathStatus const &  status 
)
private

Definition at line 1599 of file FastTimerService.cc.

References callgraph_, data, ProcessCallGraph::ProcessType::endPaths_, mps_fire::i, triggerObjects_cff::id, edm::HLTPathStatus::index(), edm::PathContext::isEndPath(), callgraph::path, edm::PathContext::pathID(), ProcessCallGraph::ProcessType::paths_, sysUtil::pid, edm::StreamContext::processContext(), ProcessCallGraph::processDescription(), ProcessCallGraph::processId(), edm::StreamContext::streamID(), streams_, and edm::StreamID::value().

Referenced by FastTimerService().

1600 {
1601  unsigned int sid = sc.streamID().value();
1602  unsigned int pid = callgraph_.processId(* sc.processContext());
1603  unsigned int id = pc.pathID();
1604  auto & stream = streams_[sid];
1605  auto & data = pc.isEndPath() ? stream.processes[pid].endpaths[id] : stream.processes[pid].paths[id];
1606 
1607  auto const& path = pc.isEndPath() ? callgraph_.processDescription(pid).endPaths_[id] : callgraph_.processDescription(pid).paths_[id];
1608  unsigned int index = path.modules_on_path_.empty() ? 0 : status.index() + 1;
1609  data.last = path.modules_on_path_.empty() ? 0 : path.last_dependency_of_module_[status.index()];
1610 
1611  for (unsigned int i = 0; i < index; ++i) {
1612  auto const& module = stream.modules[path.modules_on_path_[i]];
1613  data.active += module.total;
1614  }
1615  for (unsigned int i = 0; i < data.last; ++i) {
1616  auto const& module = stream.modules[path.modules_and_dependencies_[i]];
1617  data.total += module.total;
1618  }
1619 }
unsigned int processId(edm::ProcessContext const &) const
std::vector< ResourcesPerJob > streams_
std::vector< PathType > paths_
ProcessType const & processDescription(unsigned int) const
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:82
std::vector< PathType > endPaths_
ProcessCallGraph callgraph_
Definition: vlib.h:208
void FastTimerService::postSourceEvent ( edm::StreamID  sid)
private

Definition at line 1576 of file FastTimerService.cc.

References callgraph_, triggerObjects_cff::id, edm::ModuleDescription::id(), FastTimerService::Measurement::measure_and_store(), ProcessCallGraph::source(), streams_, and thread().

Referenced by FastTimerService().

1577 {
1579  unsigned int id = md.id();
1580  auto & stream = streams_[sid];
1581 
1582  thread().measure_and_store(stream.modules[id].total);
1583  ++stream.modules[id].events;
1584 }
std::vector< ResourcesPerJob > streams_
edm::ModuleDescription const & source() const
Measurement & thread()
void measure_and_store(Resources &store)
ProcessCallGraph callgraph_
unsigned int id() const
void FastTimerService::postSourceLumi ( edm::LuminosityBlockIndex  index)
private

Definition at line 1262 of file FastTimerService.cc.

References lumi_transition_, FastTimerService::Measurement::measure_and_accumulate(), and thread().

Referenced by FastTimerService().

1263 {
1265 }
Measurement & thread()
std::vector< AtomicResources > lumi_transition_
void measure_and_accumulate(Resources &store)
void FastTimerService::postSourceRun ( edm::RunIndex  index)
private

Definition at line 1250 of file FastTimerService.cc.

References FastTimerService::Measurement::measure_and_accumulate(), run_transition_, and thread().

Referenced by FastTimerService().

1251 {
1253 }
Measurement & thread()
std::vector< AtomicResources > run_transition_
void measure_and_accumulate(Resources &store)
void FastTimerService::postStreamBeginLumi ( edm::StreamContext const &  sc)
private

Definition at line 1198 of file FastTimerService.cc.

References ignoredSignal().

1199 {
1200  ignoredSignal(__func__);
1201 }
void ignoredSignal(const std::string &signal) const
void FastTimerService::postStreamBeginRun ( edm::StreamContext const &  sc)
private

Definition at line 1129 of file FastTimerService.cc.

References ignoredSignal().

1130 {
1131  ignoredSignal(__func__);
1132 }
void ignoredSignal(const std::string &signal) const
void FastTimerService::postStreamEndLumi ( edm::StreamContext const &  sc)
private

Definition at line 1210 of file FastTimerService.cc.

References ignoredSignal().

Referenced by FastTimerService().

1210  {
1211  ignoredSignal(__func__);
1212 }
void ignoredSignal(const std::string &signal) const
void FastTimerService::postStreamEndRun ( edm::StreamContext const &  sc)
private

Definition at line 1141 of file FastTimerService.cc.

References ignoredSignal().

Referenced by FastTimerService().

1142 {
1143  ignoredSignal(__func__);
1144 }
void ignoredSignal(const std::string &signal) const
void FastTimerService::preallocate ( edm::service::SystemBounds const &  bounds)
private

Definition at line 1044 of file FastTimerService.cc.

References EnergyCorrector::c, concurrent_lumis_, concurrent_runs_, concurrent_streams_, concurrent_threads_, dqm_path_, enable_dqm_bynproc_, cmsPerfStripChart::format, mps_fire::i, lumi_transition_, edm::service::SystemBounds::maxNumberOfConcurrentLuminosityBlocks(), edm::service::SystemBounds::maxNumberOfConcurrentRuns(), edm::service::SystemBounds::maxNumberOfStreams(), edm::service::SystemBounds::maxNumberOfThreads(), processor_model, run_transition_, alignCSCRings::s, str, subprocess_event_check_, subprocess_global_lumi_check_, and subprocess_global_run_check_.

Referenced by FastTimerService().

1045 {
1046  concurrent_lumis_ = bounds.maxNumberOfConcurrentLuminosityBlocks();
1047  concurrent_runs_ = bounds.maxNumberOfConcurrentRuns();
1048  concurrent_streams_ = bounds.maxNumberOfStreams();
1049  concurrent_threads_ = bounds.maxNumberOfThreads();
1050 
1051  if (enable_dqm_bynproc_)
1052  dqm_path_ += (boost::format("/Running on %s with %d streams on %d threads") % processor_model % concurrent_streams_ % concurrent_threads_).str();
1053 
1054  // clean characters that are deemed unsafe for DQM
1055  // see the definition of `s_safe` in DQMServices/Core/src/DQMStore.cc
1056  auto safe_for_dqm = "/ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-+=_()# "s;
1057  for (auto & c: dqm_path_)
1058  if (safe_for_dqm.find(c) == std::string::npos)
1059  c = '_';
1060 
1061  // allocate atomic variables to keep track of the completion of each step, process by process
1062  subprocess_event_check_ = std::make_unique<std::atomic<unsigned int>[]>(concurrent_streams_);
1063  for (unsigned int i = 0; i < concurrent_streams_; ++i)
1065  subprocess_global_run_check_ = std::make_unique<std::atomic<unsigned int>[]>(concurrent_runs_);
1066  for (unsigned int i = 0; i < concurrent_runs_; ++i)
1068  subprocess_global_lumi_check_ = std::make_unique<std::atomic<unsigned int>[]>(concurrent_lumis_);
1069  for (unsigned int i = 0; i < concurrent_lumis_; ++i)
1071 
1072  // allocate buffers to keep track of the resources spent in the lumi and run transitions
1073  lumi_transition_.resize(concurrent_lumis_);
1074  run_transition_.resize(concurrent_runs_);
1075 }
std::unique_ptr< std::atomic< unsigned int >[]> subprocess_global_lumi_check_
unsigned int concurrent_threads_
const bool enable_dqm_bynproc_
unsigned int concurrent_runs_
std::unique_ptr< std::atomic< unsigned int >[]> subprocess_global_run_check_
std::unique_ptr< std::atomic< unsigned int >[]> subprocess_event_check_
unsigned int concurrent_lumis_
std::string dqm_path_
format
Some error handling for the usage.
const std::string processor_model
std::vector< AtomicResources > run_transition_
#define str(s)
std::vector< AtomicResources > lumi_transition_
unsigned int concurrent_streams_
void FastTimerService::preBeginJob ( edm::PathsAndConsumesOfModulesBase const &  pathsAndConsumes,
edm::ProcessContext const &  context 
)
private

Definition at line 1083 of file FastTimerService.cc.

References callgraph_, and ProcessCallGraph::preBeginJob().

Referenced by FastTimerService().

1083  {
1084  callgraph_.preBeginJob(pathsAndConsumes, context);
1085 }
void preBeginJob(edm::PathsAndConsumesOfModulesBase const &, edm::ProcessContext const &)
ProcessCallGraph callgraph_
void FastTimerService::preEvent ( edm::StreamContext const &  sc)
private

Definition at line 1508 of file FastTimerService.cc.

References ignoredSignal().

Referenced by FastTimerService().

1509 {
1510  ignoredSignal(__func__);
1511 }
void ignoredSignal(const std::string &signal) const
void FastTimerService::preEventReadFromSource ( edm::StreamContext const &  sc,
edm::ModuleCallingContext const &  mcc 
)
private

Definition at line 1692 of file FastTimerService.cc.

References ignoredSignal().

1693 {
1694  ignoredSignal(__func__);
1695 }
void ignoredSignal(const std::string &signal) const
void FastTimerService::preGlobalBeginLumi ( edm::GlobalContext const &  gc)
private

Definition at line 1147 of file FastTimerService.cc.

References ignoredSignal(), isFirstSubprocess(), lumi_transition_, edm::GlobalContext::luminosityBlockIndex(), and subprocess_global_lumi_check_.

Referenced by FastTimerService().

1148 {
1149  ignoredSignal(__func__);
1150 
1151  // reset the lumi counters only during the main process being run
1152  if (isFirstSubprocess(gc)) {
1153  auto index = gc.luminosityBlockIndex();
1155  lumi_transition_[index].reset();
1156  }
1157 }
std::unique_ptr< std::atomic< unsigned int >[]> subprocess_global_lumi_check_
bool isFirstSubprocess(edm::StreamContext const &)
void ignoredSignal(const std::string &signal) const
std::vector< AtomicResources > lumi_transition_
void FastTimerService::preGlobalBeginRun ( edm::GlobalContext const &  gc)
private

Definition at line 996 of file FastTimerService.cc.

References callgraph_, dqm_event_ranges_, dqm_lumisections_range_, dqm_module_ranges_, dqm_path_, dqm_path_ranges_, enable_dqm_, enable_dqm_byls_, enable_dqm_bymodule_, enable_dqm_bypath_, enable_dqm_transitions_, highlight_modules_, ignoredSignal(), isFirstSubprocess(), edm::GlobalContext::luminosityBlockID(), plots_, edm::LuminosityBlockID::run(), run_summary_, run_transition_, edm::GlobalContext::runIndex(), and subprocess_global_run_check_.

Referenced by FastTimerService().

997 {
998  ignoredSignal(__func__);
999 
1000  // reset the run counters only during the main process being run
1001  if (isFirstSubprocess(gc)) {
1002  auto index = gc.runIndex();
1004  run_transition_[index].reset();
1005  run_summary_[index].reset();
1006 
1007  // book the DQM plots
1008  if (enable_dqm_) {
1009  // define a callback to book the MonitorElements
1010  auto bookTransactionCallback = [&, this] (DQMStore::ConcurrentBooker & booker)
1011  {
1012  booker.setCurrentFolder(dqm_path_);
1013  plots_->book(booker, callgraph_,
1023  };
1024 
1025  // book MonitorElements for this stream
1026  edm::Service<DQMStore>()->bookConcurrentTransaction(bookTransactionCallback, gc.luminosityBlockID().run());
1027  }
1028  }
1029 }
const PlotRanges dqm_event_ranges_
std::vector< GroupOfModules > highlight_modules_
bool isFirstSubprocess(edm::StreamContext const &)
std::unique_ptr< std::atomic< unsigned int >[]> subprocess_global_run_check_
const bool enable_dqm_bypath_
const PlotRanges dqm_path_ranges_
std::vector< ResourcesPerJob > run_summary_
const unsigned int dqm_lumisections_range_
std::string dqm_path_
const bool enable_dqm_transitions_
const bool enable_dqm_bymodule_
const PlotRanges dqm_module_ranges_
const bool enable_dqm_byls_
std::vector< AtomicResources > run_transition_
void ignoredSignal(const std::string &signal) const
std::unique_ptr< PlotsPerJob > plots_
ProcessCallGraph callgraph_
void FastTimerService::preGlobalEndLumi ( edm::GlobalContext const &  gc)
private

Definition at line 1166 of file FastTimerService.cc.

References ignoredSignal().

1167 {
1168  ignoredSignal(__func__);
1169 }
void ignoredSignal(const std::string &signal) const
void FastTimerService::preGlobalEndRun ( edm::GlobalContext const &  gc)
private

Definition at line 1215 of file FastTimerService.cc.

References ignoredSignal().

1216 {
1217  ignoredSignal(__func__);
1218 }
void ignoredSignal(const std::string &signal) const
void FastTimerService::preModuleEvent ( edm::StreamContext const &  sc,
edm::ModuleCallingContext const &  mcc 
)
private

Definition at line 1643 of file FastTimerService.cc.

References FastTimerService::Measurement::measure_and_accumulate(), edm::StreamContext::streamID(), streams_, thread(), and edm::StreamID::value().

Referenced by FastTimerService().

1644 {
1645  unsigned int sid = sc.streamID().value();
1646  auto & stream = streams_[sid];
1647  thread().measure_and_accumulate(stream.overhead);
1648 }
std::vector< ResourcesPerJob > streams_
Measurement & thread()
void measure_and_accumulate(Resources &store)
void FastTimerService::preModuleEventAcquire ( edm::StreamContext const &  sc,
edm::ModuleCallingContext const &  mcc 
)
private

Definition at line 1622 of file FastTimerService.cc.

References FastTimerService::Measurement::measure_and_accumulate(), edm::StreamContext::streamID(), streams_, thread(), and edm::StreamID::value().

Referenced by FastTimerService().

1623 {
1624  unsigned int sid = sc.streamID().value();
1625  auto & stream = streams_[sid];
1626  thread().measure_and_accumulate(stream.overhead);
1627 }
std::vector< ResourcesPerJob > streams_
Measurement & thread()
void measure_and_accumulate(Resources &store)
void FastTimerService::preModuleEventDelayedGet ( edm::StreamContext const &  sc,
edm::ModuleCallingContext const &  mcc 
)
private

Definition at line 1668 of file FastTimerService.cc.

References unsupportedSignal().

Referenced by FastTimerService().

1669 {
1670  unsupportedSignal(__func__);
1671 }
void unsupportedSignal(const std::string &signal) const
void FastTimerService::preModuleEventPrefetching ( edm::StreamContext const &  sc,
edm::ModuleCallingContext const &  mcc 
)
private

Definition at line 1680 of file FastTimerService.cc.

References ignoredSignal().

1681 {
1682  ignoredSignal(__func__);
1683 }
void ignoredSignal(const std::string &signal) const
void FastTimerService::preModuleGlobalBeginLumi ( edm::GlobalContext const &  gc,
edm::ModuleCallingContext const &  mcc 
)
private

Definition at line 1730 of file FastTimerService.cc.

References FastTimerService::Measurement::measure_and_accumulate(), overhead_, and thread().

Referenced by FastTimerService().

1731 {
1733 }
AtomicResources overhead_
Measurement & thread()
void measure_and_accumulate(Resources &store)
void FastTimerService::preModuleGlobalBeginRun ( edm::GlobalContext const &  gc,
edm::ModuleCallingContext const &  mcc 
)
private

Definition at line 1704 of file FastTimerService.cc.

References FastTimerService::Measurement::measure_and_accumulate(), overhead_, and thread().

Referenced by FastTimerService().

1705 {
1707 }
AtomicResources overhead_
Measurement & thread()
void measure_and_accumulate(Resources &store)
void FastTimerService::preModuleGlobalEndLumi ( edm::GlobalContext const &  gc,
edm::ModuleCallingContext const &  mcc 
)
private

Definition at line 1743 of file FastTimerService.cc.

References FastTimerService::Measurement::measure_and_accumulate(), overhead_, and thread().

Referenced by FastTimerService().

1744 {
1746 }
AtomicResources overhead_
Measurement & thread()
void measure_and_accumulate(Resources &store)
void FastTimerService::preModuleGlobalEndRun ( edm::GlobalContext const &  gc,
edm::ModuleCallingContext const &  mcc 
)
private

Definition at line 1717 of file FastTimerService.cc.

References FastTimerService::Measurement::measure_and_accumulate(), overhead_, and thread().

Referenced by FastTimerService().

1718 {
1720 }
AtomicResources overhead_
Measurement & thread()
void measure_and_accumulate(Resources &store)
void FastTimerService::preModuleStreamBeginLumi ( edm::StreamContext const &  sc,
edm::ModuleCallingContext const &  mcc 
)
private

Definition at line 1782 of file FastTimerService.cc.

References FastTimerService::Measurement::measure_and_accumulate(), overhead_, and thread().

Referenced by FastTimerService().

1783 {
1785 }
AtomicResources overhead_
Measurement & thread()
void measure_and_accumulate(Resources &store)
void FastTimerService::preModuleStreamBeginRun ( edm::StreamContext const &  sc,
edm::ModuleCallingContext const &  mcc 
)
private

Definition at line 1756 of file FastTimerService.cc.

References FastTimerService::Measurement::measure_and_accumulate(), overhead_, and thread().

Referenced by FastTimerService().

1757 {
1759 }
AtomicResources overhead_
Measurement & thread()
void measure_and_accumulate(Resources &store)
void FastTimerService::preModuleStreamEndLumi ( edm::StreamContext const &  sc,
edm::ModuleCallingContext const &  mcc 
)
private

Definition at line 1795 of file FastTimerService.cc.

References FastTimerService::Measurement::measure_and_accumulate(), overhead_, and thread().

Referenced by FastTimerService().

1796 {
1798 }
AtomicResources overhead_
Measurement & thread()
void measure_and_accumulate(Resources &store)
void FastTimerService::preModuleStreamEndRun ( edm::StreamContext const &  sc,
edm::ModuleCallingContext const &  mcc 
)
private

Definition at line 1769 of file FastTimerService.cc.

References FastTimerService::Measurement::measure_and_accumulate(), overhead_, and thread().

Referenced by FastTimerService().

1770 {
1772 }
AtomicResources overhead_
Measurement & thread()
void measure_and_accumulate(Resources &store)
void FastTimerService::prePathEvent ( edm::StreamContext const &  sc,
edm::PathContext const &  pc 
)
private

Definition at line 1587 of file FastTimerService.cc.

References callgraph_, data, triggerObjects_cff::id, edm::PathContext::isEndPath(), edm::PathContext::pathID(), sysUtil::pid, edm::StreamContext::processContext(), ProcessCallGraph::processId(), edm::StreamContext::streamID(), streams_, and edm::StreamID::value().

Referenced by FastTimerService().

1588 {
1589  unsigned int sid = sc.streamID().value();
1590  unsigned int pid = callgraph_.processId(* sc.processContext());
1591  unsigned int id = pc.pathID();
1592  auto & stream = streams_[sid];
1593  auto & data = pc.isEndPath() ? stream.processes[pid].endpaths[id] : stream.processes[pid].paths[id];
1594  data.status = false;
1595  data.last = 0;
1596 }
unsigned int processId(edm::ProcessContext const &) const
std::vector< ResourcesPerJob > streams_
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:82
ProcessCallGraph callgraph_
void FastTimerService::preSourceConstruction ( edm::ModuleDescription const &  module)
private

Definition at line 1078 of file FastTimerService.cc.

References callgraph_, and ProcessCallGraph::preSourceConstruction().

Referenced by FastTimerService().

1078  {
1080 }
void preSourceConstruction(edm::ModuleDescription const &)
ProcessCallGraph callgraph_
Definition: vlib.h:208
void FastTimerService::preSourceEvent ( edm::StreamID  sid)
private

Definition at line 1560 of file FastTimerService.cc.

References streams_, subprocess_event_check_, and thread().

Referenced by FastTimerService().

1561 {
1562  // clear the event counters
1563  auto & stream = streams_[sid];
1564  stream.reset();
1565  ++stream.events;
1566 
1567  subprocess_event_check_[sid] = 0;
1568 
1569  // reuse the same measurement for the Source module and for the explicit begin of the Event
1570  auto & measurement = thread();
1571  measurement.measure_and_accumulate(stream.overhead);
1572  stream.event_measurement = measurement;
1573 }
std::vector< ResourcesPerJob > streams_
Measurement & thread()
std::unique_ptr< std::atomic< unsigned int >[]> subprocess_event_check_
void FastTimerService::preSourceLumi ( edm::LuminosityBlockIndex  index)
private

Definition at line 1256 of file FastTimerService.cc.

References FastTimerService::Measurement::measure_and_accumulate(), overhead_, and thread().

Referenced by FastTimerService().

1257 {
1259 }
AtomicResources overhead_
Measurement & thread()
void measure_and_accumulate(Resources &store)
void FastTimerService::preSourceRun ( edm::RunIndex  index)
private

Definition at line 1244 of file FastTimerService.cc.

References FastTimerService::Measurement::measure_and_accumulate(), overhead_, and thread().

Referenced by FastTimerService().

1245 {
1247 }
AtomicResources overhead_
Measurement & thread()
void measure_and_accumulate(Resources &store)
void FastTimerService::preStreamBeginLumi ( edm::StreamContext const &  sc)
private

Definition at line 1192 of file FastTimerService.cc.

References ignoredSignal().

Referenced by FastTimerService().

1193 {
1194  ignoredSignal(__func__);
1195 }
void ignoredSignal(const std::string &signal) const
void FastTimerService::preStreamBeginRun ( edm::StreamContext const &  sc)
private

Definition at line 1038 of file FastTimerService.cc.

References ignoredSignal().

Referenced by FastTimerService().

1039 {
1040  ignoredSignal(__func__);
1041 }
void ignoredSignal(const std::string &signal) const
void FastTimerService::preStreamEndLumi ( edm::StreamContext const &  sc)
private

Definition at line 1204 of file FastTimerService.cc.

References ignoredSignal().

1205 {
1206  ignoredSignal(__func__);
1207 }
void ignoredSignal(const std::string &signal) const
void FastTimerService::preStreamEndRun ( edm::StreamContext const &  sc)
private

Definition at line 1135 of file FastTimerService.cc.

References ignoredSignal().

1136 {
1137  ignoredSignal(__func__);
1138 }
void ignoredSignal(const std::string &signal) const
template<typename T >
void FastTimerService::printEvent ( T out,
ResourcesPerJob const &   
) const
private

Referenced by postEvent().

template<typename T >
void FastTimerService::printEvent ( T out,
ResourcesPerJob const &  data 
) const

Definition at line 1321 of file FastTimerService.cc.

References callgraph_, edmIntegrityCheck::group, FastTimerService::ResourcesPerJob::highlight, highlight_modules_, mps_fire::i, funct::m, ProcessCallGraph::module(), FastTimerService::ResourcesPerJob::modules, dataset::name, AlCaHLTBitMon_ParallelJobs::p, callgraph::path, printEventHeader(), printEventLine(), printHeader(), proc, ProcessCallGraph::processDescription(), ProcessCallGraph::processes(), FastTimerService::ResourcesPerJob::processes, source, ProcessCallGraph::source(), and FastTimerService::ResourcesPerJob::total.

1322 {
1323  printHeader(out, "Event");
1324  printEventHeader(out, "Modules");
1325  auto const& source_d = callgraph_.source();
1326  auto const& source = data.modules[source_d.id()];
1327  printEventLine(out, source.total, source_d.moduleLabel());
1328  for (unsigned int i = 0; i < callgraph_.processes().size(); ++i) {
1329  auto const& proc_d = callgraph_.processDescription(i);
1330  auto const& proc = data.processes[i];
1331  printEventLine(out, proc.total, "process " + proc_d.name_);
1332  for (unsigned int m: proc_d.modules_) {
1333  auto const& module_d = callgraph_.module(m);
1334  auto const& module = data.modules[m];
1335  printEventLine(out, module.total, " " + module_d.moduleLabel());
1336  }
1337  }
1338  printEventLine(out, data.total, "total");
1339  out << '\n';
1340  printEventHeader(out, "Processes and Paths");
1341  printEventLine(out, source.total, source_d.moduleLabel());
1342  for (unsigned int i = 0; i < callgraph_.processes().size(); ++i) {
1343  auto const& proc_d = callgraph_.processDescription(i);
1344  auto const& proc = data.processes[i];
1345  printEventLine(out, proc.total, "process " + proc_d.name_);
1346  for (unsigned int p = 0; p < proc.paths.size(); ++p) {
1347  auto const& name = proc_d.paths_[p].name_;
1348  auto const& path = proc.paths[p];
1349  printEventLine(out, path.active, name + " (only scheduled modules)");
1350  printEventLine(out, path.total, name + " (including dependencies)");
1351  }
1352  for (unsigned int p = 0; p < proc.endpaths.size(); ++p) {
1353  auto const& name = proc_d.endPaths_[p].name_;
1354  auto const& path = proc.endpaths[p];
1355  printEventLine(out, path.active, name + " (only scheduled modules)");
1356  printEventLine(out, path.total, name + " (including dependencies)");
1357  }
1358  }
1359  printEventLine(out, data.total, "total");
1360  out << '\n';
1361  for (unsigned int group: boost::irange(0ul, highlight_modules_.size())) {
1362  printEventHeader(out, "Highlighted modules");
1363  for (unsigned int m: highlight_modules_[group].modules) {
1364  auto const& module_d = callgraph_.module(m);
1365  auto const& module = data.modules[m];
1366  printEventLine(out, module.total, " " + module_d.moduleLabel());
1367  }
1368  printEventLine(out, data.highlight[group], highlight_modules_[group].label);
1369  out << '\n';
1370  }
1371 }
std::vector< GroupOfModules > highlight_modules_
TrainProcessor *const proc
Definition: MVATrainer.cc:101
edm::ModuleDescription const & source() const
void printHeader(T &out, std::string const &label) const
void printEventHeader(T &out, std::string const &label) const
std::vector< ProcessType > const & processes() const
ProcessType const & processDescription(unsigned int) const
void printEventLine(T &out, Resources const &data, std::string const &label) const
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:82
edm::ModuleDescription const & module(unsigned int module) const
ProcessCallGraph callgraph_
Definition: vlib.h:208
static std::string const source
Definition: EdmProvDump.cc:43
template<typename T >
void FastTimerService::printEventHeader ( T out,
std::string const &  label 
) const
private

Referenced by printEvent(), and printTransition().

template<typename T >
void FastTimerService::printEventHeader ( T out,
std::string const &  label 
) const

Definition at line 1292 of file FastTimerService.cc.

1293 {
1294  out << "FastReport CPU time Real time Allocated Deallocated " << label << "\n";
1295  // FastReport ########.# ms ########.# ms +######### kB -######### kB ...
1296 }
template<typename T >
void FastTimerService::printEventLine ( T out,
Resources const &  data,
std::string const &  label 
) const
private

Referenced by printEvent(), and printTransition().

template<typename T >
void FastTimerService::printEventLine ( T out,
AtomicResources const &  data,
std::string const &  label 
) const
private
template<typename T >
void FastTimerService::printEventLine ( T out,
Resources const &  data,
std::string const &  label 
) const

Definition at line 1299 of file FastTimerService.cc.

References FastTimerService::Resources::allocated, FastTimerService::Resources::deallocated, cmsPerfStripChart::format, AnalysisDataFormats_SUSYBSMObjects::ms, FastTimerService::Resources::time_real, and FastTimerService::Resources::time_thread.

1300 {
1301  out << boost::format("FastReport %10.1f ms %10.1f ms %+10d kB %+10d kB %s\n")
1302  % ms(data.time_thread)
1303  % ms(data.time_real)
1304  % +static_cast<int64_t>(kB(data.allocated))
1305  % -static_cast<int64_t>(kB(data.deallocated))
1306  % label;
1307 }
format
Some error handling for the usage.
susybsm::MuonSegment ms
Definition: classes.h:31
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:82
template<typename T >
void FastTimerService::printEventLine ( T out,
AtomicResources const &  data,
std::string const &  label 
) const

Definition at line 1310 of file FastTimerService.cc.

References FastTimerService::AtomicResources::allocated, FastTimerService::AtomicResources::deallocated, cmsPerfStripChart::format, AnalysisDataFormats_SUSYBSMObjects::ms, FastTimerService::AtomicResources::time_real, and FastTimerService::AtomicResources::time_thread.

1311 {
1312  out << boost::format("FastReport %10.1f ms %10.1f ms %+10d kB %+10d kB %s\n")
1313  % ms(boost::chrono::nanoseconds(data.time_thread.load()))
1314  % ms(boost::chrono::nanoseconds(data.time_real.load()))
1315  % +static_cast<int64_t>(kB(data.allocated))
1316  % -static_cast<int64_t>(kB(data.deallocated))
1317  % label;
1318 }
format
Some error handling for the usage.
susybsm::MuonSegment ms
Definition: classes.h:31
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:82
boost::date_time::subsecond_duration< boost::posix_time::time_duration, 1000000000 > nanoseconds
template<typename T >
void FastTimerService::printHeader ( T out,
std::string const &  label 
) const
private
template<typename T >
void FastTimerService::printHeader ( T out,
std::string const &  label 
) const

Definition at line 1278 of file FastTimerService.cc.

References mps_fire::i.

1279 {
1280  out << "FastReport ";
1281  if (label.size() < 60)
1282  for (unsigned int i = (60-label.size()) / 2; i > 0; --i)
1283  out << '-';
1284  out << ' ' << label << " Summary ";
1285  if (label.size() < 60)
1286  for (unsigned int i = (59-label.size()) / 2; i > 0; --i)
1287  out << '-';
1288  out << '\n';
1289 }
template<typename T >
void FastTimerService::printPathSummaryHeader ( T out,
std::string const &  label 
) const
private

Referenced by printSummary().

template<typename T >
void FastTimerService::printPathSummaryHeader ( T out,
std::string const &  label 
) const

Definition at line 1386 of file FastTimerService.cc.

1387 {
1388  out << "FastReport CPU time sched. / depend. Real time sched. / depend. Alloc. sched. / depend. Dealloc. sched. / depend. ";
1389  // FastReport ########.# ms ########.# ms ########.# ms ########.# ms +######### kB +######### kB -######### kB -######### kB ...
1390  out << label << '\n';
1391 }
template<typename T >
void FastTimerService::printPathSummaryLine ( T out,
Resources const &  data,
Resources const &  total,
uint64_t  events,
std::string const &  label 
) const
private

Referenced by printSummary().

template<typename T >
void FastTimerService::printPathSummaryLine ( T out,
Resources const &  data,
Resources const &  total,
uint64_t  events,
std::string const &  label 
) const

Definition at line 1416 of file FastTimerService.cc.

References FastTimerService::Resources::allocated, FastTimerService::Resources::deallocated, cmsPerfStripChart::format, AnalysisDataFormats_SUSYBSMObjects::ms, FastTimerService::Resources::time_real, and FastTimerService::Resources::time_thread.

1417 {
1418  out << boost::format("FastReport %10.1f ms %10.1f ms %10.1f ms %10.1f ms %+10d kB %+10d kB %+10d kB %+10d kB %s\n")
1419  % (events ? ms(data.time_thread) / events : 0) % (events ? ms(total.time_thread) / events : 0)
1420  % (events ? ms(data.time_real) / events : 0) % (events ? ms(total.time_real) / events : 0)
1421  % (events ? +static_cast<int64_t>(kB(data.allocated) / events) : 0) % (events ? +static_cast<int64_t>(kB(total.allocated) / events) : 0)
1422  % (events ? -static_cast<int64_t>(kB(data.deallocated) / events) : 0) % (events ? -static_cast<int64_t>(kB(total.deallocated) / events) : 0)
1423  % label;
1424 }
format
Some error handling for the usage.
susybsm::MuonSegment ms
Definition: classes.h:31
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:82
template<typename T >
void FastTimerService::printSummary ( T out,
ResourcesPerJob const &  data,
std::string const &  label 
) const
private

Referenced by postEndJob(), and postGlobalEndRun().

template<typename T >
void FastTimerService::printSummary ( T out,
ResourcesPerJob const &  data,
std::string const &  label 
) const

Definition at line 1427 of file FastTimerService.cc.

References callgraph_, FastTimerService::ResourcesPerJob::events, edmIntegrityCheck::group, FastTimerService::ResourcesPerJob::highlight, highlight_modules_, mps_fire::i, funct::m, ProcessCallGraph::module(), FastTimerService::ResourcesPerJob::modules, dataset::name, AlCaHLTBitMon_ParallelJobs::p, callgraph::path, printHeader(), printPathSummaryHeader(), printPathSummaryLine(), printSummaryHeader(), printSummaryLine(), proc, ProcessCallGraph::processDescription(), ProcessCallGraph::processes(), FastTimerService::ResourcesPerJob::processes, source, ProcessCallGraph::source(), and FastTimerService::ResourcesPerJob::total.

1428 {
1429  printHeader(out, label);
1430  printSummaryHeader(out, "Modules", true);
1431  auto const& source_d = callgraph_.source();
1432  auto const& source = data.modules[source_d.id()];
1433  printSummaryLine(out, source.total, data.events, source.events, source_d.moduleLabel());
1434  for (unsigned int i = 0; i < callgraph_.processes().size(); ++i) {
1435  auto const& proc_d = callgraph_.processDescription(i);
1436  auto const& proc = data.processes[i];
1437  printSummaryLine(out, proc.total, data.events, "process " + proc_d.name_);
1438  for (unsigned int m: proc_d.modules_) {
1439  auto const& module_d = callgraph_.module(m);
1440  auto const& module = data.modules[m];
1441  printSummaryLine(out, module.total, data.events, module.events, " " + module_d.moduleLabel());
1442  }
1443  }
1444  printSummaryLine(out, data.total, data.events, "total");
1445  out << '\n';
1446  printPathSummaryHeader(out, "Processes and Paths");
1447  printSummaryLine(out, source.total, data.events, source_d.moduleLabel());
1448  for (unsigned int i = 0; i < callgraph_.processes().size(); ++i) {
1449  auto const& proc_d = callgraph_.processDescription(i);
1450  auto const& proc = data.processes[i];
1451  printSummaryLine(out, proc.total, data.events, "process " + proc_d.name_);
1452  for (unsigned int p = 0; p < proc.paths.size(); ++p) {
1453  auto const& name = proc_d.paths_[p].name_;
1454  auto const& path = proc.paths[p];
1455  printPathSummaryLine(out, path.active, path.total, data.events, " " + name);
1456  }
1457  for (unsigned int p = 0; p < proc.endpaths.size(); ++p) {
1458  auto const& name = proc_d.endPaths_[p].name_;
1459  auto const& path = proc.endpaths[p];
1460  printPathSummaryLine(out, path.active, path.total, data.events, " " + name);
1461  }
1462  }
1463  printSummaryLine(out, data.total, data.events, "total");
1464  out << '\n';
1465  for (unsigned int group: boost::irange(0ul, highlight_modules_.size())) {
1466  printSummaryHeader(out, "Highlighted modules", true);
1467  for (unsigned int m: highlight_modules_[group].modules) {
1468  auto const& module_d = callgraph_.module(m);
1469  auto const& module = data.modules[m];
1470  printSummaryLine(out, module.total, data.events, module.events, module_d.moduleLabel());
1471  }
1472  printSummaryLine(out, data.highlight[group], data.events, highlight_modules_[group].label);
1473  out << '\n';
1474  }
1475 }
std::vector< GroupOfModules > highlight_modules_
TrainProcessor *const proc
Definition: MVATrainer.cc:101
edm::ModuleDescription const & source() const
void printHeader(T &out, std::string const &label) const
void printPathSummaryHeader(T &out, std::string const &label) const
void printSummaryHeader(T &out, std::string const &label, bool detailed) const
std::vector< ProcessType > const & processes() const
ProcessType const & processDescription(unsigned int) const
void printSummaryLine(T &out, Resources const &data, uint64_t events, std::string const &label) const
void printPathSummaryLine(T &out, Resources const &data, Resources const &total, uint64_t events, std::string const &label) const
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:82
edm::ModuleDescription const & module(unsigned int module) const
ProcessCallGraph callgraph_
Definition: vlib.h:208
static std::string const source
Definition: EdmProvDump.cc:43
template<typename T >
void FastTimerService::printSummaryHeader ( T out,
std::string const &  label,
bool  detailed 
) const
private

Referenced by printSummary().

template<typename T >
void FastTimerService::printSummaryHeader ( T out,
std::string const &  label,
bool  detailed 
) const

Definition at line 1374 of file FastTimerService.cc.

1375 {
1376  if (detailed)
1377  out << "FastReport CPU time avg. when run Real time avg. when run Alloc. avg. when run Dealloc. avg. when run ";
1378  // FastReport ########.# ms ########.# ms ########.# ms ########.# ms +######### kB +######### kB -######### kB -######### kB ...
1379  else
1380  out << "FastReport CPU time avg. Real time avg. Alloc. avg. Dealloc. avg. ";
1381  // FastReport ########.# ms ########.# ms +######### kB -######### kB ...
1382  out << label << '\n';
1383 }
template<typename T >
void FastTimerService::printSummaryLine ( T out,
Resources const &  data,
uint64_t  events,
std::string const &  label 
) const
private

Referenced by printSummary().

template<typename T >
void FastTimerService::printSummaryLine ( T out,
Resources const &  data,
uint64_t  events,
uint64_t  active,
std::string const &  label 
) const
private
template<typename T >
void FastTimerService::printSummaryLine ( T out,
Resources const &  data,
uint64_t  events,
std::string const &  label 
) const

Definition at line 1394 of file FastTimerService.cc.

References FastTimerService::Resources::allocated, FastTimerService::Resources::deallocated, cmsPerfStripChart::format, AnalysisDataFormats_SUSYBSMObjects::ms, FastTimerService::Resources::time_real, and FastTimerService::Resources::time_thread.

1395 {
1396  out << boost::format("FastReport %10.1f ms %10.1f ms %+10d kB %+10d kB %s\n")
1397  % (events ? ms(data.time_thread) / events : 0)
1398  % (events ? ms(data.time_real) / events : 0)
1399  % (events ? +static_cast<int64_t>(kB(data.allocated) / events) : 0)
1400  % (events ? -static_cast<int64_t>(kB(data.deallocated) / events) : 0)
1401  % label;
1402 }
format
Some error handling for the usage.
susybsm::MuonSegment ms
Definition: classes.h:31
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:82
template<typename T >
void FastTimerService::printSummaryLine ( T out,
Resources const &  data,
uint64_t  events,
uint64_t  active,
std::string const &  label 
) const

Definition at line 1405 of file FastTimerService.cc.

References FastTimerService::Resources::allocated, FastTimerService::Resources::deallocated, cmsPerfStripChart::format, AnalysisDataFormats_SUSYBSMObjects::ms, FastTimerService::Resources::time_real, and FastTimerService::Resources::time_thread.

1406 {
1407  out << boost::format("FastReport %10.1f ms %10.1f ms %10.1f ms %10.1f ms %+10d kB %+10d kB %+10d kB %+10d kB %s\n")
1408  % (events ? ms(data.time_thread) / events : 0) % (active ? ms(data.time_thread) / active : 0)
1409  % (events ? ms(data.time_real) / events : 0) % (active ? ms(data.time_real) / active : 0)
1410  % (events ? +static_cast<int64_t>(kB(data.allocated) / events) : 0) % (active ? +static_cast<int64_t>(kB(data.allocated) / active) : 0)
1411  % (events ? -static_cast<int64_t>(kB(data.deallocated) / events) : 0) % (active ? -static_cast<int64_t>(kB(data.deallocated) / active) : 0)
1412  % label;
1413 }
format
Some error handling for the usage.
susybsm::MuonSegment ms
Definition: classes.h:31
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:82
template<typename T >
void FastTimerService::printTransition ( T out,
AtomicResources const &  data,
std::string const &  label 
) const
private
template<typename T >
void FastTimerService::printTransition ( T out,
AtomicResources const &  data,
std::string const &  label 
) const

Definition at line 1478 of file FastTimerService.cc.

References isFirstSubprocess(), edm::ProcessContext::isSubProcess(), printEventHeader(), printEventLine(), edm::GlobalContext::processContext(), edm::StreamContext::processContext(), and SimDataFormats::CaloAnalysis::sc.

1479 {
1480  printEventHeader(out, "Transition");
1482 }
void printEventHeader(T &out, std::string const &label) const
void printEventLine(T &out, Resources const &data, std::string const &label) const
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:82
FastTimerService::Measurement & FastTimerService::thread ( )
private
void FastTimerService::unsupportedSignal ( const std::string &  signal) const
private

Definition at line 987 of file FastTimerService.cc.

References unsupported_signals_.

Referenced by postModuleEventDelayedGet(), and preModuleEventDelayedGet().

988 {
989  // warn about each signal only once per job
990  if (unsupported_signals_.insert(signal).second)
991  edm::LogWarning("FastTimerService") << "The FastTimerService received the unsupported signal \"" << signal << "\".\n"
992  << "Please report how to reproduce the issue to cms-hlt@cern.ch .";
993 }
tbb::concurrent_unordered_set< std::string > unsupported_signals_

Member Data Documentation

ProcessCallGraph FastTimerService::callgraph_
private
unsigned int FastTimerService::concurrent_lumis_
private

Definition at line 436 of file FastTimerService.h.

Referenced by preallocate().

unsigned int FastTimerService::concurrent_runs_
private

Definition at line 437 of file FastTimerService.h.

Referenced by postBeginJob(), and preallocate().

unsigned int FastTimerService::concurrent_streams_
private

Definition at line 438 of file FastTimerService.h.

Referenced by postBeginJob(), and preallocate().

unsigned int FastTimerService::concurrent_threads_
private

Definition at line 439 of file FastTimerService.h.

Referenced by preallocate().

const PlotRanges FastTimerService::dqm_event_ranges_
private

Definition at line 454 of file FastTimerService.h.

Referenced by preGlobalBeginRun().

const unsigned int FastTimerService::dqm_lumisections_range_
private

Definition at line 457 of file FastTimerService.h.

Referenced by FastTimerService(), and preGlobalBeginRun().

const PlotRanges FastTimerService::dqm_module_ranges_
private

Definition at line 456 of file FastTimerService.h.

Referenced by FastTimerService(), and preGlobalBeginRun().

std::string FastTimerService::dqm_path_
private

Definition at line 458 of file FastTimerService.h.

Referenced by FastTimerService(), preallocate(), and preGlobalBeginRun().

const PlotRanges FastTimerService::dqm_path_ranges_
private

Definition at line 455 of file FastTimerService.h.

Referenced by FastTimerService(), and preGlobalBeginRun().

bool FastTimerService::enable_dqm_
private

Definition at line 447 of file FastTimerService.h.

Referenced by postBeginJob(), postEvent(), and preGlobalBeginRun().

const bool FastTimerService::enable_dqm_byls_
private

Definition at line 450 of file FastTimerService.h.

Referenced by preGlobalBeginRun().

const bool FastTimerService::enable_dqm_bymodule_
private

Definition at line 448 of file FastTimerService.h.

Referenced by preGlobalBeginRun().

const bool FastTimerService::enable_dqm_bynproc_
private

Definition at line 451 of file FastTimerService.h.

Referenced by preallocate().

const bool FastTimerService::enable_dqm_bypath_
private

Definition at line 449 of file FastTimerService.h.

Referenced by preGlobalBeginRun().

const bool FastTimerService::enable_dqm_transitions_
private

Definition at line 452 of file FastTimerService.h.

Referenced by postGlobalEndLumi(), postGlobalEndRun(), and preGlobalBeginRun().

std::vector<edm::ParameterSet> FastTimerService::highlight_module_psets_
private

Definition at line 461 of file FastTimerService.h.

Referenced by FastTimerService(), and postBeginJob().

std::vector<GroupOfModules> FastTimerService::highlight_modules_
private
ResourcesPerJob FastTimerService::job_summary_
private

Definition at line 419 of file FastTimerService.h.

Referenced by postBeginJob(), postEndJob(), and postEvent().

std::vector<AtomicResources> FastTimerService::lumi_transition_
private
AtomicResources FastTimerService::overhead_
private
std::unique_ptr<PlotsPerJob> FastTimerService::plots_
private
const bool FastTimerService::print_event_summary_
private

Definition at line 442 of file FastTimerService.h.

Referenced by postEvent().

const bool FastTimerService::print_job_summary_
private

Definition at line 444 of file FastTimerService.h.

Referenced by postEndJob().

const bool FastTimerService::print_run_summary_
private

Definition at line 443 of file FastTimerService.h.

Referenced by postGlobalEndRun().

std::vector<ResourcesPerJob> FastTimerService::run_summary_
private

Definition at line 420 of file FastTimerService.h.

Referenced by postBeginJob(), postEvent(), postGlobalEndRun(), and preGlobalBeginRun().

std::vector<AtomicResources> FastTimerService::run_transition_
private
std::vector<ResourcesPerJob> FastTimerService::streams_
private
std::unique_ptr<std::atomic<unsigned int>[]> FastTimerService::subprocess_event_check_
private

Definition at line 428 of file FastTimerService.h.

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

std::unique_ptr<std::atomic<unsigned int>[]> FastTimerService::subprocess_global_lumi_check_
private

Definition at line 429 of file FastTimerService.h.

Referenced by postGlobalEndLumi(), preallocate(), and preGlobalBeginLumi().

std::unique_ptr<std::atomic<unsigned int>[]> FastTimerService::subprocess_global_run_check_
private

Definition at line 430 of file FastTimerService.h.

Referenced by postGlobalEndRun(), preallocate(), and preGlobalBeginRun().

std::mutex FastTimerService::summary_mutex_
private

Definition at line 421 of file FastTimerService.h.

Referenced by postEvent().

tbb::enumerable_thread_specific<Measurement, tbb::cache_aligned_allocator<Measurement>, tbb::ets_key_per_instance> FastTimerService::threads_
private

Definition at line 425 of file FastTimerService.h.

Referenced by thread().

tbb::concurrent_unordered_set<std::string> FastTimerService::unsupported_signals_
mutableprivate

Definition at line 465 of file FastTimerService.h.

Referenced by unsupportedSignal().