CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
Classes | Namespaces | Functions
ProfilingTools.h File Reference
#include <string>

Go to the source code of this file.

Classes

class  PerfCounter
 

Namespaces

 runtimedef
 

Functions

int runtimedef::get (const char *name)
 
int runtimedef::get (const std::string &name)
 
void runtimedef::set (const std::string &name, int value)
 set the flag, with a run-time name More...
 
bool setupIgProfDumpHook ()
 

Function Documentation

bool setupIgProfDumpHook ( )

Definition at line 23 of file ProfilingTools.cc.

References igProfDumpNow(), and igProfRequestDump_.

23  {
24  if (void *sym = dlsym(0, "igprof_dump_now")) {
25  igProfRequestDump_ = __extension__ (void(*)(const char *)) sym;
26  fprintf(stderr, "IgProf dump hook enabled. Do kill -USR2 %d to request a dump.\n", int(getpid())); fflush(stderr);
27  } else {
28  fprintf(stderr, "Not being profiled by IgProf. The command you should use to profile this is:\n");
29  fprintf(stderr, " igprof -mp -z -t combine combine datacard [options]\n\n");
30  fflush(stderr);
31  return false;
32  }
33  signal(SIGUSR2,igProfDumpNow);
34  return true;
35 }
void igProfDumpNow(int)
void(* igProfRequestDump_)(const char *)
double a
Definition: hdecay.h:121