Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 169429
b: refs/heads/master
c: 5a0d905
h: refs/heads/master
i:
  169427: 0e6900a
v: v3
  • Loading branch information
Masami Hiramatsu authored and Frederic Weisbecker committed Sep 17, 2009
1 parent 0bbbe8c commit d47d28b
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 5 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 74ebb63e7cd25f6fb02a45fc2ea7735bce1217c9
refs/heads/master: 5a0d9050db4d1147722b42afef9011251b2651ee
11 changes: 9 additions & 2 deletions trunk/Documentation/trace/kprobetrace.txt
Original file line number Diff line number Diff line change
Expand Up @@ -122,8 +122,15 @@ print fmt: "(%lx) dfd=%lx filename=%lx flags=%lx mode=%lx", REC->ip, REC->dfd, R

echo > /sys/kernel/debug/tracing/kprobe_events

This clears all probe points. and you can see the traced information via
/sys/kernel/debug/tracing/trace.
This clears all probe points.

Right after definition, each event is disabled by default. For tracing these
events, you need to enable it.

echo 1 > /sys/kernel/debug/tracing/events/kprobes/myprobe/enable
echo 1 > /sys/kernel/debug/tracing/events/kprobes/myretprobe/enable

And you can see the traced information via /sys/kernel/debug/tracing/trace.

cat /sys/kernel/debug/tracing/trace
# tracer: nop
Expand Down
4 changes: 2 additions & 2 deletions trunk/kernel/trace/trace_kprobe.c
Original file line number Diff line number Diff line change
Expand Up @@ -383,7 +383,7 @@ static int register_trace_probe(struct trace_probe *tp)
goto end;
}

tp->flags = TP_FLAG_TRACE;
tp->rp.kp.flags |= KPROBE_FLAG_DISABLED;
if (probe_is_return(tp))
ret = register_kretprobe(&tp->rp);
else
Expand Down Expand Up @@ -1298,7 +1298,7 @@ static int register_probe_event(struct trace_probe *tp)
call->id = register_ftrace_event(&tp->event);
if (!call->id)
return -ENODEV;
call->enabled = 1;
call->enabled = 0;
call->regfunc = probe_event_enable;
call->unregfunc = probe_event_disable;

Expand Down

0 comments on commit d47d28b

Please sign in to comment.