Documentation: {u,k}probes: add tracing_on before tracing
Subsystems (2)
PATCH 1/1 Documentation: {u,k}probes: add tracing_on before tracing
From: Lecopzer Chen <[email protected]>
After following the document step by step, the cat trace can't be worked without enabling tracing_on and might mislead newbies about the functionality.
--- Documentation/trace/kprobetrace.rst | 6 ++++++ Documentation/trace/uprobetracer.rst | 7 ++++++- 2 files changed, 12 insertions(+), 1 deletion(-)
Documentation/trace/kprobetrace.rst +6 -0
@@ -189,6 +189,12 @@ 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 +Use the following command to start tracing in an interval. +:: + # echo 1 > tracing_on + Open something... + # echo 0 > tracing_on + And you can see the traced information via /sys/kernel/debug/tracing/trace. ::
Documentation/trace/uprobetracer.rst +6 -1
@@ -152,10 +152,15 @@ events, you need to enable it by:: # echo 1 > events/uprobes/enable -Lets disable the event after sleeping for some time. +Lets start tracing, sleep for some time and stop tracing. :: + # echo 1 > tracing_on # sleep 20 + # echo 0 > tracing_on + +Also, you can disable the event by:: + # echo 0 > events/uprobes/enable And you can see the traced information via /sys/kernel/debug/tracing/trace.
Signature · 1 line
2.18.0
Quoted 5 lines · On Thu, 9 May 2019 18:31:16 +0800 <[email protected]> wrote:
From: Lecopzer Chen <[email protected]>
After following the document step by step, the
cat tracecan't be worked without enablingtracing_onand might mislead newbies about the functionality.
OK, but isn't tracing_on enabled by default?
Anyway, it looks good to me (for making sure the trace is enabled).
Thanks!
Quoted 48 lines
Signed-off-by Lecopzer Chen <[email protected]>--- Documentation/trace/kprobetrace.rst | 6 ++++++ Documentation/trace/uprobetracer.rst | 7 ++++++- 2 files changed, 12 insertions(+), 1 deletion(-)Documentation/trace/kprobetrace.rst +6
-0@@ -189,6 +189,12 @@ 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 +Use the following command to start tracing in an interval. +:: + # echo 1 > tracing_on + Open something... + # echo 0 > tracing_on + And you can see the traced information via /sys/kernel/debug/tracing/trace. ::Documentation/trace/uprobetracer.rst +6
-1@@ -152,10 +152,15 @@ events, you need to enable it by:: # echo 1 > events/uprobes/enable -Lets disable the event after sleeping for some time. +Lets start tracing, sleep for some time and stop tracing. :: + # echo 1 > tracing_on # sleep 20 + # echo 0 > tracing_on + +Also, you can disable the event by:: + # echo 0 > events/uprobes/enable And you can see the traced information via /sys/kernel/debug/tracing/trace.Signature · 1 line
2.18.0
Signature · 1 line
Masami Hiramatsu <[email protected]>
Quoted 7 lines
Quoted 5 lines
From: Lecopzer Chen <[email protected]>
After following the document step by step, the
cat tracecan't be worked without enablingtracing_onand might mislead newbies about the functionality.OK, but isn't
tracing_onenabled by default?
Yes, but it may be disabled by some distros' init process.
Quoted 5 lines
Anyway, it looks good to me (for making sure the trace is enabled).
Acked-by Masami Hiramatsu <[email protected]>Thanks!
Thanks a lots for your reply!
Quoted 7 lines · On Thu, 9 May 2019 18:31:16 +0800 <[email protected]> wrote:
From: Lecopzer Chen <[email protected]>
After following the document step by step, the
cat tracecan't be worked without enablingtracing_onand might mislead newbies about the functionality.Signed-off-by Lecopzer Chen <[email protected]>
Applied, thanks.
jon