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]
Message-ID: <20150708144118.GA13619@krava.redhat.com>
Date:	Wed, 8 Jul 2015 16:41:18 +0200
From:	Jiri Olsa <jolsa@...hat.com>
To:	kan.liang@...el.com
Cc:	acme@...nel.org, jolsa@...nel.org, namhyung@...nel.org,
	ak@...ux.intel.com, linux-kernel@...r.kernel.org
Subject: Re: [PATCH RFC V2 1/5] perf,tools: introduce
 OPT_CALLBACK_SET/OPT_CALLBACK_NOOPT_SET

On Tue, Jul 07, 2015 at 06:19:01AM -0400, kan.liang@...el.com wrote:
> From: Kan Liang <kan.liang@...el.com>
> 
> This patch extends the OPT_CALLBACK/OPT_CALLBACK_NOOPT to support 'set'
> item of struct option. So the perf knows whether an option was set by
> user.
> The new macros are used by call-graph and timestamp options.
> 
> Signed-off-by: Kan Liang <kan.liang@...el.com>
> ---
>  tools/perf/builtin-record.c     | 7 ++++---
>  tools/perf/perf.h               | 2 ++
>  tools/perf/util/parse-options.c | 2 ++
>  tools/perf/util/parse-options.h | 4 ++++
>  4 files changed, 12 insertions(+), 3 deletions(-)
> 
> diff --git a/tools/perf/builtin-record.c b/tools/perf/builtin-record.c
> index de165a1..c270993 100644
> --- a/tools/perf/builtin-record.c
> +++ b/tools/perf/builtin-record.c
> @@ -1018,10 +1018,10 @@ struct option __record_options[] = {
>  		     record__parse_mmap_pages),
>  	OPT_BOOLEAN(0, "group", &record.opts.group,
>  		    "put the counters into a counter group"),
> -	OPT_CALLBACK_NOOPT('g', NULL, &record.opts,
> +	OPT_CALLBACK_NOOPT_SET('g', NULL, &record.opts, &record.opts.callgraph_set,
>  			   NULL, "enables call-graph recording" ,
>  			   &record_callchain_opt),
> -	OPT_CALLBACK(0, "call-graph", &record.opts,
> +	OPT_CALLBACK_SET(0, "call-graph", &record.opts, &record.opts.callgraph_set,
>  		     "mode[,dump_size]", record_callchain_help,
>  		     &record_parse_callchain_opt),
>  	OPT_INCR('v', "verbose", &verbose,
> @@ -1030,7 +1030,8 @@ struct option __record_options[] = {
>  	OPT_BOOLEAN('s', "stat", &record.opts.inherit_stat,
>  		    "per thread counts"),
>  	OPT_BOOLEAN('d', "data", &record.opts.sample_address, "Record the sample addresses"),
> -	OPT_BOOLEAN('T', "timestamp", &record.opts.sample_time, "Record the sample timestamps"),
> +	OPT_BOOLEAN_SET('T', "timestamp", &record.opts.sample_time,
> +			&record.opts.sample_time_set, "Sample timestamps"),

this hunk got in as:
  3abebc55d70b perf record: Let user have timestamps with per-thread recording

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