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
afd43036
Commit
afd43036
authored
Mar 30, 2016
by
Vicent Marti
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
memleak.lua: Fix indentation
parent
e4e83ec1
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
8 deletions
+8
-8
examples/lua/memleak.lua
examples/lua/memleak.lua
+8
-8
No files found.
examples/lua/memleak.lua
View file @
afd43036
...
...
@@ -128,15 +128,15 @@ return function(BPF, utils)
local
min_age_ns
=
args
.
older
*
1e6
if
args
.
pid
then
print
(
"Attaching to malloc and free in pid %d, Ctrl+C to quit."
%
args
.
pid
)
bpf
:
attach_uprobe
{
name
=
"c"
,
sym
=
"malloc"
,
fn_name
=
"alloc_enter"
,
pid
=
args
.
pid
}
bpf
:
attach_uprobe
{
name
=
"c"
,
sym
=
"malloc"
,
fn_name
=
"alloc_exit"
,
pid
=
args
.
pid
,
retprobe
=
true
}
bpf
:
attach_uprobe
{
name
=
"c"
,
sym
=
"free"
,
fn_name
=
"free_enter"
,
pid
=
args
.
pid
}
print
(
"Attaching to malloc and free in pid %d, Ctrl+C to quit."
%
args
.
pid
)
bpf
:
attach_uprobe
{
name
=
"c"
,
sym
=
"malloc"
,
fn_name
=
"alloc_enter"
,
pid
=
args
.
pid
}
bpf
:
attach_uprobe
{
name
=
"c"
,
sym
=
"malloc"
,
fn_name
=
"alloc_exit"
,
pid
=
args
.
pid
,
retprobe
=
true
}
bpf
:
attach_uprobe
{
name
=
"c"
,
sym
=
"free"
,
fn_name
=
"free_enter"
,
pid
=
args
.
pid
}
else
print
(
"Attaching to kmalloc and kfree, Ctrl+C to quit."
)
bpf
:
attach_kprobe
{
event
=
"__kmalloc"
,
fn_name
=
"alloc_enter"
}
bpf
:
attach_kprobe
{
event
=
"__kmalloc"
,
fn_name
=
"alloc_exit"
,
retprobe
=
true
}
-- TODO
bpf
:
attach_kprobe
{
event
=
"kfree"
,
fn_name
=
"free_enter"
}
print
(
"Attaching to kmalloc and kfree, Ctrl+C to quit."
)
bpf
:
attach_kprobe
{
event
=
"__kmalloc"
,
fn_name
=
"alloc_enter"
}
bpf
:
attach_kprobe
{
event
=
"__kmalloc"
,
fn_name
=
"alloc_exit"
,
retprobe
=
true
}
-- TODO
bpf
:
attach_kprobe
{
event
=
"kfree"
,
fn_name
=
"free_enter"
}
end
local
syms
=
args
.
pid
and
utils
.
sym
.
ProcSymbols
:
new
(
args
.
pid
)
or
utils
.
sym
.
KSymbols
:
new
()
...
...
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