mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] Documentation: {u,k}probes: add tracing_on before tracing
@ 2019-05-09 10:31 lecopzer.chen
  2019-05-09 13:08 ` Masami Hiramatsu
  2019-06-07 17:57 ` Jonathan Corbet
  0 siblings, 2 replies; 4+ messages in thread
From: lecopzer.chen @ 2019-05-09 10:31 UTC (permalink / raw)
  To: linux-kernel, linux-doc
  Cc: corbet, mhiramat, srv_heupstream, yj.chiang, Lecopzer Chen

From: Lecopzer Chen <lecopzer.chen@mediatek.com>

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.

Signed-off-by: Lecopzer Chen <lecopzer.chen@mediatek.com>
---
 Documentation/trace/kprobetrace.rst  | 6 ++++++
 Documentation/trace/uprobetracer.rst | 7 ++++++-
 2 files changed, 12 insertions(+), 1 deletion(-)

diff --git a/Documentation/trace/kprobetrace.rst b/Documentation/trace/kprobetrace.rst
index 235ce2ab131a..baa3c42ba2f4 100644
--- a/Documentation/trace/kprobetrace.rst
+++ b/Documentation/trace/kprobetrace.rst
@@ -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.
 ::
 
diff --git a/Documentation/trace/uprobetracer.rst b/Documentation/trace/uprobetracer.rst
index 4346e23e3ae7..0b21305fabdc 100644
--- a/Documentation/trace/uprobetracer.rst
+++ b/Documentation/trace/uprobetracer.rst
@@ -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.
-- 
2.18.0


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] Documentation: {u,k}probes: add tracing_on before tracing
  2019-05-09 10:31 [PATCH] Documentation: {u,k}probes: add tracing_on before tracing lecopzer.chen
@ 2019-05-09 13:08 ` Masami Hiramatsu
  2019-05-10  4:19   ` Lecopzer Chen
  2019-06-07 17:57 ` Jonathan Corbet
  1 sibling, 1 reply; 4+ messages in thread
From: Masami Hiramatsu @ 2019-05-09 13:08 UTC (permalink / raw)
  To: lecopzer.chen
  Cc: linux-kernel, linux-doc, corbet, mhiramat, srv_heupstream, yj.chiang

On Thu, 9 May 2019 18:31:16 +0800
<lecopzer.chen@mediatek.com> wrote:

> From: Lecopzer Chen <lecopzer.chen@mediatek.com>
> 
> 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.

OK, but isn't tracing_on enabled by default?
Anyway, it looks good to me (for making sure the trace is enabled).

Acked-by: Masami Hiramatsu <mhiramat@kernel.org>

Thanks!

> 
> Signed-off-by: Lecopzer Chen <lecopzer.chen@mediatek.com>
> ---
>  Documentation/trace/kprobetrace.rst  | 6 ++++++
>  Documentation/trace/uprobetracer.rst | 7 ++++++-
>  2 files changed, 12 insertions(+), 1 deletion(-)
> 
> diff --git a/Documentation/trace/kprobetrace.rst b/Documentation/trace/kprobetrace.rst
> index 235ce2ab131a..baa3c42ba2f4 100644
> --- a/Documentation/trace/kprobetrace.rst
> +++ b/Documentation/trace/kprobetrace.rst
> @@ -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.
>  ::
>  
> diff --git a/Documentation/trace/uprobetracer.rst b/Documentation/trace/uprobetracer.rst
> index 4346e23e3ae7..0b21305fabdc 100644
> --- a/Documentation/trace/uprobetracer.rst
> +++ b/Documentation/trace/uprobetracer.rst
> @@ -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.
> -- 
> 2.18.0
> 


-- 
Masami Hiramatsu <mhiramat@kernel.org>

^ permalink raw reply	[flat|nested] 4+ messages in thread

* RE: [PATCH] Documentation: {u,k}probes: add tracing_on before tracing
  2019-05-09 13:08 ` Masami Hiramatsu
@ 2019-05-10  4:19   ` Lecopzer Chen
  0 siblings, 0 replies; 4+ messages in thread
From: Lecopzer Chen @ 2019-05-10  4:19 UTC (permalink / raw)
  To: mhiramat
  Cc: linux-kernel, linux-doc, corbet, srv_heupstream, yj.chiang,
	Lecopzer Chen

>> From: Lecopzer Chen <lecopzer.chen@mediatek.com>
>> 
>> 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.

> OK, but isn't tracing_on enabled by default?

Yes, but it may be disabled by some distros' init process.


> Anyway, it looks good to me (for making sure the trace is enabled).

> Acked-by: Masami Hiramatsu <mhiramat@kernel.org>

> Thanks!

Thanks a lots for your reply!

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] Documentation: {u,k}probes: add tracing_on before tracing
  2019-05-09 10:31 [PATCH] Documentation: {u,k}probes: add tracing_on before tracing lecopzer.chen
  2019-05-09 13:08 ` Masami Hiramatsu
@ 2019-06-07 17:57 ` Jonathan Corbet
  1 sibling, 0 replies; 4+ messages in thread
From: Jonathan Corbet @ 2019-06-07 17:57 UTC (permalink / raw)
  To: lecopzer.chen
  Cc: linux-kernel, linux-doc, mhiramat, srv_heupstream, yj.chiang

On Thu, 9 May 2019 18:31:16 +0800
<lecopzer.chen@mediatek.com> wrote:

> From: Lecopzer Chen <lecopzer.chen@mediatek.com>
> 
> 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.
> 
> Signed-off-by: Lecopzer Chen <lecopzer.chen@mediatek.com>

Applied, thanks.

jon

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2019-06-07 17:57 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-05-09 10:31 [PATCH] Documentation: {u,k}probes: add tracing_on before tracing lecopzer.chen
2019-05-09 13:08 ` Masami Hiramatsu
2019-05-10  4:19   ` Lecopzer Chen
2019-06-07 17:57 ` Jonathan Corbet

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®