Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
B
bcc
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
bcc
Commits
a573a21f
Commit
a573a21f
authored
May 01, 2017
by
4ast
Committed by
GitHub
May 01, 2017
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #1147 from palmtenor/moduleopt
Small improvements to symboling availiability
parents
2e38eeda
552f4c69
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
3 deletions
+10
-3
src/cc/bcc_syms.cc
src/cc/bcc_syms.cc
+8
-2
src/cc/syms.h
src/cc/syms.h
+2
-1
No files found.
src/cc/bcc_syms.cc
View file @
a573a21f
...
...
@@ -33,6 +33,11 @@ ino_t ProcStat::getinode_() {
return
(
!
stat
(
procfs_
.
c_str
(),
&
s
))
?
s
.
st_ino
:
-
1
;
}
bool
ProcStat
::
is_stale
()
{
ino_t
cur_inode
=
getinode_
();
return
(
cur_inode
>
0
)
&&
(
cur_inode
!=
inode_
);
}
ProcStat
::
ProcStat
(
int
pid
)
:
procfs_
(
tfm
::
format
(
"/proc/%d/exe"
,
pid
)),
inode_
(
getinode_
())
{}
...
...
@@ -190,7 +195,7 @@ bool ProcSyms::resolve_name(const char *module, const char *name,
}
ProcSyms
::
Module
::
Module
(
const
char
*
name
,
int
pid
,
bool
in_ns
)
:
name_
(
name
),
pid_
(
pid
),
in_ns_
(
in_ns
)
{
:
name_
(
name
),
pid_
(
pid
),
in_ns_
(
in_ns
)
,
loaded_
(
false
)
{
struct
ns_cookie
nsc
;
bcc_procutils_enter_mountns
(
pid_
,
&
nsc
);
...
...
@@ -213,8 +218,9 @@ bool ProcSyms::Module::is_perf_map() const {
void
ProcSyms
::
Module
::
load_sym_table
()
{
struct
ns_cookie
nsc
=
{
-
1
,
-
1
};
if
(
syms_
.
size
()
)
if
(
loaded_
)
return
;
loaded_
=
true
;
if
(
is_perf_map
())
{
if
(
in_ns_
)
...
...
src/cc/syms.h
View file @
a573a21f
...
...
@@ -30,7 +30,7 @@ class ProcStat {
public:
ProcStat
(
int
pid
);
bool
is_stale
()
{
return
inode_
!=
getinode_
();
}
bool
is_stale
()
;
void
reset
()
{
inode_
=
getinode_
();
}
};
...
...
@@ -91,6 +91,7 @@ class ProcSyms : SymbolCache {
bool
is_so_
;
int
pid_
;
bool
in_ns_
;
bool
loaded_
;
std
::
unordered_set
<
std
::
string
>
symnames_
;
std
::
vector
<
Symbol
>
syms_
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment