Re: [PATCH 08/40] tracing: remove syscall bitmaps in preparation for compat support
From: Steven Rostedt <rostedt@goodmis.org>
Date: 2010-06-23 15:16:49
Also in:
lkml
On Wed, 2010-06-23 at 20:02 +1000, Ian Munsie wrote:
quoted hunk ↗ jump to hunk
From: Jason Baron <redacted> In preparation for compat syscall tracing support, let's store the enabled syscalls, with the struct syscall_metadata itself. That way we don't duplicate enabled information when the compat table points to an entry in the regular syscall table. Also, allows us to remove the bitmap data structures completely. Signed-off-by: Jason Baron <redacted> Signed-off-by: Ian Munsie <redacted> --- include/linux/syscalls.h | 8 +++++++ include/trace/syscall.h | 4 +++ kernel/trace/trace_syscalls.c | 42 +++++++++++++++++++--------------------- 3 files changed, 32 insertions(+), 22 deletions(-)diff --git a/include/linux/syscalls.h b/include/linux/syscalls.h index 86f082b..755d05b 100644 --- a/include/linux/syscalls.h +++ b/include/linux/syscalls.h@@ -163,6 +163,10 @@ extern struct trace_event_functions exit_syscall_print_funcs; .nb_args = nb, \ .types = types_##sname, \ .args = args_##sname, \ + .ftrace_enter = 0, \ + .ftrace_exit = 0, \ + .perf_enter = 0, \ + .perf_exit = 0, \
I really hate this change! You just removed a nice compressed bitmap (1 bit per syscall) to add 4 bytes per syscall. On my box I have 308 syscalls being traced. That was 308 bits per bitmask = 39 bytes * 2 = 78 * 2 (perf and ftrace) = 156. Now we have 8 bytes per syscall (enter and exit), which is 1232 bytes. Thus this change added 1076 bytes. This may not seem as much, but the change is not worth 1K. Can't we just add another bitmask or something for the compat case? I also hate the moving of ftrace and perf internal data to an external interface. -- Steve
quoted hunk ↗ jump to hunk
.enter_event = &event_enter_##sname, \ .exit_event = &event_exit_##sname, \ .enter_fields = LIST_HEAD_INIT(__syscall_meta_##sname.enter_fields), \@@ -179,6 +183,10 @@ extern struct trace_event_functions exit_syscall_print_funcs; .name = "sys_"#sname, \ .syscall_nr = -1, /* Filled in at boot */ \ .nb_args = 0, \ + .ftrace_enter = 0, \ + .ftrace_exit = 0, \ + .perf_enter = 0, \ + .perf_exit = 0, \ .enter_event = &event_enter__##sname, \ .exit_event = &event_exit__##sname, \ .enter_fields = LIST_HEAD_INIT(__syscall_meta__##sname.enter_fields), \