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: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:	Wed, 3 Dec 2008 11:31:49 -0500 (EST)
From:	Steven Rostedt <rostedt@...dmis.org>
To:	Frédéric Weisbecker <fweisbec@...il.com>
cc:	Ingo Molnar <mingo@...e.hu>, Tim Bird <tim.bird@...sony.com>,
	Peter Zijlstra <a.p.zijlstra@...llo.nl>,
	Linux Kernel <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH 2/2] tracing/function-graph-tracer: improve duration
 output


On Wed, 3 Dec 2008, Fr?d?ric Weisbecker wrote:
> 
> A proposition about this. I want to use __ftrace_printk, make it
> generic for both function tracers and have a way to store the current
> depth.
> One solution: changing the print_entry to have the ip available for
> function-tracer and depth available for return-function_tracer.
> 
> struct print_entry {
> 	struct trace_entry	ent;
>         union {
> 	    unsigned long	ip;
>             unsigned long       depth;
>         } from;
> 	char			buf[];
> };
> 
> We could make __ftrace_printk verify which tracer is running.
> 
> If normal tracer then
>      trace_vprintk(__builtin_return_address(0), .....)
> else if graph-tracer
>      trace_vprintk(current->curr_ret_stack, ......)
> 
> This way we can even forget the ip argument of __trace_printk.
> I prefer to ask before changing an exported symbol API....

Actually, I would prefer to keep both.

	struct print_entry {
		struct trace_entry	ent;
		unsigned long		ip;
		int			depth;
		char			buf[];
	};

And pass in both. Have the readers of the functions figure out what to do 
with either, and keep the messiness away from the API.

-- Steve

--
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