All of lore.kernel.org
 help / color / mirror / Atom feed
From: changbin.du@intel.com
To: corbet@lwn.net, rostedt@goodmis.org
Cc: mingo@kernel.org, linux-doc@vger.kernel.org,
	linux-kernel@vger.kernel.org, Changbin Du <changbin.du@intel.com>
Subject: [PATCH 03/17] trace doc: add ftrace-uses.rst to doc tree
Date: Sat, 17 Feb 2018 13:39:36 +0800	[thread overview]
Message-ID: <1518845990-20733-4-git-send-email-changbin.du@intel.com> (raw)
In-Reply-To: <1518845990-20733-1-git-send-email-changbin.du@intel.com>

From: Changbin Du <changbin.du@intel.com>

Add ftrace-uses.rst into Sphinx TOC tree. Few format issues are fixed.

Cc: Steven Rostedt <rostedt@goodmis.org>
Signed-off-by: Changbin Du <changbin.du@intel.com>
---
 Documentation/trace/ftrace-uses.rst | 23 ++++++++++++-----------
 Documentation/trace/index.rst       |  1 +
 2 files changed, 13 insertions(+), 11 deletions(-)

diff --git a/Documentation/trace/ftrace-uses.rst b/Documentation/trace/ftrace-uses.rst
index 3aed560..998a60a 100644
--- a/Documentation/trace/ftrace-uses.rst
+++ b/Documentation/trace/ftrace-uses.rst
@@ -21,13 +21,14 @@ how to use ftrace to implement your own function callbacks.
 
 The ftrace context
 ==================
+.. warning::
 
-WARNING: The ability to add a callback to almost any function within the
-kernel comes with risks. A callback can be called from any context
-(normal, softirq, irq, and NMI). Callbacks can also be called just before
-going to idle, during CPU bring up and takedown, or going to user space.
-This requires extra care to what can be done inside a callback. A callback
-can be called outside the protective scope of RCU.
+  The ability to add a callback to almost any function within the
+  kernel comes with risks. A callback can be called from any context
+  (normal, softirq, irq, and NMI). Callbacks can also be called just before
+  going to idle, during CPU bring up and takedown, or going to user space.
+  This requires extra care to what can be done inside a callback. A callback
+  can be called outside the protective scope of RCU.
 
 The ftrace infrastructure has some protections agains recursions and RCU
 but one must still be very careful how they use the callbacks.
@@ -54,15 +55,15 @@ an ftrace_ops with ftrace:
 
 Both .flags and .private are optional. Only .func is required.
 
-To enable tracing call::
+To enable tracing call:
 
 .. c:function::  register_ftrace_function(&ops);
 
-To disable tracing call::
+To disable tracing call:
 
 .. c:function::  unregister_ftrace_function(&ops);
 
-The above is defined by including the header::
+The above is defined by including the header:
 
 .. c:function:: #include <linux/ftrace.h>
 
@@ -200,7 +201,7 @@ match a specific pattern.
 
 See Filter Commands in :file:`Documentation/trace/ftrace.txt`.
 
-To just trace the schedule function::
+To just trace the schedule function:
 
 .. code-block:: c
 
@@ -210,7 +211,7 @@ To add more functions, call the ftrace_set_filter() more than once with the
 @reset parameter set to zero. To remove the current filter set and replace it
 with new functions defined by @buf, have @reset be non-zero.
 
-To remove all the filtered functions and trace all functions::
+To remove all the filtered functions and trace all functions:
 
 .. code-block:: c
 
diff --git a/Documentation/trace/index.rst b/Documentation/trace/index.rst
index c8000ba..aa2baad 100644
--- a/Documentation/trace/index.rst
+++ b/Documentation/trace/index.rst
@@ -6,3 +6,4 @@ Linux Tracing Technologies
    :maxdepth: 2
 
    ftrace-design
+   ftrace-uses
-- 
2.7.4

  parent reply	other threads:[~2018-02-17  5:52 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-02-17  5:39 [PATCH 00/17] Include linux trace docs to Sphinx TOC tree changbin.du
2018-02-17  5:39 ` [PATCH 01/17] Documentation: add Linux tracing " changbin.du
2018-02-17  5:39 ` [PATCH 02/17] trace doc: convert trace/ftrace-design.txt to rst format changbin.du
2018-02-17  5:39 ` changbin.du [this message]
2018-02-17  5:39 ` [PATCH 04/17] trace doc: convert trace/tracepoint-analysis.txt " changbin.du
2018-02-17  5:39 ` [PATCH 05/17] trace doc: convert trace/ftrace.txt " changbin.du
2018-02-20  7:28   ` Philippe Ombredanne
2018-02-20 13:27     ` Du, Changbin
2018-02-20 15:26       ` Steven Rostedt
2018-02-20 16:36         ` Jonathan Corbet
2018-02-17  5:39 ` [PATCH 06/17] trace doc: convert trace/kprobetrace.txt " changbin.du
2018-02-17  5:39 ` [PATCH 07/17] trace doc: convert trace/uprobetracer.txt " changbin.du
2018-02-17  5:39 ` [PATCH 08/17] trace doc: convert trace/tracepoints.txt " changbin.du
2018-02-17  5:39 ` [PATCH 09/17] trace doc: convert trace/events.txt " changbin.du
2018-02-17  5:39 ` [PATCH 10/17] trace doc: convert trace/events-kmem.txt " changbin.du
2018-02-17  5:39 ` [PATCH 11/17] trace doc: convert trace/events-power.txt " changbin.du
2018-02-17  5:39 ` [PATCH 12/17] trace doc: convert trace/events-nmi.txt " changbin.du
2018-02-17  5:39 ` [PATCH 13/17] trace doc: convert trace/events-msr.txt " changbin.du
2018-02-17  5:39 ` [PATCH 14/17] trace doc: convert trace/mmiotrace.txt " changbin.du
2018-02-17  5:39 ` [PATCH 15/17] trace doc: convert trace/hwlat_detector.txt to rst fromat changbin.du
2018-02-17  5:39 ` [PATCH 16/17] trace doc: convert trace/intel_th.txt to rst format changbin.du
2018-02-17  5:39 ` [PATCH 17/17] trace doc: convert trace/stm.txt " changbin.du
2018-02-27  9:34 ` [PATCH 00/17] Include linux trace docs to Sphinx TOC tree Du, Changbin
2018-02-27 22:43   ` Steven Rostedt
2018-03-07 17:46     ` Jonathan Corbet
2018-03-07 17:46       ` Jonathan Corbet
2018-03-08  2:42       ` Du, Changbin
2018-03-08  2:42         ` Du, Changbin
2018-03-08  3:41       ` Steven Rostedt
2018-03-08  3:41         ` Steven Rostedt

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1518845990-20733-4-git-send-email-changbin.du@intel.com \
    --to=changbin.du@intel.com \
    --cc=corbet@lwn.net \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@kernel.org \
    --cc=rostedt@goodmis.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.