From afd430366a6cdb38b23ec5bfddacd4e99e17d65e Mon Sep 17 00:00:00 2001 From: Vicent Marti Date: Wed, 30 Mar 2016 17:31:20 +0200 Subject: [PATCH] memleak.lua: Fix indentation --- examples/lua/memleak.lua | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/examples/lua/memleak.lua b/examples/lua/memleak.lua index 1b30592..bd869c6 100644 --- a/examples/lua/memleak.lua +++ b/examples/lua/memleak.lua @@ -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() -- 2.7.4