lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20091208073042.GA4989@nowhere>
Date:	Tue, 8 Dec 2009 08:30:44 +0100
From:	Frederic Weisbecker <fweisbec@...il.com>
To:	Li Zefan <lizf@...fujitsu.com>
Cc:	Ingo Molnar <mingo@...e.hu>, Steven Rostedt <rostedt@...dmis.org>,
	LKML <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH 01/13] tracing: Extract duplicate
	ftrace_raw_init_event_foo()

On Tue, Dec 08, 2009 at 11:14:20AM +0800, Li Zefan wrote:
> Define ftrace_raw_init_event_foo() for each event class rather
> than for each event:
> 
>    text    data     bss     dec     hex filename
> 5355293 1961928 7103260 14420481         dc0a01 vmlinux.o.old
> 5346802 1961864 7103260 14411926         dbe896 vmlinux.o
> 
> raw_init can't be removed, because ftrace events and kprobe events
> use different raw_init callbacks. Though it's possible to totally
> remove raw_init, I choose to leave it as it is for now.
> 
> Signed-off-by: Li Zefan <lizf@...fujitsu.com>
> ---
>  include/linux/ftrace_event.h |    1 +
>  include/linux/syscalls.h     |    4 ++--
>  include/trace/ftrace.h       |   35 ++++-------------------------------
>  kernel/trace/trace_events.c  |   14 ++++++++++++++
>  4 files changed, 21 insertions(+), 33 deletions(-)
> 
> diff --git a/include/linux/ftrace_event.h b/include/linux/ftrace_event.h
> index 47bbdf9..cdea8a9 100644
> --- a/include/linux/ftrace_event.h
> +++ b/include/linux/ftrace_event.h
> @@ -157,6 +157,7 @@ enum {
>  	FILTER_PTR_STRING,
>  };
>  
> +extern int trace_event_raw_init(struct ftrace_event_call *call);
>  extern int trace_define_common_fields(struct ftrace_event_call *call);
>  extern int trace_define_field(struct ftrace_event_call *call, const char *type,
>  			      const char *name, int offset, int size,
> diff --git a/include/linux/syscalls.h b/include/linux/syscalls.h
> index e79e2f3..55e7108 100644
> --- a/include/linux/syscalls.h
> +++ b/include/linux/syscalls.h
> @@ -144,7 +144,7 @@ struct perf_event_attr;
>  		.name                   = "sys_enter"#sname,		\
>  		.system                 = "syscalls",			\
>  		.event                  = &enter_syscall_print_##sname,	\
> -		.raw_init		= init_syscall_trace,		\
> +		.raw_init		= trace_event_raw_init,		\
>  		.show_format		= syscall_enter_format,		\
>  		.define_fields		= syscall_enter_define_fields,	\
>  		.regfunc		= reg_event_syscall_enter,	\
> @@ -166,7 +166,7 @@ struct perf_event_attr;
>  		.name                   = "sys_exit"#sname,		\
>  		.system                 = "syscalls",			\
>  		.event                  = &exit_syscall_print_##sname,	\
> -		.raw_init		= init_syscall_trace,		\
> +		.raw_init		= trace_event_raw_init,		\



Nice cleanup.
BTW, init_syscall_trace is left unused now. Could you please
remove it too?

And add my Acked-by. Thanks!

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