From: Steven Rostedt <rostedt@goodmis.org>
To: linux-kernel@vger.kernel.org
Cc: Ingo Molnar <mingo@kernel.org>,
Frederic Weisbecker <fweisbec@gmail.com>,
Andrew Morton <akpm@linux-foundation.org>,
Tom Zanussi <tom.zanussi@linux.intel.com>
Subject: [for-next][PATCH 1/3] tracing/README: Add event file usage to tracing mini-HOWTO
Date: Sat, 25 Jan 2014 23:59:42 -0500 [thread overview]
Message-ID: <20140126050030.145193258@goodmis.org> (raw)
In-Reply-To: 20140126045941.796589415@goodmis.org
[-- Attachment #1: 0001-tracing-README-Add-event-file-usage-to-tracing-mini-.patch --]
[-- Type: text/plain, Size: 3831 bytes --]
From: Tom Zanussi <tom.zanussi@linux.intel.com>
It would be useful to have a cheat-sheet for everything under
tracing/events/ alongside the existing text describing the other files
in the tracing/ dir.
Add short descriptions of the directories and files under events/
along with examples, similar to the existing text for the other files
in tracing/.
Also clean up a few minor alignment problems noticed when adding the
new text.
Link: http://lkml.kernel.org/r/1389993104.3040.445.camel@empanada
Signed-off-by: Tom Zanussi <tom.zanussi@linux.intel.com>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
---
kernel/trace/trace.c | 37 ++++++++++++++++++++++++++++++++++---
1 file changed, 34 insertions(+), 3 deletions(-)
diff --git a/kernel/trace/trace.c b/kernel/trace/trace.c
index 20c755e..2ced5e5 100644
--- a/kernel/trace/trace.c
+++ b/kernel/trace/trace.c
@@ -3523,9 +3523,9 @@ static const char readme_msg[] =
#ifdef CONFIG_DYNAMIC_FTRACE
"\n available_filter_functions - list of functions that can be filtered on\n"
" set_ftrace_filter\t- echo function name in here to only trace these functions\n"
- " accepts: func_full_name, *func_end, func_begin*, *func_middle*\n"
- " modules: Can select a group via module\n"
- " Format: :mod:<module-name>\n"
+ " accepts: func_full_name, *func_end, func_begin*, *func_middle*\n"
+ " modules: Can select a group via module\n"
+ " Format: :mod:<module-name>\n"
" example: echo :mod:ext3 > set_ftrace_filter\n"
" triggers: a command to perform when function is hit\n"
" Format: <function>:<trigger>[:count]\n"
@@ -3573,6 +3573,37 @@ static const char readme_msg[] =
" stack_trace_filter\t- Like set_ftrace_filter but limits what stack_trace traces\n"
#endif
#endif /* CONFIG_STACK_TRACER */
+ " events/\t\t- Directory containing all trace event subsystems:\n"
+ " enable\t\t- Write 0/1 to enable/disable tracing of all events\n"
+ " events/<system>/\t- Directory containing all trace events for <system>:\n"
+ " enable\t\t- Write 0/1 to enable/disable tracing of all <system> events\n"
+ " filter\t\t- If set, only events passing filter are traced\n"
+ " events/<system>/<event>/\t- Directory containing control files for <event>:\n"
+ " enable\t\t- Write 0/1 to enable/disable tracing of <event>\n"
+ " filter\t\t- If set, only events passing filter are traced\n"
+ " trigger\t\t- If set, a command to perform when event is hit\n"
+ " Format: <trigger>[:count][if <filter>]\n"
+ " trigger: traceon, traceoff\n"
+ " enable_event:<system>:<event>\n"
+ " disable_event:<system>:<event>\n"
+#ifdef CONFIG_STACKTRACE
+ " stacktrace\n"
+#endif
+#ifdef CONFIG_TRACER_SNAPSHOT
+ " snapshot\n"
+#endif
+ " example: echo traceoff > events/block/block_unplug/trigger\n"
+ " echo traceoff:3 > events/block/block_unplug/trigger\n"
+ " echo 'enable_event:kmem:kmalloc:3 if nr_rq > 1' > events/block/block_unplug/trigger\n"
+ " The first disables tracing every time block_unplug is hit.\n"
+ " The second disables tracing the first 3 times block_unplug is hit.\n"
+ " The third enables the kmalloc event the first 3 times block_unplug\n"
+ " is hit and has value of greater than 1 for the 'nr_rq' event field.\n"
+ " To remove a trigger without a count:\n"
+ " echo '!<trigger> > <system>/<event>/trigger\n"
+ " To remove a trigger with a count:\n"
+ " echo '!<trigger>:0 > <system>/<event>/trigger\n"
+ " Filters can be ignored when removing a trigger.\n"
;
static ssize_t
--
1.8.4.3
next prev parent reply other threads:[~2014-01-26 5:00 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-01-26 4:59 [for-next][PATCH 0/3] tracing: Update to README and a small bug fix Steven Rostedt
2014-01-26 4:59 ` Steven Rostedt [this message]
2014-01-26 4:59 ` [for-next][PATCH 2/3] tracing: Fix formatting of trace README file Steven Rostedt
2014-01-26 4:59 ` [for-next][PATCH 3/3] tracing: Check if tracing is enabled in trace_puts() 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=20140126050030.145193258@goodmis.org \
--to=rostedt@goodmis.org \
--cc=akpm@linux-foundation.org \
--cc=fweisbec@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@kernel.org \
--cc=tom.zanussi@linux.intel.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox