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: <1246089384.2961.5.camel@hpdv5.satnam>
Date:	Sat, 27 Jun 2009 13:26:24 +0530
From:	Jaswinder Singh Rajput <jaswinder@...nel.org>
To:	mingo@...hat.com, hpa@...or.com, paulus@...ba.org, acme@...hat.com,
	linux-kernel@...r.kernel.org, a.p.zijlstra@...llo.nl,
	efault@....de, tglx@...utronix.de, mingo@...e.hu
Cc:	linux-tip-commits@...r.kernel.org
Subject: Re: [tip:perfcounters/urgent] perf stat: Add -n/--null option to
 run without counters

On Sat, 2009-06-27 at 04:31 +0000, tip-bot for Ingo Molnar wrote:
> Commit-ID:  0cfb7a13b8e4e0afd4b856156ab16a182de7505b
> Gitweb:     http://git.kernel.org/tip/0cfb7a13b8e4e0afd4b856156ab16a182de7505b
> Author:     Ingo Molnar <mingo@...e.hu>
> AuthorDate: Sat, 27 Jun 2009 06:10:30 +0200
> Committer:  Ingo Molnar <mingo@...e.hu>
> CommitDate: Sat, 27 Jun 2009 06:11:24 +0200
> 
> perf stat: Add -n/--null option to run without counters
> 
> Allow a no-counters run. This can be useful to measure just
> elapsed wall-clock time - or to assess the raw overhead of perf
> stat itself, without running any counters.
> 

Why it better then $ time <command>

Any way this patch is broken. 

Why you are allocating :
memcpy(attrs, default_attrs, sizeof(attrs)); when null_run is set.

To get better picture and solution, Please check [PATCH] perf stat: fix
default attrs and nr_counters

which I send in "Re: [PATCH -tip] perf_counter tools: add support to set
of multiple events in one short" send on Fri, 26 Jun 2009 18:08:40 +0530

Thanks,

--
JSR
> Cc: Peter Zijlstra <a.p.zijlstra@...llo.nl>
> Cc: Mike Galbraith <efault@....de>
> Cc: Paul Mackerras <paulus@...ba.org>
> Cc: Arnaldo Carvalho de Melo <acme@...hat.com>
> LKML-Reference: <new-submission>
> Signed-off-by: Ingo Molnar <mingo@...e.hu>
> 
> 
> ---
>  tools/perf/builtin-stat.c |    5 ++++-
>  1 files changed, 4 insertions(+), 1 deletions(-)
> 
> diff --git a/tools/perf/builtin-stat.c b/tools/perf/builtin-stat.c
> index 8420ec5..cdcd058 100644
> --- a/tools/perf/builtin-stat.c
> +++ b/tools/perf/builtin-stat.c
> @@ -70,6 +70,7 @@ static int			run_count			=  1;
>  static int			inherit				=  1;
>  static int			scale				=  1;
>  static int			target_pid			= -1;
> +static int			null_run			=  0;
>  
>  static int			fd[MAX_NR_CPUS][MAX_COUNTERS];
>  
> @@ -461,6 +462,8 @@ static const struct option options[] = {
>  		    "be more verbose (show counter open errors, etc)"),
>  	OPT_INTEGER('r', "repeat", &run_count,
>  		    "repeat command and print average + stddev (max: 100)"),
> +	OPT_BOOLEAN('n', "null", &null_run,
> +		    "null run - dont start any counters"),
>  	OPT_END()
>  };
>  
> @@ -476,7 +479,7 @@ int cmd_stat(int argc, const char **argv, const char *prefix)
>  	if (run_count <= 0 || run_count > MAX_RUN)
>  		usage_with_options(stat_usage, options);
>  
> -	if (!nr_counters)
> +	if (!null_run && !nr_counters)
>  		nr_counters = 8;
>  
>  	nr_cpus = sysconf(_SC_NPROCESSORS_ONLN);
> --
> 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/

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