tracing: Remove duplicate id information in event structure
Now that the trace_event structure is embedded in the ftrace_event_call
structure, there is no need for the ftrace_event_call id field.
The id field is the same as the trace_event type field.
Removing the id and re-arranging the structure brings down the tracepoint
footprint by another 5K.
text data bss dec hex filename
4913961 1088356 861512 6863829 68bbd5 vmlinux.orig
4895024 1023812
861512 6780348 6775bc vmlinux.print
4894944 1018052 861512 6774508 675eec vmlinux.id
Acked-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Acked-by: Masami Hiramatsu <mhiramat@redhat.com>
Acked-by: Frederic Weisbecker <fweisbec@gmail.com>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
This commit is contained in:
committed by
Steven Rostedt
parent
80decc70af
commit
32c0edaeaa
@@ -117,7 +117,7 @@ print_syscall_enter(struct trace_iterator *iter, int flags,
|
||||
if (!entry)
|
||||
goto end;
|
||||
|
||||
if (entry->enter_event->id != ent->type) {
|
||||
if (entry->enter_event->event.type != ent->type) {
|
||||
WARN_ON_ONCE(1);
|
||||
goto end;
|
||||
}
|
||||
@@ -173,7 +173,7 @@ print_syscall_exit(struct trace_iterator *iter, int flags,
|
||||
return TRACE_TYPE_HANDLED;
|
||||
}
|
||||
|
||||
if (entry->exit_event->id != ent->type) {
|
||||
if (entry->exit_event->event.type != ent->type) {
|
||||
WARN_ON_ONCE(1);
|
||||
return TRACE_TYPE_UNHANDLED;
|
||||
}
|
||||
@@ -315,7 +315,7 @@ void ftrace_syscall_enter(void *ignore, struct pt_regs *regs, long id)
|
||||
size = sizeof(*entry) + sizeof(unsigned long) * sys_data->nb_args;
|
||||
|
||||
event = trace_current_buffer_lock_reserve(&buffer,
|
||||
sys_data->enter_event->id, size, 0, 0);
|
||||
sys_data->enter_event->event.type, size, 0, 0);
|
||||
if (!event)
|
||||
return;
|
||||
|
||||
@@ -347,7 +347,7 @@ void ftrace_syscall_exit(void *ignore, struct pt_regs *regs, long ret)
|
||||
return;
|
||||
|
||||
event = trace_current_buffer_lock_reserve(&buffer,
|
||||
sys_data->exit_event->id, sizeof(*entry), 0, 0);
|
||||
sys_data->exit_event->event.type, sizeof(*entry), 0, 0);
|
||||
if (!event)
|
||||
return;
|
||||
|
||||
@@ -511,7 +511,8 @@ static void perf_syscall_enter(void *ignore, struct pt_regs *regs, long id)
|
||||
return;
|
||||
|
||||
rec = (struct syscall_trace_enter *)perf_trace_buf_prepare(size,
|
||||
sys_data->enter_event->id, &rctx, &flags);
|
||||
sys_data->enter_event->event.type,
|
||||
&rctx, &flags);
|
||||
if (!rec)
|
||||
return;
|
||||
|
||||
@@ -586,7 +587,8 @@ static void perf_syscall_exit(void *ignore, struct pt_regs *regs, long ret)
|
||||
return;
|
||||
|
||||
rec = (struct syscall_trace_exit *)perf_trace_buf_prepare(size,
|
||||
sys_data->exit_event->id, &rctx, &flags);
|
||||
sys_data->exit_event->event.type,
|
||||
&rctx, &flags);
|
||||
if (!rec)
|
||||
return;
|
||||
|
||||
|
Reference in New Issue
Block a user