From: Li Zefan <lizf@cn.fujitsu.com>
To: Steven Rostedt <rostedt@goodmis.org>
Cc: Frederic Weisbecker <fweisbec@gmail.com>,
Ingo Molnar <mingo@elte.hu>, LKML <linux-kernel@vger.kernel.org>
Subject: [PATCH 3/3] tracing: Update comments
Date: Wed, 24 Mar 2010 10:58:24 +0800 [thread overview]
Message-ID: <4BA97FD0.7090202@cn.fujitsu.com> (raw)
In-Reply-To: <4BA97FA7.6040406@cn.fujitsu.com>
Make some comments consistent with the code.
Signed-off-by: Li Zefan <lizf@cn.fujitsu.com>
---
include/trace/ftrace.h | 33 +++++++++++++++++++--------------
1 files changed, 19 insertions(+), 14 deletions(-)
diff --git a/include/trace/ftrace.h b/include/trace/ftrace.h
index ea6f9d4..75dd778 100644
--- a/include/trace/ftrace.h
+++ b/include/trace/ftrace.h
@@ -154,9 +154,11 @@
*
* field = (typeof(field))entry;
*
- * p = get_cpu_var(ftrace_event_seq);
+ * p = &get_cpu_var(ftrace_event_seq);
* trace_seq_init(p);
- * ret = trace_seq_printf(s, <TP_printk> "\n");
+ * ret = trace_seq_printf(s, "%s: ", <call>);
+ * if (ret)
+ * ret = trace_seq_printf(s, <TP_printk> "\n");
* put_cpu();
* if (!ret)
* return TRACE_TYPE_PARTIAL_LINE;
@@ -450,38 +452,38 @@ perf_trace_disable_##name(struct ftrace_event_call *unused) \
*
* static void ftrace_raw_event_<call>(proto)
* {
+ * struct ftrace_data_offsets_<call> __maybe_unused __data_offsets;
* struct ring_buffer_event *event;
* struct ftrace_raw_<call> *entry; <-- defined in stage 1
* struct ring_buffer *buffer;
* unsigned long irq_flags;
+ * int __data_size;
* int pc;
*
* local_save_flags(irq_flags);
* pc = preempt_count();
*
+ * __data_size = ftrace_get_offsets_<call>(&__data_offsets, args);
+ *
* event = trace_current_buffer_lock_reserve(&buffer,
* event_<call>.id,
- * sizeof(struct ftrace_raw_<call>),
+ * sizeof(*entry) + __data_size,
* irq_flags, pc);
* if (!event)
* return;
* entry = ring_buffer_event_data(event);
*
- * <assign>; <-- Here we assign the entries by the __field and
- * __array macros.
+ * { <assign>; } <-- Here we assign the entries by the __field and
+ * __array macros.
*
- * trace_current_buffer_unlock_commit(buffer, event, irq_flags, pc);
+ * if (!filter_current_check_discard(buffer, event_call, entry, event))
+ * trace_current_buffer_unlock_commit(buffer,
+ * event, irq_flags, pc);
* }
*
* static int ftrace_raw_reg_event_<call>(struct ftrace_event_call *unused)
* {
- * int ret;
- *
- * ret = register_trace_<call>(ftrace_raw_event_<call>);
- * if (!ret)
- * pr_info("event trace: Could not activate trace point "
- * "probe to <call>");
- * return ret;
+ * return register_trace_<call>(ftrace_raw_event_<call>);
* }
*
* static void ftrace_unreg_event_<call>(struct ftrace_event_call *unused)
@@ -493,6 +495,8 @@ perf_trace_disable_##name(struct ftrace_event_call *unused) \
* .trace = ftrace_raw_output_<call>, <-- stage 2
* };
*
+ * static const char print_fmt_<call>[] = <TP_printk>;
+ *
* static struct ftrace_event_call __used
* __attribute__((__aligned__(4)))
* __attribute__((section("_ftrace_events"))) event_<call> = {
@@ -501,6 +505,8 @@ perf_trace_disable_##name(struct ftrace_event_call *unused) \
* .raw_init = trace_event_raw_init,
* .regfunc = ftrace_reg_event_<call>,
* .unregfunc = ftrace_unreg_event_<call>,
+ * .print_fmt = print_fmt_<call>,
+ * .define_fields = ftrace_define_fields_<call>,
* }
*
*/
@@ -569,7 +575,6 @@ ftrace_raw_event_id_##call(struct ftrace_event_call *event_call, \
return; \
entry = ring_buffer_event_data(event); \
\
- \
tstruct \
\
{ assign; } \
--
1.6.3
next prev parent reply other threads:[~2010-03-24 2:57 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-03-18 23:26 2.6.33 GP fault only when built with tracing Randy Dunlap
2010-03-18 23:55 ` Steven Rostedt
2010-03-19 0:08 ` Randy Dunlap
2010-03-19 0:59 ` Mathieu Desnoyers
2010-03-19 18:22 ` Randy Dunlap
2010-03-19 18:46 ` Mathieu Desnoyers
2010-03-23 15:26 ` Randy Dunlap
2010-03-24 1:20 ` Mathieu Desnoyers
2010-03-24 1:42 ` Li Zefan
2010-03-24 20:21 ` Randy Dunlap
2010-03-24 20:31 ` Steven Rostedt
2010-03-20 0:12 ` Randy Dunlap
2010-03-19 0:01 ` Frederic Weisbecker
2010-03-19 2:15 ` Steven Rostedt
2010-03-19 16:10 ` Randy Dunlap
2010-03-24 2:57 ` [PATCH 1/3] tracing: Reduce overhead of module tracepoints Li Zefan
2010-03-24 2:58 ` [PATCH 2/3] tracing: Convert some signal events to DEFINE_TRACE Li Zefan
2010-03-24 3:07 ` Steven Rostedt
2010-03-24 3:17 ` Masami Hiramatsu
2010-04-02 19:03 ` [tip:tracing/core] " tip-bot for Li Zefan
2010-03-24 2:58 ` Li Zefan [this message]
2010-03-24 3:07 ` [PATCH 3/3] tracing: Update comments Steven Rostedt
2010-04-02 19:04 ` [tip:tracing/core] " tip-bot for Li Zefan
2010-03-24 3:05 ` [PATCH 1/3] tracing: Reduce overhead of module tracepoints Steven Rostedt
2010-03-24 10:24 ` Mathieu Desnoyers
2010-03-24 23:41 ` Randy Dunlap
2010-03-27 2:03 ` [tip:tracing/urgent] tracing: Remove side effect from module tracepoints that caused a GPF tip-bot for Li Zefan
2010-03-27 4:10 ` Mathieu Desnoyers
2010-03-27 4:23 ` Steven Rostedt
2010-04-02 19:04 ` [tip:tracing/core] " tip-bot for Li Zefan
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=4BA97FD0.7090202@cn.fujitsu.com \
--to=lizf@cn.fujitsu.com \
--cc=fweisbec@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox