Linux Documentation
 help / color / mirror / Atom feed
* [PATCH] docs: ftrace: clarify when tracing is disabled by the trace file
@ 2019-08-22 23:48 Peter Wu
  2019-08-30 21:51 ` Steven Rostedt
  0 siblings, 1 reply; 5+ messages in thread
From: Peter Wu @ 2019-08-22 23:48 UTC (permalink / raw)
  To: Steven Rostedt, Ingo Molnar, Jonathan Corbet
  Cc: linux-doc, linux-kernel, Alexei Starovoitov

The current text could mislead the user into believing that only read()
disables tracing. Clarify that any open() call that requests read access
disables tracing.

Link: https://lkml.kernel.org/r/CAADnVQ+hU6QOC_dPmpjnuv=9g4SQEeaMEMqXOS2WpMj=q=LdiQ@mail.gmail.com
Signed-off-by: Peter Wu <peter@lekensteyn.nl>
---
 Documentation/trace/ftrace.rst | 13 +++++++++----
 1 file changed, 9 insertions(+), 4 deletions(-)

diff --git a/Documentation/trace/ftrace.rst b/Documentation/trace/ftrace.rst
index f60079259669..965be5c9afb3 100644
--- a/Documentation/trace/ftrace.rst
+++ b/Documentation/trace/ftrace.rst
@@ -125,7 +125,8 @@ of ftrace. Here is a list of some of the key files:
 
 	This file holds the output of the trace in a human
 	readable format (described below). Note, tracing is temporarily
-	disabled while this file is being read (opened).
+	disabled when the file is open for reading. Once all readers
+	are closed, tracing is re-enabled.
 
   trace_pipe:
 
@@ -139,8 +140,9 @@ of ftrace. Here is a list of some of the key files:
 	will not be read again with a sequential read. The
 	"trace" file is static, and if the tracer is not
 	adding more data, it will display the same
-	information every time it is read. This file will not
-	disable tracing while being read.
+	information every time it is read. Unlike the
+	"trace" file, opening this file for reading will not
+	temporarily disable tracing.
 
   trace_options:
 
@@ -3153,7 +3155,10 @@ different. The trace is live.
 
 
 Note, reading the trace_pipe file will block until more input is
-added.
+added. This is contrary to the trace file. If any process opened
+the trace file for reading, it will actually disable tracing and
+prevent new entries from being added. The trace_file file does
+not have this limitation.
 
 trace entries
 -------------
-- 
2.22.0


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

* Re: [PATCH] docs: ftrace: clarify when tracing is disabled by the trace file
  2019-08-22 23:48 [PATCH] docs: ftrace: clarify when tracing is disabled by the trace file Peter Wu
@ 2019-08-30 21:51 ` Steven Rostedt
  2019-08-31 15:35   ` [PATCH v2] " Peter Wu
  0 siblings, 1 reply; 5+ messages in thread
From: Steven Rostedt @ 2019-08-30 21:51 UTC (permalink / raw)
  To: Peter Wu
  Cc: Ingo Molnar, Jonathan Corbet, linux-doc, linux-kernel,
	Alexei Starovoitov

On Fri, 23 Aug 2019 00:48:23 +0100
Peter Wu <peter@lekensteyn.nl> wrote:

> The current text could mislead the user into believing that only read()
> disables tracing. Clarify that any open() call that requests read access
> disables tracing.
> 
> Link: https://lkml.kernel.org/r/CAADnVQ+hU6QOC_dPmpjnuv=9g4SQEeaMEMqXOS2WpMj=q=LdiQ@mail.gmail.com
> Signed-off-by: Peter Wu <peter@lekensteyn.nl>
> ---
>  Documentation/trace/ftrace.rst | 13 +++++++++----
>  1 file changed, 9 insertions(+), 4 deletions(-)
> 
> diff --git a/Documentation/trace/ftrace.rst b/Documentation/trace/ftrace.rst
> index f60079259669..965be5c9afb3 100644
> --- a/Documentation/trace/ftrace.rst
> +++ b/Documentation/trace/ftrace.rst
> @@ -125,7 +125,8 @@ of ftrace. Here is a list of some of the key files:
>  
>  	This file holds the output of the trace in a human
>  	readable format (described below). Note, tracing is temporarily
> -	disabled while this file is being read (opened).
> +	disabled when the file is open for reading. Once all readers
> +	are closed, tracing is re-enabled.
>  
>    trace_pipe:
>  
> @@ -139,8 +140,9 @@ of ftrace. Here is a list of some of the key files:
>  	will not be read again with a sequential read. The
>  	"trace" file is static, and if the tracer is not
>  	adding more data, it will display the same
> -	information every time it is read. This file will not
> -	disable tracing while being read.
> +	information every time it is read. Unlike the
> +	"trace" file, opening this file for reading will not
> +	temporarily disable tracing.
>  
>    trace_options:
>  
> @@ -3153,7 +3155,10 @@ different. The trace is live.
>  
>  
>  Note, reading the trace_pipe file will block until more input is
> -added.
> +added. This is contrary to the trace file. If any process opened
> +the trace file for reading, it will actually disable tracing and
> +prevent new entries from being added. The trace_file file does

I was just about to ack this, and then I saw the above.

  s/trace_file/trace_pipe/

Other than that, it looks good!

-- Steve

> +not have this limitation.
>  
>  trace entries
>  -------------


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

* [PATCH v2] docs: ftrace: clarify when tracing is disabled by the trace file
  2019-08-30 21:51 ` Steven Rostedt
@ 2019-08-31 15:35   ` Peter Wu
  2019-08-31 15:58     ` Steven Rostedt
  0 siblings, 1 reply; 5+ messages in thread
From: Peter Wu @ 2019-08-31 15:35 UTC (permalink / raw)
  To: Steven Rostedt, Ingo Molnar, Jonathan Corbet
  Cc: linux-doc, linux-kernel, Alexei Starovoitov

The current text could mislead the user into believing that only read()
disables tracing. Clarify that any open() call that requests read access
disables tracing.

Link: https://lkml.kernel.org/r/CAADnVQ+hU6QOC_dPmpjnuv=9g4SQEeaMEMqXOS2WpMj=q=LdiQ@mail.gmail.com
Signed-off-by: Peter Wu <peter@lekensteyn.nl>
---
v2: fix typo s/trace_file/trace_pipe/ (spotted by Steven)
---
 Documentation/trace/ftrace.rst | 13 +++++++++----
 1 file changed, 9 insertions(+), 4 deletions(-)

diff --git a/Documentation/trace/ftrace.rst b/Documentation/trace/ftrace.rst
index f60079259669..e3060eedb22d 100644
--- a/Documentation/trace/ftrace.rst
+++ b/Documentation/trace/ftrace.rst
@@ -125,7 +125,8 @@ of ftrace. Here is a list of some of the key files:
 
 	This file holds the output of the trace in a human
 	readable format (described below). Note, tracing is temporarily
-	disabled while this file is being read (opened).
+	disabled when the file is open for reading. Once all readers
+	are closed, tracing is re-enabled.
 
   trace_pipe:
 
@@ -139,8 +140,9 @@ of ftrace. Here is a list of some of the key files:
 	will not be read again with a sequential read. The
 	"trace" file is static, and if the tracer is not
 	adding more data, it will display the same
-	information every time it is read. This file will not
-	disable tracing while being read.
+	information every time it is read. Unlike the
+	"trace" file, opening this file for reading will not
+	temporarily disable tracing.
 
   trace_options:
 
@@ -3153,7 +3155,10 @@ different. The trace is live.
 
 
 Note, reading the trace_pipe file will block until more input is
-added.
+added. This is contrary to the trace file. If any process opened
+the trace file for reading, it will actually disable tracing and
+prevent new entries from being added. The trace_pipe file does
+not have this limitation.
 
 trace entries
 -------------
-- 
2.22.0


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

