Public Member Functions | |
BlockWipedAllocatorService (const edm::ParameterSet &iConfig, edm::ActivityRegistry &iAR) | |
void | dump () |
void | postEndJob () |
void | postModule (const edm::ModuleDescription &desc) |
void | preEventProcessing (const edm::EventID &, const edm::Timestamp &) |
void | preModule (const edm::ModuleDescription &desc) |
void | preSource () |
void | wiper () |
Private Attributes | |
bool | m_useAlloc |
manage the allocator
Definition at line 32 of file BlockWipedAllocatorService.cc.
BlockWipedAllocatorService::BlockWipedAllocatorService | ( | const edm::ParameterSet & | iConfig, |
edm::ActivityRegistry & | iAR | ||
) | [inline] |
Definition at line 36 of file BlockWipedAllocatorService.cc.
References edm::ParameterSet::getUntrackedParameter(), m_useAlloc, postEndJob(), postModule(), preEventProcessing(), preModule(), preSource(), BlockWipedPoolAllocated::usePool(), edm::ActivityRegistry::watchPostEndJob(), edm::ActivityRegistry::watchPostModule(), edm::ActivityRegistry::watchPreModule(), edm::ActivityRegistry::watchPreProcessEvent(), and edm::ActivityRegistry::watchPreSource().
{ m_useAlloc = iConfig.getUntrackedParameter<bool>("usePoolAllocator",false); if (m_useAlloc) BlockWipedPoolAllocated::usePool(); iAR.watchPreSource(this,&BlockWipedAllocatorService::preSource); iAR.watchPreProcessEvent(this,&BlockWipedAllocatorService::preEventProcessing); iAR.watchPostEndJob(this,&BlockWipedAllocatorService::postEndJob); iAR.watchPreModule(this,&BlockWipedAllocatorService::preModule); iAR.watchPostModule(this,&BlockWipedAllocatorService::postModule); }
void BlockWipedAllocatorService::dump | ( | void | ) | [inline] |
Definition at line 56 of file BlockWipedAllocatorService.cc.
References blockWipedPool(), gather_cfg::cout, BlockWipedPoolAllocated::s_alive, ReferenceCountedPoolAllocated::s_alive, ReferenceCountedPoolAllocated::s_referenced, and BlockWipedPool::visit().
Referenced by postModule(), and wiper().
{ std::cout << "ReferenceCounted stat"<< std::endl; std::cout << "still alive/referenced " << ReferenceCountedPoolAllocated::s_alive << "/" << ReferenceCountedPoolAllocated::s_referenced << std::endl; std::cout << "BlockAllocator stat"<< std::endl; std::cout << "still alive " << BlockWipedPoolAllocated::s_alive << std::endl; Dumper dumper; blockWipedPool().visit(dumper); }
void BlockWipedAllocatorService::postEndJob | ( | ) | [inline] |
Definition at line 95 of file BlockWipedAllocatorService.cc.
References wiper().
Referenced by BlockWipedAllocatorService().
{ wiper(); }
void BlockWipedAllocatorService::postModule | ( | const edm::ModuleDescription & | desc | ) | [inline] |
Definition at line 90 of file BlockWipedAllocatorService.cc.
References dump().
Referenced by BlockWipedAllocatorService().
{ dump(); }
void BlockWipedAllocatorService::preEventProcessing | ( | const edm::EventID & | , |
const edm::Timestamp & | |||
) | [inline] |
Definition at line 49 of file BlockWipedAllocatorService.cc.
References wiper().
Referenced by BlockWipedAllocatorService().
{ wiper();}
void BlockWipedAllocatorService::preModule | ( | const edm::ModuleDescription & | desc | ) | [inline] |
Definition at line 86 of file BlockWipedAllocatorService.cc.
Referenced by BlockWipedAllocatorService().
{
// blockWipedPool().wipe();
}
void BlockWipedAllocatorService::preSource | ( | ) | [inline] |
Definition at line 52 of file BlockWipedAllocatorService.cc.
Referenced by BlockWipedAllocatorService().
{
// wiper();
}
void BlockWipedAllocatorService::wiper | ( | ) | [inline] |
Definition at line 70 of file BlockWipedAllocatorService.cc.
References blockWipedPool(), trackerHits::c, BlockWipedPool::clear(), dump(), and BlockWipedPool::wipe().
Referenced by postEndJob(), and preEventProcessing().
{ dump(); blockWipedPool().wipe(); blockWipedPool().clear(); // try to crash { static int c=0; if (20==c) { blockWipedPool().clear(); c=0; } c++; } }
bool BlockWipedAllocatorService::m_useAlloc [private] |
Definition at line 34 of file BlockWipedAllocatorService.cc.
Referenced by BlockWipedAllocatorService().