![Logo](../../ATLAS-Logo-Square-Blue-RGB.png) |
ATLAS Offline Software
|
Go to the documentation of this file.
26 #include "Gaudi/Property.h"
50 ISvcLocator* pSvcLocator ) :
52 m_store(
"StoreGateSvc/StoreGateSvc",
name),
53 m_clidsvc(
"ClassIDSvc/ClassIDSvc",
name),
55 m_stream_name(
"pmon_payload.ascii")
63 "StoreGateSvc instance to monitor for "
64 "DataProxy payload sizes");
68 "Name of the output file where the monitoring data will "
73 "display mallinfos stats after each event");
92 if (!
m_store.retrieve().isSuccess()) {
94 return StatusCode::FAILURE;
100 return StatusCode::FAILURE;
106 S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH);
110 return StatusCode::FAILURE;
114 const char* hdr =
"#data format: [[(bytes_0, bytes_1, delta, clid, sg_key),]]\n";
116 const char* data_hdr =
"data = [\n";
120 return StatusCode::SUCCESS;
126 const char *ftr =
"] # data\n";
129 return StatusCode::SUCCESS;
137 return m.uordblks +
m.hblkhd -
m.fsmblks;
149 #define PP_DIFF(f) m0. f << " -> " << m1. f << " => " << m1. f - m0. f
150 #define PP_TOT(m) (m.uordblks + m.hblkhd - m.fsmblks)
152 std::ostringstream
s;
153 s <<
"-------------\n"
154 <<
"arena : "<<PP_DIFF(arena)<<
"\n"
155 <<
"ordblks : "<<PP_DIFF(ordblks)<<
"\n"
156 <<
"smblks : "<<PP_DIFF(smblks)<<
"\n"
157 <<
"hblks : "<<PP_DIFF(hblks)<<
"\n"
158 <<
"hblkhd : "<<PP_DIFF(hblkhd)<<
"\n"
159 <<
"usmblks : "<<PP_DIFF(usmblks)<<
"\n"
160 <<
"fsmblks : "<<PP_DIFF(fsmblks)<<
"\n"
161 <<
"uordblks: "<<PP_DIFF(uordblks)<<
"\n"
162 <<
"fordblks: "<<PP_DIFF(fordblks)<<
"\n"
163 <<
"keepcost: "<<PP_DIFF(keepcost)<<
"\n"
164 <<
"==> " << PP_TOT(m0) <<
" -> " << PP_TOT(
m1)
165 <<
" => " << (PP_TOT(
m1) - PP_TOT(m0))
178 std::vector<const SG::DataProxy*> proxies =
m_store->proxies();
179 const std::size_t
n = proxies.size();
183 for (std::size_t
i = 0;
i!=
n; ++
i) {
189 if (
proxy->clID() == 2101) {
208 const char* hdr =
" [ ## new-event\n";
211 #define PMON_DP_FMT " (%10d, %10d, %10d, \"%s\", \"%s\"),\n"
212 for (std::size_t
i = 0;
i!=
n; ++
i) {
214 std::string clid =
"";
215 if (!
m_clidsvc->getTypeNameOfID(
mon.proxy->clID(), clid).isSuccess()) {
217 o <<
mon.proxy->clID() << std::ends;
221 int buf_sz = asprintf
226 mon.proxy->name().c_str());
232 int buf_sz = asprintf
236 "StoreGateSvc",
m_store.name().c_str());
242 const char* ftr =
" ],\n";
245 ATH_MSG_INFO(
"flush-store: " << b0 <<
" -> " << b1 <<
" -- delta= "
248 return StatusCode::SUCCESS;
MallocStats::return_type b0
char data[hepevt_bytes_allocation_ATLAS]
const SG::DataProxy * proxy
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
StorePayloadMon()
Default constructor:
int m_stream
payload-mon file descriptor
virtual StatusCode execute()
virtual ~StorePayloadMon()
Destructor:
PerfMon::MallocStats::return_type pmon_get_mem()
void dump(std::ostream &out=std::cout)
display malloc stats on std::cout
a simple malloc wrapper that keeps track of the amount of memory allocated on the heap.
::std::vector< DpLoad > DpLoads_t
::StatusCode StatusCode
StatusCode definition for legacy code.
IClassIDSvc_t m_clidsvc
handle to the class id svc
struct mallinfo mallinfo_t
PerfMon::mallinfo_t m_infos
virtual StatusCode finalize()
bool m_displayMallinfos
display mallinfos after each event
StoreGateSvc_t m_store
handle to the store instance to monitor
MallocStats::return_type b1
Access to some useful malloc statistics.
std::string m_stream_name
Name of the output file where the monitoring data will be stored.
virtual StatusCode initialize()