CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
Profiling.cc
Go to the documentation of this file.
1 // -*- C++ -*-
2 //
3 // Package: Services
4 // Class : Timing
5 //
6 // Implementation:
7 //
8 // Original Author: Jim Kowalkowski
9 //
10 
16 
17 namespace edm {
18  namespace service {
19 
21  ActivityRegistry&iRegistry) {
24  }
25 
26 
28  }
29 
32  descriptions.add("SimpleProfiling", desc);
33  }
34 
36  LogInfo("SimpleProfiling")
37  << "Simple profiling activated.\n";
38 
40  }
41 
43  pid_t pid = getpid();
44 
45  LogInfo("SimpleProfiling")
46  << "Simple profiling stopping.\n"
47  << "You should find three files containing profiling\n"
48  << "information gathered from program counter\n"
49  << "samples collected while your job was running.\n"
50  << "\tA) profdata_" << pid << "_names\n"
51  << "\tB) profdata_" << pid << "_paths\n"
52  << "\tC) profdata_" << pid << "_totals\n"
53  << "\n"
54  << "A) contains names of function hit count. You may want\n"
55  << " to pass this through c++filt since the name is still mangled\n"
56  << " columns:\n"
57  << "\t1) function ID\n"
58  << "\t2) function address\n"
59  << "\t3) samples within this function only (leaf count)\n"
60  << "\t4) samples within this function and children (with recusion)\n"
61  << "\t5) samples within this function and children\n"
62  << "\t6) fraction of samples within this function only\n"
63  << "\t7) fraction of samples within this path (with recusion)\n"
64  << "\t8) function name (mangled)\n"
65  << "The file is sorted by column (3) so most-hit functions\n"
66  << "are at the top\n"
67  << "\n"
68  << "B) contains all the unique call paths traversed in this job\n"
69  << " columns:\n"
70  << "\t1) path ID\n"
71  << "\t2) total times this unique path was observed (samples in leaf)\n"
72  << "\t3) the path using function IDs (main towards the left)\n"
73  << "\n"
74  << "C) contains summary of the total number of samples collected\n"
75  << "\n";
76 
78  }
79  }
80 }
void watchPostEndJob(PostEndJob::slot_type const &iSlot)
SimpleProfiling(const ParameterSet &, ActivityRegistry &)
Definition: Profiling.cc:20
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
Definition: Profiling.cc:30
static SimpleProfiler * instance()
void add(std::string const &label, ParameterSetDescription const &psetDescription)
void watchPostBeginJob(PostBeginJob::slot_type const &iSlot)
convenience function for attaching to signal