Service to monitor access to memory pages.
More...
#include <PageAccessControlSvc.h>
Service to monitor access to memory pages.
- Author
- Paolo Calafiura
This service uses
Definition at line 49 of file PageAccessControlSvc.h.
◆ PageAccessControlSvc()
PageAccessControlSvc::PageAccessControlSvc |
( |
const std::string & |
name, |
|
|
ISvcLocator * |
pSvcLocator |
|
) |
| |
Standard GAUDI constructor.
Definition at line 8 of file PageAccessControlSvc.cxx.
16 "start monitoring on initialize, stop on finalize");
◆ ~PageAccessControlSvc()
virtual PageAccessControlSvc::~PageAccessControlSvc |
( |
| ) |
|
|
inlinevirtual |
◆ accessed()
bool PageAccessControlSvc::accessed |
( |
const void * |
address | ) |
const |
|
virtual |
◆ controlPage()
virtual bool PageAccessControlSvc::controlPage |
( |
const void * |
address | ) |
|
|
inlinevirtual |
◆ finalize()
StatusCode PageAccessControlSvc::finalize |
( |
| ) |
|
|
virtual |
◆ initialize()
StatusCode PageAccessControlSvc::initialize |
( |
| ) |
|
|
virtual |
◆ report()
void PageAccessControlSvc::report |
( |
| ) |
const |
|
virtual |
In baseline implementation, controlled via PageAccessControlSvc.OutputLevel
Definition at line 56 of file PageAccessControlSvc.cxx.
57 msg(MSG::INFO) <<
"Access monitoring report" <<
endmsg;
66 msg(
MSG::DEBUG) <<
"protected page at @" << std::hex << ia->addr
67 <<
" accessed "<< ia->restored <<
" times" <<
endmsg;
◆ startMonitoring()
bool PageAccessControlSvc::startMonitoring |
( |
| ) |
|
|
virtual |
In baseline implementation, protect pages and install a SEGV handler that counts the number of accesses to a protected address.
Definition at line 19 of file PageAccessControlSvc.cxx.
23 sa.sa_sigaction= cPtrAccessSEGVHandler;
24 sa.sa_flags=SA_SIGINFO;
26 rc=sigaction(SIGSEGV,&sa,
nullptr);
◆ stopMonitoring()
bool PageAccessControlSvc::stopMonitoring |
( |
| ) |
|
|
virtual |
◆ m_accessControl
◆ m_autoMonitor
BooleanProperty PageAccessControlSvc::m_autoMonitor |
|
private |
◆ m_saveSEGVaction
struct sigaction PageAccessControlSvc::m_saveSEGVaction |
|
private |
◆ m_SEGVHandler
The documentation for this class was generated from the following files:
PageAccessControl m_accessControl
protected_t::const_iterator const_iterator
struct sigaction m_saveSEGVaction
the default action for SIGSEGV
virtual bool stopMonitoring()
virtual void report() const
In baseline implementation, controlled via PageAccessControlSvc.OutputLevel
BooleanProperty m_autoMonitor
start on init, stop on finalize
PtrAccessSEGVHandler m_SEGVHandler