Commit 2cd6ff4a authored by Markus Heiser's avatar Markus Heiser Committed by Jonathan Corbet

docs: ftrace-uses.rst fix varios code-block directives

ftrace-uses.rst is not yet included into any toctree, but since it is
a .rst file, it is parsed by the Sphinx build. Thats, why we see some
WARNINGS:

- trace/ftrace-uses.rst:53: WARNING: Definition list ends without a blank line; unexpected unindent.
- trace/ftrace-uses.rst:89: WARNING: Inline emphasis start-string without end-string.
- trace/ftrace-uses.rst:89: WARNING: Inline emphasis start-string without end-strin

Fixing the code-block directives results in a less noisy build, but the 'not
included' WARNING will be stay:

- trace/ftrace-uses.rst: WARNING: document isn't included in any toctree
Signed-off-by: default avatarMarkus Heiser <markus.heiser@darmarit.de>
Acked-by: default avatarSteven Rostedt (VMware) <rostedt@goodmis.org>
Signed-off-by: default avatarJonathan Corbet <corbet@lwn.net>
parent 27e7c0e8
...@@ -42,9 +42,9 @@ as well as what protections the callback will perform and not require ...@@ -42,9 +42,9 @@ as well as what protections the callback will perform and not require
ftrace to handle. ftrace to handle.
There is only one field that is needed to be set when registering There is only one field that is needed to be set when registering
an ftrace_ops with ftrace:: an ftrace_ops with ftrace:
.. code-block: c .. code-block:: c
struct ftrace_ops ops = { struct ftrace_ops ops = {
.func = my_callback_func, .func = my_callback_func,
...@@ -81,9 +81,9 @@ may take some time to finish. ...@@ -81,9 +81,9 @@ may take some time to finish.
The callback function The callback function
===================== =====================
The prototype of the callback function is as follows (as of v4.14):: The prototype of the callback function is as follows (as of v4.14):
.. code-block: c .. code-block:: c
void callback_func(unsigned long ip, unsigned long parent_ip, void callback_func(unsigned long ip, unsigned long parent_ip,
struct ftrace_ops *op, struct pt_regs *regs); struct ftrace_ops *op, struct pt_regs *regs);
...@@ -176,7 +176,7 @@ Filtering which functions to trace ...@@ -176,7 +176,7 @@ Filtering which functions to trace
If a callback is only to be called from specific functions, a filter must be If a callback is only to be called from specific functions, a filter must be
set up. The filters are added by name, or ip if it is known. set up. The filters are added by name, or ip if it is known.
.. code-block: c .. code-block:: c
int ftrace_set_filter(struct ftrace_ops *ops, unsigned char *buf, int ftrace_set_filter(struct ftrace_ops *ops, unsigned char *buf,
int len, int reset); int len, int reset);
...@@ -202,7 +202,7 @@ See Filter Commands in :file:`Documentation/trace/ftrace.txt`. ...@@ -202,7 +202,7 @@ See Filter Commands in :file:`Documentation/trace/ftrace.txt`.
To just trace the schedule function:: To just trace the schedule function::
.. code-block: c .. code-block:: c
ret = ftrace_set_filter(&ops, "schedule", strlen("schedule"), 0); ret = ftrace_set_filter(&ops, "schedule", strlen("schedule"), 0);
...@@ -212,7 +212,7 @@ with new functions defined by @buf, have @reset be non-zero. ...@@ -212,7 +212,7 @@ 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 .. code-block:: c
ret = ftrace_set_filter(&ops, NULL, 0, 1); ret = ftrace_set_filter(&ops, NULL, 0, 1);
...@@ -220,7 +220,7 @@ To remove all the filtered functions and trace all functions:: ...@@ -220,7 +220,7 @@ To remove all the filtered functions and trace all functions::
Sometimes more than one function has the same name. To trace just a specific Sometimes more than one function has the same name. To trace just a specific
function in this case, ftrace_set_filter_ip() can be used. function in this case, ftrace_set_filter_ip() can be used.
.. code-block: c .. code-block:: c
ret = ftrace_set_filter_ip(&ops, ip, 0, 0); ret = ftrace_set_filter_ip(&ops, ip, 0, 0);
...@@ -237,7 +237,7 @@ be called by any function. ...@@ -237,7 +237,7 @@ be called by any function.
An empty "notrace" list means to allow all functions defined by the filter An empty "notrace" list means to allow all functions defined by the filter
to be traced. to be traced.
.. code-block: c .. code-block:: c
int ftrace_set_notrace(struct ftrace_ops *ops, unsigned char *buf, int ftrace_set_notrace(struct ftrace_ops *ops, unsigned char *buf,
int len, int reset); int len, int reset);
...@@ -251,7 +251,7 @@ that match @buf to it. ...@@ -251,7 +251,7 @@ that match @buf to it.
Clearing the "notrace" list is the same as clearing the filter list Clearing the "notrace" list is the same as clearing the filter list
.. code-block: c .. code-block:: c
ret = ftrace_set_notrace(&ops, NULL, 0, 1); ret = ftrace_set_notrace(&ops, NULL, 0, 1);
...@@ -264,7 +264,7 @@ If a filter is in place, and the @reset is non-zero, and @buf contains a ...@@ -264,7 +264,7 @@ If a filter is in place, and the @reset is non-zero, and @buf contains a
matching glob to functions, the switch will happen during the time of matching glob to functions, the switch will happen during the time of
the ftrace_set_filter() call. At no time will all functions call the callback. the ftrace_set_filter() call. At no time will all functions call the callback.
.. code-block: c .. code-block:: c
ftrace_set_filter(&ops, "schedule", strlen("schedule"), 1); ftrace_set_filter(&ops, "schedule", strlen("schedule"), 1);
...@@ -276,7 +276,7 @@ the ftrace_set_filter() call. At no time will all functions call the callback. ...@@ -276,7 +276,7 @@ the ftrace_set_filter() call. At no time will all functions call the callback.
is not the same as: is not the same as:
.. code-block: c .. code-block:: c
ftrace_set_filter(&ops, "schedule", strlen("schedule"), 1); ftrace_set_filter(&ops, "schedule", strlen("schedule"), 1);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment