Re: [PATCH 08/40] tracing: remove syscall bitmaps in preparationfor compat support

From: Steven Rostedt
Date: Wed Jun 23 2010 - 11:16:52 EST


On Wed, 2010-06-23 at 20:02 +1000, Ian Munsie wrote:
> From: Jason Baron <jbaron@xxxxxxxxxx>
>
> 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 <jbaron@xxxxxxxxxx>
> Signed-off-by: Ian Munsie <imunsie@xxxxxxxxxxx>
> ---
> 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

> .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), \


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/