CMS 3D CMS Logo

Public Member Functions | Static Public Member Functions

edm::service::SimpleProfiling Class Reference

#include <Profiling.h>

List of all members.

Public Member Functions

void postBeginJob ()
void postEndJob ()
 SimpleProfiling (const ParameterSet &, ActivityRegistry &)
 ~SimpleProfiling ()

Static Public Member Functions

static void fillDescriptions (edm::ConfigurationDescriptions &descriptions)

Detailed Description

Definition at line 20 of file Profiling.h.


Constructor & Destructor Documentation

edm::service::SimpleProfiling::SimpleProfiling ( const ParameterSet iPS,
ActivityRegistry iRegistry 
)

Definition at line 21 of file Profiling.cc.

References postBeginJob(), postEndJob(), edm::ActivityRegistry::watchPostBeginJob(), and edm::ActivityRegistry::watchPostEndJob().

    {
      iRegistry.watchPostBeginJob(this,&SimpleProfiling::postBeginJob);
      iRegistry.watchPostEndJob(this,&SimpleProfiling::postEndJob);
    }
edm::service::SimpleProfiling::~SimpleProfiling ( )

Definition at line 29 of file Profiling.cc.

    {
    }

Member Function Documentation

void edm::service::SimpleProfiling::fillDescriptions ( edm::ConfigurationDescriptions descriptions) [static]

Definition at line 33 of file Profiling.cc.

References edm::ConfigurationDescriptions::add().

                                                                                      {
      edm::ParameterSetDescription desc;
      descriptions.add("SimpleProfiling", desc);
    }
void edm::service::SimpleProfiling::postBeginJob ( )

Definition at line 38 of file Profiling.cc.

References SimpleProfiler::instance(), and SimpleProfiler::start().

Referenced by SimpleProfiling().

    {
      LogInfo("SimpleProfiling")
        << "Simple profiling activated.\n";

      SimpleProfiler::instance()->start();      
    }
void edm::service::SimpleProfiling::postEndJob ( )

Definition at line 46 of file Profiling.cc.

References SimpleProfiler::instance(), evf::utils::pid, and SimpleProfiler::stop().

Referenced by SimpleProfiling().

    {
      pid_t pid = getpid();

      LogInfo("SimpleProfiling")
        << "Simple profiling stopping.\n"
        << "You should find three files containing profiling\n"
        << "information gathered from program counter\n"
        << "samples collected while your job was running.\n"
        << "\tA) profdata_" << pid << "_names\n"
        << "\tB) profdata_" << pid << "_paths\n"
        << "\tC) profdata_" << pid << "_totals\n"
        << "\n"
        << "A) contains names of function hit count.  You may want\n"
        << "   to pass this through c++filt since the name is still mangled\n"
        << " columns:\n"
        << "\t1) function ID\n"
        << "\t2) function address\n"
        << "\t3) samples within this function only (leaf count)\n"
        << "\t4) samples within this function and children (with recusion)\n"
        << "\t5) samples within this function and children\n"
        << "\t6) fraction of samples within this function only\n"
        << "\t7) fraction of samples within this path (with recusion)\n"
        << "\t8) function name (mangled)\n"
        << "The file is sorted by column (3) so most-hit functions\n"
        << "are at the top\n"
        << "\n"
        << "B) contains all the unique call paths traversed in this job\n"
        << "  columns:\n"
        << "\t1) path ID\n"
        << "\t2) total times this unique path was observed (samples in leaf)\n"
        << "\t3) the path using function IDs (main towards the left)\n"
        << "\n"
        << "C) contains summary of the total number of samples collected\n"
        << "\n";

      SimpleProfiler::instance()->stop();
    }