ATLAS Offline Software
Control
CxxUtils
CxxUtils
procmaps.h
Go to the documentation of this file.
1
// dear emacs, this is -*- C++ -*-
2
3
/*
4
Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
5
*/
6
7
#ifndef PROCMAPS_H
8
#define PROCMAPS_H 1
9
#include <vector>
10
#include <string>
11
#include <sys/types.h>
18
class
procmaps
{
19
public
:
20
struct
Entry
{
21
Entry
(
const
char
*
line
);
22
unsigned
long
begAddress
;
23
unsigned
long
endAddress
;
24
bool
readable
;
25
bool
writable
;
26
bool
executable
;
27
bool
isPrivate
;
28
unsigned
int
offset
;
29
unsigned
int
dev
[2];
30
ino_t
inode
;
31
std::string
pathname
;
32
};
33
34
procmaps
(
size_t
entries
=1024);
35
//not yet procmaps(int pid);
36
37
typedef
std::vector<Entry>
procmaps_t
;
38
typedef
procmaps_t::const_iterator
const_iterator
;
39
42
const
Entry
*
getEntry
(
const
void
*
address
,
bool
tryReloadMaps=
true
);
43
45
const
procmaps_t
&
pmaps
()
const
{
return
m_pmaps
; }
46
const_iterator
begin
()
const
{
return
pmaps
().begin(); }
47
const_iterator
end
()
const
{
return
pmaps
().end(); }
48
50
void
loadMaps
(
bool
dump
=
false
);
51
52
private
:
53
procmaps_t
m_pmaps
;
54
};
55
56
inline
57
bool
operator<
(
procmaps::Entry
& lhs,
procmaps::Entry
& rhs){
58
return
lhs.
begAddress
< rhs.
begAddress
;
59
}
60
#endif
checkFileSG.line
line
Definition:
checkFileSG.py:75
procmaps::end
const_iterator end() const
Definition:
procmaps.h:47
procmaps::Entry::writable
bool writable
Definition:
procmaps.h:25
procmaps::m_pmaps
procmaps_t m_pmaps
Definition:
procmaps.h:53
run_Egamma1_LArStrip_Fex.dump
dump
Definition:
run_Egamma1_LArStrip_Fex.py:88
operator<
bool operator<(procmaps::Entry &lhs, procmaps::Entry &rhs)
Definition:
procmaps.h:57
procmaps::Entry::isPrivate
bool isPrivate
Definition:
procmaps.h:27
procmaps::Entry::readable
bool readable
Definition:
procmaps.h:24
procmaps::Entry::inode
ino_t inode
dev[0] major, dev[1] minor
Definition:
procmaps.h:30
procmaps::Entry::executable
bool executable
Definition:
procmaps.h:26
procmaps::procmaps_t
std::vector< Entry > procmaps_t
Definition:
procmaps.h:37
procmaps::Entry::endAddress
unsigned long endAddress
Definition:
procmaps.h:23
procmaps::Entry::dev
unsigned int dev[2]
Definition:
procmaps.h:29
RTTAlgmain.address
address
Definition:
RTTAlgmain.py:55
procmaps::Entry::Entry
Entry(const char *line)
Definition:
procmaps.cxx:11
procmaps::Entry::pathname
std::string pathname
Definition:
procmaps.h:31
procmaps
A simple API to access /proc/self/maps info.
Definition:
procmaps.h:18
procmaps::loadMaps
void loadMaps(bool dump=false)
load/refresh info from /proc/self/map
Definition:
procmaps.cxx:47
procmaps::Entry::begAddress
unsigned long begAddress
Definition:
procmaps.h:22
procmaps::Entry
Definition:
procmaps.h:20
procmaps::procmaps
procmaps(size_t entries=1024)
Definition:
procmaps.cxx:41
procmaps::pmaps
const procmaps_t & pmaps() const
access underlying entries
Definition:
procmaps.h:45
procmaps::Entry::offset
unsigned int offset
=true page is private(COW), =false page is shared
Definition:
procmaps.h:28
entries
double entries
Definition:
listroot.cxx:49
procmaps::getEntry
const Entry * getEntry(const void *address, bool tryReloadMaps=true)
main entry point: get info for the page range containing address by default tries to reload /proc/sel...
Definition:
procmaps.cxx:59
procmaps::begin
const_iterator begin() const
Definition:
procmaps.h:46
procmaps::const_iterator
procmaps_t::const_iterator const_iterator
Definition:
procmaps.h:38
Generated on Thu Nov 7 2024 21:24:12 for ATLAS Offline Software by
1.8.18