Re: [PATCH 3/9] perf, tools, stat: Move noise/running printing into printout
On Wed, Jan 27, 2016 at 12:57:43AM +0100, Andi Kleen wrote: > On Sat, Jan 23, 2016 at 05:19:58PM +0100, Jiri Olsa wrote: > > On Sat, Jan 23, 2016 at 04:43:05AM +0100, Andi Kleen wrote: > > > > > - if (run == 0 || ena == 0) { > > > > > - fprintf(output, "CPU%*d%s%*s%s", > > > > > - csv_output ? 0 : -4, > > > > > - perf_evsel__cpus(counter)->map[cpu], > > > > > csv_sep, > > > > > - csv_output ? 0 : 18, > > > > > - counter->supported ? CNTR_NOT_COUNTED : > > > > > CNTR_NOT_SUPPORTED, > > > > > - csv_sep); > > > > > > > > this hunk is not preserved in the new code.. I guess the output is > > > > different for -A if counter wasn't meassure? > > > > > > The code for this is common in printout() now. > > > > but what will be printed for -A not counted counters? > > not the "CPU%*d%s%*s%s" ... > > > CPU0 stalled-cycles-backend > > CPU1 stalled-cycles-backend > > CPU2 stalled-cycles-backend > > CPU3 stalled-cycles-backend > > CPU4 stalled-cycles-backend > > CPU5 stalled-cycles-backend > > CPU6 stalled-cycles-backend > > CPU7 stalled-cycles-backend > > CPU8 stalled-cycles-backend > > CPU9 stalled-cycles-backend > > CPU10stalled-cycles-backend > > CPU11stalled-cycles-backend > ah the aggr_printout provides that now.. which wasn't the case for the removed code thanks, jirka
Re: [PATCH 3/9] perf, tools, stat: Move noise/running printing into printout
On Sat, Jan 23, 2016 at 05:19:58PM +0100, Jiri Olsa wrote: > On Sat, Jan 23, 2016 at 04:43:05AM +0100, Andi Kleen wrote: > > > > - if (run == 0 || ena == 0) { > > > > - fprintf(output, "CPU%*d%s%*s%s", > > > > - csv_output ? 0 : -4, > > > > - perf_evsel__cpus(counter)->map[cpu], > > > > csv_sep, > > > > - csv_output ? 0 : 18, > > > > - counter->supported ? CNTR_NOT_COUNTED : > > > > CNTR_NOT_SUPPORTED, > > > > - csv_sep); > > > > > > this hunk is not preserved in the new code.. I guess the output is > > > different for -A if counter wasn't meassure? > > > > The code for this is common in printout() now. > > but what will be printed for -A not counted counters? > not the "CPU%*d%s%*s%s" ... CPU0 stalled-cycles-backend CPU1 stalled-cycles-backend CPU2 stalled-cycles-backend CPU3 stalled-cycles-backend CPU4 stalled-cycles-backend CPU5 stalled-cycles-backend CPU6 stalled-cycles-backend CPU7 stalled-cycles-backend CPU8 stalled-cycles-backend CPU9 stalled-cycles-backend CPU10stalled-cycles-backend CPU11stalled-cycles-backend -Andi
Re: [PATCH 3/9] perf, tools, stat: Move noise/running printing into printout
On Fri, Jan 22, 2016 at 10:41:53AM +0100, Jiri Olsa wrote: > On Tue, Jan 19, 2016 at 06:26:46PM -0800, Andi Kleen wrote: > > SNIP > > > uval = avg * counter->scale; > > - printout(-1, 0, counter, uval, prefix); > > - > > - print_noise(counter, avg); > > - > > - print_running(avg_running, avg_enabled); > > + printout(-1, 0, counter, uval, prefix, avg_running, avg_enabled, avg); > > fprintf(output, "\n"); > > } > > > > @@ -1037,36 +1006,8 @@ static void print_counter(struct perf_evsel > > *counter, char *prefix) > > if (prefix) > > fprintf(output, "%s", prefix); > > > > - if (run == 0 || ena == 0) { > > - fprintf(output, "CPU%*d%s%*s%s", > > - csv_output ? 0 : -4, > > - perf_evsel__cpus(counter)->map[cpu], csv_sep, > > - csv_output ? 0 : 18, > > - counter->supported ? CNTR_NOT_COUNTED : > > CNTR_NOT_SUPPORTED, > > - csv_sep); > > this hunk is not preserved in the new code.. I guess the output is > different for -A if counter wasn't meassure? It's the same, at least in the final state. -Andi
Re: [PATCH 3/9] perf, tools, stat: Move noise/running printing into printout
On Sat, Jan 23, 2016 at 04:43:05AM +0100, Andi Kleen wrote: > > > - if (run == 0 || ena == 0) { > > > - fprintf(output, "CPU%*d%s%*s%s", > > > - csv_output ? 0 : -4, > > > - perf_evsel__cpus(counter)->map[cpu], csv_sep, > > > - csv_output ? 0 : 18, > > > - counter->supported ? CNTR_NOT_COUNTED : > > > CNTR_NOT_SUPPORTED, > > > - csv_sep); > > > > this hunk is not preserved in the new code.. I guess the output is > > different for -A if counter wasn't meassure? > > The code for this is common in printout() now. but what will be printed for -A not counted counters? not the "CPU%*d%s%*s%s" ... jirka
Re: [PATCH 3/9] perf, tools, stat: Move noise/running printing into printout
> > - if (run == 0 || ena == 0) { > > - fprintf(output, "CPU%*d%s%*s%s", > > - csv_output ? 0 : -4, > > - perf_evsel__cpus(counter)->map[cpu], csv_sep, > > - csv_output ? 0 : 18, > > - counter->supported ? CNTR_NOT_COUNTED : > > CNTR_NOT_SUPPORTED, > > - csv_sep); > > this hunk is not preserved in the new code.. I guess the output is > different for -A if counter wasn't meassure? The code for this is common in printout() now. -Andi
Re: [PATCH 3/9] perf, tools, stat: Move noise/running printing into printout
On Tue, Jan 19, 2016 at 06:26:46PM -0800, Andi Kleen wrote: SNIP > uval = avg * counter->scale; > - printout(-1, 0, counter, uval, prefix); > - > - print_noise(counter, avg); > - > - print_running(avg_running, avg_enabled); > + printout(-1, 0, counter, uval, prefix, avg_running, avg_enabled, avg); > fprintf(output, "\n"); > } > > @@ -1037,36 +1006,8 @@ static void print_counter(struct perf_evsel *counter, > char *prefix) > if (prefix) > fprintf(output, "%s", prefix); > > - if (run == 0 || ena == 0) { > - fprintf(output, "CPU%*d%s%*s%s", > - csv_output ? 0 : -4, > - perf_evsel__cpus(counter)->map[cpu], csv_sep, > - csv_output ? 0 : 18, > - counter->supported ? CNTR_NOT_COUNTED : > CNTR_NOT_SUPPORTED, > - csv_sep); this hunk is not preserved in the new code.. I guess the output is different for -A if counter wasn't meassure? thanks, jirka