Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1294138 > unrolled thread

Re: [PATCH 17/25] perf stat report: Move csv_sep initialization before report command

Started byArnaldo Carvalho de Melo <acme@kernel.org>
First post2015-12-17 20:00 +0100
Last post2015-12-17 20:50 +0100
Articles 2 — 2 participants

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: [PATCH 17/25] perf stat report: Move csv_sep initialization  before report command Arnaldo Carvalho de Melo <acme@kernel.org> - 2015-12-17 20:00 +0100
    Re: [PATCH 17/25] perf stat report: Move csv_sep initialization  before report command Jiri Olsa <jolsa@redhat.com> - 2015-12-17 20:50 +0100

#1294138 — Re: [PATCH 17/25] perf stat report: Move csv_sep initialization before report command

FromArnaldo Carvalho de Melo <acme@kernel.org>
Date2015-12-17 20:00 +0100
SubjectRe: [PATCH 17/25] perf stat report: Move csv_sep initialization before report command
Message-ID<qGLWq-3f0-7@gated-at.bofh.it>
Em Thu, Nov 05, 2015 at 03:41:01PM +0100, Jiri Olsa escreveu:
> So we have csv_sep properly initialized before
> report command leg.

I moved this to before "perf stat report: Process stat and stat round
events" so that what you wrote above makes sense, i.e. after this patch
nothing is produced by 'perf stat report' and right after the stat and
stat round one is applied I get:

  [acme@ssdandy linux]$ perf stat report

   Performance counter stats for '/home/acme/bin/perf stat record usleep 1':

          0.411636      task-clock (msec)         #    0.571 CPUs utilized          
                 2      context-switches          #    0.005 M/sec                  
                 0      cpu-migrations            #    0.000 K/sec                  
               149      page-faults               #    0.362 M/sec                  
         1,291,807      cycles                    #    3.138 GHz                    
           959,632      stalled-cycles-frontend   #   74.29% frontend cycles idle   
           703,170      stalled-cycles-backend    #   54.43% backend  cycles idle   
           757,538      instructions              #    0.59  insns per cycle        
                                                  #    1.27  stalled cycles per insn
           133,293      branches                  #  323.813 M/sec                  
     <not counted>      branch-misses              (0.00%)

       0.000720394 seconds time elapsed

  [acme@ssdandy linux]$ 

And not this ugly thing:

  [acme@ssdandy linux]$ perf stat report

   Performance counter stats for '/home/acme/bin/perf stat record usleep 1':

          0.411636(null)    (null)task-clock (msec)         #    0.571 CPUs utilized          
                 2(null)    (null)context-switches          #    0.005 M/sec                  
                 0(null)    (null)cpu-migrations            #    0.000 K/sec                  
               149(null)    (null)page-faults               #    0.362 M/sec                  
         1,291,807(null)    (null)cycles                    #    3.138 GHz                    
           959,632(null)    (null)stalled-cycles-frontend   #   74.29% frontend cycles idle   
           703,170(null)    (null)stalled-cycles-backend    #   54.43% backend  cycles idle   
           757,538(null)    (null)instructions              #    0.59  insns per cycle        
                                                  #    1.27  stalled cycles per insn
           133,293(null)    (null)branches                  #  323.813 M/sec                  
     <not counted>(null)    (null)branch-misses              (0.00%)

       0.000720394 seconds time elapsed

  [acme@ssdandy linux]$

- Arnaldo
 
