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
b3dd6731
Commit
b3dd6731
authored
Apr 30, 2016
by
Vicent Marti
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
lua: Do not try to detach buffers as kprobes
parent
06b5ce51
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
2 deletions
+3
-2
src/lua/bcc/bpf.lua
src/lua/bcc/bpf.lua
+2
-1
src/lua/bcc/table.lua
src/lua/bcc/table.lua
+1
-1
No files found.
src/lua/bcc/bpf.lua
View file @
b3dd6731
...
@@ -41,7 +41,8 @@ function Bpf.static.cleanup_probes()
...
@@ -41,7 +41,8 @@ function Bpf.static.cleanup_probes()
local
function
detach_all
(
probe_type
,
all_probes
)
local
function
detach_all
(
probe_type
,
all_probes
)
for
key
,
probe
in
pairs
(
all_probes
)
do
for
key
,
probe
in
pairs
(
all_probes
)
do
libbcc
.
perf_reader_free
(
probe
)
libbcc
.
perf_reader_free
(
probe
)
if
type
(
key
)
==
"string"
then
-- skip bcc-specific kprobes
if
not
key
:
starts
(
"bcc:"
)
then
local
desc
=
string.format
(
"-:%s/%s"
,
probe_type
,
key
)
local
desc
=
string.format
(
"-:%s/%s"
,
probe_type
,
key
)
log
.
info
(
"detaching %s"
,
desc
)
log
.
info
(
"detaching %s"
,
desc
)
...
...
src/lua/bcc/table.lua
View file @
b3dd6731
...
@@ -236,7 +236,7 @@ function PerfEventArray:initialize(bpf, map_id, map_fd, key_type, leaf_type)
...
@@ -236,7 +236,7 @@ function PerfEventArray:initialize(bpf, map_id, map_fd, key_type, leaf_type)
end
end
local
function
_perf_id
(
id
,
cpu
)
local
function
_perf_id
(
id
,
cpu
)
return
string.format
(
"perf_event_array:%d:%d"
,
tonumber
(
id
),
cpu
or
0
)
return
string.format
(
"
bcc:
perf_event_array:%d:%d"
,
tonumber
(
id
),
cpu
or
0
)
end
end
function
PerfEventArray
:
_open_perf_buffer
(
cpu
,
callback
,
ctype
)
function
PerfEventArray
:
_open_perf_buffer
(
cpu
,
callback
,
ctype
)
...
...
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