summaryrefslogtreecommitdiffstats
path: root/Documentation/trace
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2019-05-15 19:05:47 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2019-05-15 19:05:47 -0400
commitd2d8b146043ae7e250aef1fb312971f6f479d487 (patch)
tree22db8758a5aa0bc850ba8f83fe57b1f679924d0a /Documentation/trace
parent2bbacd1a92788ee334c7e92b765ea16ebab68dfe (diff)
parent693713cbdb3a4bda5a8a678c31f06560bbb14657 (diff)
Merge tag 'trace-v5.2' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace
Pull tracing updates from Steven Rostedt: "The major changes in this tracing update includes: - Removal of non-DYNAMIC_FTRACE from 32bit x86 - Removal of mcount support from x86 - Emulating a call from int3 on x86_64, fixes live kernel patching - Consolidated Tracing Error logs file Minor updates: - Removal of klp_check_compiler_support() - kdb ftrace dumping output changes - Accessing and creating ftrace instances from inside the kernel - Clean up of #define if macro - Introduction of TRACE_EVENT_NOP() to disable trace events based on config options And other minor fixes and clean ups" * tag 'trace-v5.2' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace: (44 commits) x86: Hide the int3_emulate_call/jmp functions from UML livepatch: Remove klp_check_compiler_support() ftrace/x86: Remove mcount support ftrace/x86_32: Remove support for non DYNAMIC_FTRACE tracing: Simplify "if" macro code tracing: Fix documentation about disabling options using trace_options tracing: Replace kzalloc with kcalloc tracing: Fix partial reading of trace event's id file tracing: Allow RCU to run between postponed startup tests tracing: Fix white space issues in parse_pred() function tracing: Eliminate const char[] auto variables ring-buffer: Fix mispelling of Calculate tracing: probeevent: Fix to make the type of $comm string tracing: probeevent: Do not accumulate on ret variable tracing: uprobes: Re-enable $comm support for uprobe events ftrace/x86_64: Emulate call function while updating in breakpoint handler x86_64: Allow breakpoints to emulate call instructions x86_64: Add gap to int3 to allow for call emulation tracing: kdb: Allow ftdump to skip all but the last few entries tracing: Add trace_total_entries() / trace_total_entries_cpu() ...
Diffstat (limited to 'Documentation/trace')
-rw-r--r--Documentation/trace/ftrace.rst31
-rw-r--r--Documentation/trace/histogram.rst16
2 files changed, 33 insertions, 14 deletions
diff --git a/Documentation/trace/ftrace.rst b/Documentation/trace/ftrace.rst
index c3b9bd2fd512..f60079259669 100644
--- a/Documentation/trace/ftrace.rst
+++ b/Documentation/trace/ftrace.rst
@@ -765,6 +765,37 @@ Here is the list of current tracers that may be configured.
765 tracers from tracing simply echo "nop" into 765 tracers from tracing simply echo "nop" into
766 current_tracer. 766 current_tracer.
767 767
768Error conditions
769----------------
770
771 For most ftrace commands, failure modes are obvious and communicated
772 using standard return codes.
773
774 For other more involved commands, extended error information may be
775 available via the tracing/error_log file. For the commands that
776 support it, reading the tracing/error_log file after an error will
777 display more detailed information about what went wrong, if
778 information is available. The tracing/error_log file is a circular
779 error log displaying a small number (currently, 8) of ftrace errors
780 for the last (8) failed commands.
781
782 The extended error information and usage takes the form shown in
783 this example::
784
785 # echo xxx > /sys/kernel/debug/tracing/events/sched/sched_wakeup/trigger
786 echo: write error: Invalid argument
787
788 # cat /sys/kernel/debug/tracing/error_log
789 [ 5348.887237] location: error: Couldn't yyy: zzz
790 Command: xxx
791 ^
792 [ 7517.023364] location: error: Bad rrr: sss
793 Command: ppp qqq
794 ^
795
796 To clear the error log, echo the empty string into it::
797
798 # echo > /sys/kernel/debug/tracing/error_log
768 799
769Examples of using the tracer 800Examples of using the tracer
770---------------------------- 801----------------------------
diff --git a/Documentation/trace/histogram.rst b/Documentation/trace/histogram.rst
index ddbaffa530f9..fb621a1c2638 100644
--- a/Documentation/trace/histogram.rst
+++ b/Documentation/trace/histogram.rst
@@ -199,20 +199,8 @@ Extended error information
199 199
200 For some error conditions encountered when invoking a hist trigger 200 For some error conditions encountered when invoking a hist trigger
201 command, extended error information is available via the 201 command, extended error information is available via the
202 corresponding event's 'hist' file. Reading the hist file after an 202 tracing/error_log file. See Error Conditions in
203 error will display more detailed information about what went wrong, 203 :file:`Documentation/trace/ftrace.rst` for details.
204 if information is available. This extended error information will
205 be available until the next hist trigger command for that event.
206
207 If available for a given error condition, the extended error
208 information and usage takes the following form::
209
210 # echo xxx > /sys/kernel/debug/tracing/events/sched/sched_wakeup/trigger
211 echo: write error: Invalid argument
212
213 # cat /sys/kernel/debug/tracing/events/sched/sched_wakeup/hist
214 ERROR: Couldn't yyy: zzz
215 Last command: xxx
216 204
2176.2 'hist' trigger examples 2056.2 'hist' trigger examples
218--------------------------- 206---------------------------