ATLAS Offline Software
Classes | Typedefs | Functions
PerfMon Namespace Reference

a simple malloc wrapper that keeps track of the amount of memory allocated on the heap. More...

Classes

class  CallGraphAuditor
 
class  CallGraphBuilderSvc
 
struct  Clock
 
struct  Component
 
struct  Cpu
 
struct  DpLoad
 
struct  IoContainer
 
class  LinFitSglPass
 
struct  MallInfo
 
class  MallocStats
 Access to some useful malloc statistics. More...
 
struct  Mem
 
struct  MemStats
 placeholder for the stats More...
 
class  PyChrono
 
class  State
 Common definitions for the PerfMon packages. More...
 
class  StorePayloadMon
 
struct  Tuple
 

Typedefs

typedef ::std::vector< DpLoadDpLoads_t
 
using mallinfo_t = struct mallinfo
 
typedef std::array< std::string, State::SizeSteps_t
 

Functions

PerfMon::MallocStats::return_type pmon_get_mem ()
 
StatusCode makeAuditor (const std::string &audName, IAuditorSvc *audSvc, MsgStream &msg)
 simple function to factorize boring things such as asking the AuditorSvc if an auditor is there (and scheduled) and make sure to create it if it is not yet alived. More...
 
float rt_cpu ()
 
mallinfo_t mallinfo ()
 
struct timespec clock_gettime ()
 

Detailed Description

a simple malloc wrapper that keeps track of the amount of memory allocated on the heap.

Typedef Documentation

◆ DpLoads_t

typedef ::std::vector<DpLoad> PerfMon::DpLoads_t

Definition at line 41 of file PerfMonStorePayloadMon.cxx.

◆ mallinfo_t

using PerfMon::mallinfo_t = typedef struct mallinfo

Definition at line 28 of file mallinfo.h.

◆ Steps_t

typedef std::array<std::string, State::Size> PerfMon::Steps_t

Definition at line 41 of file PerfMonDefs.h.

Function Documentation

◆ clock_gettime()

struct timespec PerfMon::clock_gettime ( )
inline

Definition at line 1 of file PerfMonEventDict.h.

22  {
23  struct timespec res;
24 #ifndef __APPLE__
25  /*int sc = */::clock_gettime(CLOCK_PROCESS_CPUTIME_ID, &res);
26 #endif
27  return res;
28  }

◆ makeAuditor()

StatusCode PerfMon::makeAuditor ( const std::string &  audName,
IAuditorSvc *  audSvc,
MsgStream &  msg 
)

simple function to factorize boring things such as asking the AuditorSvc if an auditor is there (and scheduled) and make sure to create it if it is not yet alived.

Definition at line 32 of file PerfMonUtils.cxx.

34 {
35  if ( 0 == audSvc ) {
36  msg << MSG::ERROR << "Null pointer to IAuditorSvc !!" << endmsg;
37  return StatusCode::FAILURE;
38  }
39 
40  if ( 0 != audSvc->getAuditor( audName ) ) {
41  msg << MSG::VERBOSE << "AuditorSvc already knows about ["
42  << audName << "]... good."
43  << endmsg;
44  return StatusCode::SUCCESS;
45  }
46 
47  const std::string propName = "Auditors";
48  SmartIF<IProperty> audSvcProp(audSvc);
49  if ( 0 == audSvcProp ) {
50  msg << MSG::ERROR
51  << "Could not dyn-cast IAuditorSvc to an IProperty !!" << endmsg;
52  return StatusCode::FAILURE;
53  }
54 
55  StringArrayProperty audNames;
56  audNames.assign( audSvcProp->getProperty(propName) );
57  std::vector<std::string> updatedNames( audNames.value() );
58  updatedNames.push_back( audName );
59  audNames.set( updatedNames );
60  audNames.setName( propName );
61  if ( !audSvcProp->setProperty( audNames ).isSuccess() ) {
62  msg << MSG::ERROR
63  << "Could not add [" << audName << "] to the list of auditors of"
64  << " [AuditorSvc] !!"
65  << endmsg
66  << audSvcProp->getProperty(propName)
67  << endmsg;
68  return StatusCode::FAILURE;
69  }
70 
71  // make sure the auditor has been created...
72  IAuditor* aud = audSvc->getAuditor( audName );
73  if ( 0 == aud ) {
74  msg << MSG::ERROR
75  << "Failed to make AuditorSvc instantiating ["
76  << audName << "] !!"
77  << endmsg;
78  return StatusCode::FAILURE;
79  }
80  // aud->release();
81 
82  return StatusCode::SUCCESS;
83 }

◆ mallinfo()

mallinfo_t PerfMon::mallinfo ( )
inline

Definition at line 29 of file mallinfo.h.

29 { return ::mallinfo(); }

◆ pmon_get_mem()

PerfMon::MallocStats::return_type PerfMon::pmon_get_mem ( )
inline

Definition at line 134 of file PerfMonStorePayloadMon.cxx.

135 {
137  return m.uordblks + m.hblkhd - m.fsmblks;
138 }

◆ rt_cpu()

float PerfMon::rt_cpu ( )
inline

Definition at line 25 of file DataModel.h.

26  {
27 #if !defined(__APPLE__)
28  struct timespec res;
29  /*int sc = */::clock_gettime(CLOCK_PROCESS_CPUTIME_ID, &res);
30  return (res.tv_sec*1e3 + res.tv_nsec*1e-6); // in milliseconds
31 #else
32  return -999.;
33 #endif
34  }
python.SystemOfUnits.m
int m
Definition: SystemOfUnits.py:91
PerfMon::mallinfo
mallinfo_t mallinfo()
Definition: mallinfo.h:29
CheckAppliedSFs.e3
e3
Definition: CheckAppliedSFs.py:264
endmsg
#define endmsg
Definition: AnalysisConfig_Ntuple.cxx:63
res
std::pair< std::vector< unsigned int >, bool > res
Definition: JetGroupProductTest.cxx:14
PerfMon::mallinfo_t
struct mallinfo mallinfo_t
Definition: mallinfo.h:28
PerfMon::clock_gettime
struct timespec clock_gettime()
Definition: PerfMonEventDict.h:21
L1CaloPhase1Monitoring.propName
propName
Definition: L1CaloPhase1Monitoring.py:349
DiTauMassTools::MaxHistStrategyV2::e
e
Definition: PhysicsAnalysis/TauID/DiTauMassTools/DiTauMassTools/HelperFunctions.h:26
python.Constants.VERBOSE
int VERBOSE
Definition: Control/AthenaCommon/python/Constants.py:14
python.AutoConfigFlags.msg
msg
Definition: AutoConfigFlags.py:7