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
6ceb2518
Commit
6ceb2518
authored
Sep 25, 2015
by
Suchakra Sharma
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
A more suitable function mame
parent
0bde502c
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
3 deletions
+3
-3
src/python/bcc/__init__.py
src/python/bcc/__init__.py
+2
-2
tests/cc/test_probe_count.py
tests/cc/test_probe_count.py
+1
-1
No files found.
src/python/bcc/__init__.py
View file @
6ceb2518
...
@@ -736,8 +736,8 @@ class BPF(object):
...
@@ -736,8 +736,8 @@ class BPF(object):
return
ksym_names
[
idx
]
+
hex
(
offset
)
return
ksym_names
[
idx
]
+
hex
(
offset
)
@
staticmethod
@
staticmethod
def
get
_open_kprobes
():
def
num
_open_kprobes
():
"""
get
_open_kprobes()
"""
num
_open_kprobes()
Get the number of open K[ret]probes. Can be useful for scenarios where
Get the number of open K[ret]probes. Can be useful for scenarios where
event_re is used while attaching and detaching probes
event_re is used while attaching and detaching probes
...
...
tests/cc/test_probe_count.py
View file @
6ceb2518
...
@@ -22,7 +22,7 @@ class TestKprobeCnt(TestCase):
...
@@ -22,7 +22,7 @@ class TestKprobeCnt(TestCase):
for
line
in
f
:
for
line
in
f
:
if
str
(
line
).
startswith
(
"vfs_"
):
if
str
(
line
).
startswith
(
"vfs_"
):
actual_cnt
+=
1
actual_cnt
+=
1
open_cnt
=
self
.
b
.
get
_open_kprobes
()
open_cnt
=
self
.
b
.
num
_open_kprobes
()
self
.
assertEqual
(
actual_cnt
,
open_cnt
)
self
.
assertEqual
(
actual_cnt
,
open_cnt
)
if
__name__
==
"__main__"
:
if
__name__
==
"__main__"
:
...
...
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