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
ac584d0e
Commit
ac584d0e
authored
Nov 02, 2016
by
Brenden Blanco
Committed by
GitHub
Nov 02, 2016
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #796 from palmtenor/sym_free
Expose destruction of SymbolCache in libbcc
parents
7671594f
81eae652
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
13 additions
and
1 deletion
+13
-1
src/cc/bcc_syms.cc
src/cc/bcc_syms.cc
+8
-1
src/cc/bcc_syms.h
src/cc/bcc_syms.h
+2
-0
src/python/bcc/libbcc.py
src/python/bcc/libbcc.py
+3
-0
No files found.
src/cc/bcc_syms.cc
View file @
ac584d0e
...
...
@@ -212,6 +212,13 @@ void *bcc_symcache_new(int pid) {
return
static_cast
<
void
*>
(
new
ProcSyms
(
pid
));
}
void
bcc_free_symcache
(
void
*
symcache
,
int
pid
)
{
if
(
pid
<
0
)
delete
static_cast
<
KSyms
*>
(
symcache
);
else
delete
static_cast
<
ProcSyms
*>
(
symcache
);
}
int
bcc_symcache_resolve
(
void
*
resolver
,
uint64_t
addr
,
struct
bcc_symbol
*
sym
)
{
SymbolCache
*
cache
=
static_cast
<
SymbolCache
*>
(
resolver
);
...
...
@@ -286,7 +293,7 @@ static int _list_sym(const char *symname, uint64_t addr, uint64_t end,
return
0
;
SYM_CB
cb
=
(
SYM_CB
)
payload
;
return
cb
(
symname
,
addr
);
return
cb
(
symname
,
addr
);
}
int
bcc_foreach_symbol
(
const
char
*
module
,
SYM_CB
cb
)
{
...
...
src/cc/bcc_syms.h
View file @
ac584d0e
...
...
@@ -32,6 +32,8 @@ struct bcc_symbol {
typedef
int
(
*
SYM_CB
)(
const
char
*
symname
,
uint64_t
addr
);
void
*
bcc_symcache_new
(
int
pid
);
void
bcc_free_symcache
(
void
*
symcache
,
int
pid
);
int
bcc_symcache_resolve
(
void
*
symcache
,
uint64_t
addr
,
struct
bcc_symbol
*
sym
);
int
bcc_symcache_resolve_name
(
void
*
resolver
,
const
char
*
name
,
uint64_t
*
addr
);
void
bcc_symcache_refresh
(
void
*
resolver
);
...
...
src/python/bcc/libbcc.py
View file @
ac584d0e
...
...
@@ -142,6 +142,9 @@ lib.bcc_foreach_symbol.argtypes = [ct.c_char_p, _SYM_CB_TYPE]
lib
.
bcc_symcache_new
.
restype
=
ct
.
c_void_p
lib
.
bcc_symcache_new
.
argtypes
=
[
ct
.
c_int
]
lib
.
bcc_free_symcache
.
restype
=
ct
.
c_void_p
lib
.
bcc_free_symcache
.
argtypes
=
[
ct
.
c_void_p
,
ct
.
c_int
]
lib
.
bcc_symcache_resolve
.
restype
=
ct
.
c_int
lib
.
bcc_symcache_resolve
.
argtypes
=
[
ct
.
c_void_p
,
ct
.
c_ulonglong
,
ct
.
POINTER
(
bcc_symbol
)]
...
...
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