aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSteven Rostedt <srostedt@redhat.com>2011-02-25 22:04:38 -0500
committerSteven Rostedt <rostedt@goodmis.org>2011-02-25 22:04:38 -0500
commit302f80cbd7449b0a4240e4372252da68051b03a2 (patch)
treee80227115bf52e25c5c3ec43b80c988c9335c801
parent9e0fd22b14805a3a3219a99bc5eccebf70f5484a (diff)
trace-cmd: Remove duplicate search for ftrace event in blktrace hack
The first try of the blktrace hack, I searched for a ftrace event. But then I found that TRACE_BLK is not the same on all kernels so I did a progressive search for a ftrace event to find where TRACE_BLK may be. The linear search was left over from the first attempt and no longer needed. Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
-rw-r--r--trace-blk-hack.c10
1 files changed, 0 insertions, 10 deletions
diff --git a/trace-blk-hack.c b/trace-blk-hack.c
index 29c3c74..bdc9d13 100644
--- a/trace-blk-hack.c
+++ b/trace-blk-hack.c
@@ -53,7 +53,6 @@ int tracecmd_blk_hack(struct tracecmd_input *handle)
53 int id; 53 int id;
54 int l; 54 int l;
55 int r; 55 int r;
56 int i;
57 56
58 pevent = tracecmd_get_pevent(handle); 57 pevent = tracecmd_get_pevent(handle);
59 58
@@ -126,15 +125,6 @@ int tracecmd_blk_hack(struct tracecmd_input *handle)
126 * to not write over the ftrace data. 125 * to not write over the ftrace data.
127 */ 126 */
128 127
129 /* search for a ftrace event */
130 for (i = 0; i < 13; i++) {
131 event = pevent_find_event(pevent, i);
132 if (event)
133 break;
134 }
135 if (!event)
136 goto fail;
137
138 /* Make sure the common fields exist */ 128 /* Make sure the common fields exist */
139 field = pevent_find_common_field(event, "common_type"); 129 field = pevent_find_common_field(event, "common_type");
140 if (!field || field->offset != 0 || field->size != 2) 130 if (!field || field->offset != 0 || field->size != 2)