* Re: [PATCH v2] docs: ftrace: clarify when tracing is disabled by the trace file
  2019-08-31 15:35   ` [PATCH v2] " Peter Wu
@ 2019-08-31 15:58     ` Steven Rostedt
  2019-09-02 13:14       ` Jonathan Corbet
  0 siblings, 1 reply; 5+ messages in thread
From: Steven Rostedt @ 2019-08-31 15:58 UTC (permalink / raw)
  To: Peter Wu
  Cc: Ingo Molnar, Jonathan Corbet, linux-doc, linux-kernel,
	Alexei Starovoitov

On Sat, 31 Aug 2019 16:35:00 +0100
Peter Wu <peter@lekensteyn.nl> wrote:

> The current text could mislead the user into believing that only read()
> disables tracing. Clarify that any open() call that requests read access
> disables tracing.
> 
> Link: https://lkml.kernel.org/r/CAADnVQ+hU6QOC_dPmpjnuv=9g4SQEeaMEMqXOS2WpMj=q=LdiQ@mail.gmail.com
> Signed-off-by: Peter Wu <peter@lekensteyn.nl>

Acked-by: Steven Rostedt (VMware) <rostedt@goodmis.org>

Jon care to take this in your tree?

Thanks!

-- Steve

> ---
> v2: fix typo s/trace_file/trace_pipe/ (spotted by Steven)
> ---
>  Documentation/trace/ftrace.rst | 13 +++++++++----
>  1 file changed, 9 insertions(+), 4 deletions(-)
> 
> diff --git a/Documentation/trace/ftrace.rst b/Documentation/trace/ftrace.rst
> index f60079259669..e3060eedb22d 100644
> --- a/Documentation/trace/ftrace.rst
> +++ b/Documentation/trace/ftrace.rst
> @@ -125,7 +125,8 @@ of ftrace. Here is a list of some of the key files:
>  
>  	This file holds the output of the trace in a human
>  	readable format (described below). Note, tracing is temporarily
> -	disabled while this file is being read (opened).
> +	disabled when the file is open for reading. Once all readers
> +	are closed, tracing is re-enabled.
>  
>    trace_pipe:
>  
> @@ -139,8 +140,9 @@ of ftrace. Here is a list of some of the key files:
>  	will not be read again with a sequential read. The
>  	"trace" file is static, and if the tracer is not
>  	adding more data, it will display the same
> -	information every time it is read. This file will not
> -	disable tracing while being read.
> +	information every time it is read. Unlike the
> +	"trace" file, opening this file for reading will not
> +	temporarily disable tracing.
>  
>    trace_options:
>  
> @@ -3153,7 +3155,10 @@ different. The trace is live.
>  
>  
>  Note, reading the trace_pipe file will block until more input is
> -added.
> +added. This is contrary to the trace file. If any process opened
> +the trace file for reading, it will actually disable tracing and
> +prevent new entries from being added. The trace_pipe file does
> +not have this limitation.
>  
>  trace entries
>  -------------


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

* Re: [PATCH v2] docs: ftrace: clarify when tracing is disabled by the trace file
  2019-08-31 15:58     ` Steven Rostedt
@ 2019-09-02 13:14       ` Jonathan Corbet
  0 siblings, 0 replies; 5+ messages in thread
From: Jonathan Corbet @ 2019-09-02 13:14 UTC (permalink / raw)
  To: Steven Rostedt
  Cc: Peter Wu, Ingo Molnar, linux-doc, linux-kernel,
	Alexei Starovoitov

On Sat, 31 Aug 2019 11:58:35 -0400
Steven Rostedt <rostedt@goodmis.org> wrote:

> Acked-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
> 
> Jon care to take this in your tree?

Will do.

jon

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

end of thread, other threads:[~2019-09-02 13:14 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-08-22 23:48 [PATCH] docs: ftrace: clarify when tracing is disabled by the trace file Peter Wu
2019-08-30 21:51 ` Steven Rostedt
2019-08-31 15:35   ` [PATCH v2] " Peter Wu
2019-08-31 15:58     ` Steven Rostedt
2019-09-02 13:14       ` Jonathan Corbet

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