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] [thread-next>] [day] [month] [year] [list]
Date:   Tue, 28 Nov 2017 20:17:46 +0200
From:   Vladislav Valtchev <vladislav.valtchev@...il.com>
To:     Steven Rostedt <rostedt@...dmis.org>
Cc:     linux-kernel@...r.kernel.org, y.karadz@...il.com
Subject: Re: [PATCH 04/11] trace-cmd: Extract parse_record_options() from
 trace_record()

On Tue, 2017-11-28 at 11:48 -0500, Steven Rostedt wrote:
> 
> Is there a reason that init_instance() isn't called in
> init_common_record_context()?
> 

Hi Steven,

init_instance() has been put into init_common_record_context() later,
in patch 8, "Making start,extract,stream,profile separate funcs".


> Also, why not just do the "init_common_record_context()" in
> parse_record_options()?
> 

Because they do semantically different things: trace_* function might
want to do something before parsing the options, but after initilizing the context.
That is what already happens in trace_profile(): during the refactoring I was able
to remove a heading if (IS_PROFILE(ctx)) containing:

	handle_init = trace_init_profile;
	ctx.events = 1;

and a tail:

	/*
	 * If no instances were set, then enable profiling on the top instance.
	 */
	if (!buffer_instances)
		top_instance.profile = 1;

Since that code was profile-specific, I put it in trace_profile(),
without 'if' statements, clearly.

Vlad
 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