> Tested-by: Kan Liang <kan.liang@intel.com>
> Link: http://lkml.kernel.org/n/tip-i5mmbomj7lt4eg04awzocdd4@git.kernel.org
> Signed-off-by: Jiri Olsa <jolsa@kernel.org>
> ---
>  tools/perf/builtin-stat.c | 14 +++++++-------
>  1 file changed, 7 insertions(+), 7 deletions(-)
> 
> diff --git a/tools/perf/builtin-stat.c b/tools/perf/builtin-stat.c
> index 6636d29b3b18..174ffbd02a13 100644
> --- a/tools/perf/builtin-stat.c
> +++ b/tools/perf/builtin-stat.c
> @@ -1776,6 +1776,13 @@ int cmd_stat(int argc, const char **argv, const char *prefix __maybe_unused)
>  					(const char **) stat_usage,
>  					PARSE_OPT_STOP_AT_NON_OPTION);
>  
> +	if (csv_sep) {
> +		csv_output = true;
> +		if (!strcmp(csv_sep, "\\t"))
> +			csv_sep = "\t";
> +	} else
> +		csv_sep = DEFAULT_SEPARATOR;
> +
>  	if (argc && !strncmp(argv[0], "rec", 3)) {
>  		argc = __cmd_record(argc, argv);
>  		if (argc < 0)
> @@ -1826,13 +1833,6 @@ int cmd_stat(int argc, const char **argv, const char *prefix __maybe_unused)
>  
>  	stat_config.output = output;
>  
> -	if (csv_sep) {
> -		csv_output = true;
> -		if (!strcmp(csv_sep, "\\t"))
> -			csv_sep = "\t";
> -	} else
> -		csv_sep = DEFAULT_SEPARATOR;
> -
>  	/*
>  	 * let the spreadsheet do the pretty-printing
>  	 */
> -- 
> 2.4.3
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [next] | [standalone]


#1294181

FromJiri Olsa <jolsa@redhat.com>
Date2015-12-17 20:50 +0100
Message-ID<qGMIO-3MF-23@gated-at.bofh.it>
In reply to#1294138
On Thu, Dec 17, 2015 at 03:57:07PM -0300, Arnaldo Carvalho de Melo wrote:
> Em Thu, Nov 05, 2015 at 03:41:01PM +0100, Jiri Olsa escreveu:
> > So we have csv_sep properly initialized before
> > report command leg.
> 
> I moved this to before "perf stat report: Process stat and stat round
> events" so that what you wrote above makes sense, i.e. after this patch
> nothing is produced by 'perf stat report' and right after the stat and
> stat round one is applied I get:
> 
>   [acme@ssdandy linux]$ perf stat report
> 
>    Performance counter stats for '/home/acme/bin/perf stat record usleep 1':
> 
>           0.411636      task-clock (msec)         #    0.571 CPUs utilized          
>                  2      context-switches          #    0.005 M/sec                  
>                  0      cpu-migrations            #    0.000 K/sec                  
>                149      page-faults               #    0.362 M/sec                  
>          1,291,807      cycles                    #    3.138 GHz                    
>            959,632      stalled-cycles-frontend   #   74.29% frontend cycles idle   
>            703,170      stalled-cycles-backend    #   54.43% backend  cycles idle   
>            757,538      instructions              #    0.59  insns per cycle        
>                                                   #    1.27  stalled cycles per insn
>            133,293      branches                  #  323.813 M/sec                  
>      <not counted>      branch-misses              (0.00%)
> 
>        0.000720394 seconds time elapsed
> 
>   [acme@ssdandy linux]$ 
> 
> And not this ugly thing:
> 
>   [acme@ssdandy linux]$ perf stat report
> 
>    Performance counter stats for '/home/acme/bin/perf stat record usleep 1':
> 
>           0.411636(null)    (null)task-clock (msec)         #    0.571 CPUs utilized          
>                  2(null)    (null)context-switches          #    0.005 M/sec                  
>                  0(null)    (null)cpu-migrations            #    0.000 K/sec                  
>                149(null)    (null)page-faults               #    0.362 M/sec                  
>          1,291,807(null)    (null)cycles                    #    3.138 GHz                    
>            959,632(null)    (null)stalled-cycles-frontend   #   74.29% frontend cycles idle   
>            703,170(null)    (null)stalled-cycles-backend    #   54.43% backend  cycles idle   
>            757,538(null)    (null)instructions              #    0.59  insns per cycle        
>                                                   #    1.27  stalled cycles per insn
>            133,293(null)    (null)branches                  #  323.813 M/sec                  
>      <not counted>(null)    (null)branch-misses              (0.00%)
> 
>        0.000720394 seconds time elapsed
> 
>   [acme@ssdandy linux]$

sounds good, thanks

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

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web