-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
yaml --- r: 140826 b: refs/heads/master c: c32e827 h: refs/heads/master v: v3
- Loading branch information
Steven Rostedt
committed
Feb 28, 2009
1 parent
cb9c453
commit 286edf6
Showing
8 changed files
with
351 additions
and
60 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
--- | ||
refs/heads/master: ef5580d0fffce6e0a01043bac0625128b5d409a7 | ||
refs/heads/master: c32e827b25054cb17b79cf97fb5e63ae4ce2223c |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
/* | ||
* Stage 1 of the trace events. | ||
* | ||
* Override the macros in <trace/trace_event_types.h> to include the following: | ||
* | ||
* struct ftrace_raw_<call> { | ||
* struct trace_entry ent; | ||
* <type> <item>; | ||
* [...] | ||
* }; | ||
* | ||
* The <type> <item> is created by the TRACE_FIELD(type, item, assign) | ||
* macro. We simply do "type item;", and that will create the fields | ||
* in the structure. | ||
*/ | ||
|
||
#undef TRACE_FORMAT | ||
#define TRACE_FORMAT(call, proto, args, fmt) | ||
|
||
#undef TRACE_EVENT_FORMAT | ||
#define TRACE_EVENT_FORMAT(name, proto, args, fmt, tstruct, tpfmt) \ | ||
struct ftrace_raw_##name { \ | ||
struct trace_entry ent; \ | ||
tstruct \ | ||
}; \ | ||
static struct ftrace_event_call event_##name | ||
|
||
#undef TRACE_STRUCT | ||
#define TRACE_STRUCT(args...) args | ||
|
||
#define TRACE_FIELD(type, item, assign) \ | ||
type item; | ||
|
||
#include <trace/trace_event_types.h> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,72 @@ | ||
/* | ||
* Stage 2 of the trace events. | ||
* | ||
* Override the macros in <trace/trace_event_types.h> to include the following: | ||
* | ||
* enum print_line_t | ||
* ftrace_raw_output_<call>(struct trace_iterator *iter, int flags) | ||
* { | ||
* struct trace_seq *s = &iter->seq; | ||
* struct ftrace_raw_<call> *field; <-- defined in stage 1 | ||
* struct trace_entry *entry; | ||
* int ret; | ||
* | ||
* entry = iter->ent; | ||
* | ||
* if (entry->type != event_<call>.id) { | ||
* WARN_ON_ONCE(1); | ||
* return TRACE_TYPE_UNHANDLED; | ||
* } | ||
* | ||
* field = (typeof(field))entry; | ||
* | ||
* ret = trace_seq_printf(s, <TPRAWFMT> "%s", <ARGS> "\n"); | ||
* if (!ret) | ||
* return TRACE_TYPE_PARTIAL_LINE; | ||
* | ||
* return TRACE_TYPE_HANDLED; | ||
* } | ||
* | ||
* This is the method used to print the raw event to the trace | ||
* output format. Note, this is not needed if the data is read | ||
* in binary. | ||
*/ | ||
|
||
#undef TRACE_STRUCT | ||
#define TRACE_STRUCT(args...) args | ||
|
||
#undef TRACE_FIELD | ||
#define TRACE_FIELD(type, item, assign) \ | ||
field->item, | ||
|
||
|
||
#undef TPRAWFMT | ||
#define TPRAWFMT(args...) args | ||
|
||
#undef TRACE_EVENT_FORMAT | ||
#define TRACE_EVENT_FORMAT(call, proto, args, fmt, tstruct, tpfmt) \ | ||
enum print_line_t \ | ||
ftrace_raw_output_##call(struct trace_iterator *iter, int flags) \ | ||
{ \ | ||
struct trace_seq *s = &iter->seq; \ | ||
struct ftrace_raw_##call *field; \ | ||
struct trace_entry *entry; \ | ||
int ret; \ | ||
\ | ||
entry = iter->ent; \ | ||
\ | ||
if (entry->type != event_##call.id) { \ | ||
WARN_ON_ONCE(1); \ | ||
return TRACE_TYPE_UNHANDLED; \ | ||
} \ | ||
\ | ||
field = (typeof(field))entry; \ | ||
\ | ||
ret = trace_seq_printf(s, tpfmt "%s", tstruct "\n"); \ | ||
if (!ret) \ | ||
return TRACE_TYPE_PARTIAL_LINE; \ | ||
\ | ||
return TRACE_TYPE_HANDLED; \ | ||
} | ||
|
||
#include <trace/trace_event_types.h> |
Oops, something went wrong.