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


Groups > linux.kernel > #1262850

Re: [PATCH 3/9] perf, tools, stat: Abstract stat metrics printing

From Andi Kleen <andi@firstfloor.org>
Newsgroups linux.kernel
Subject Re: [PATCH 3/9] perf, tools, stat: Abstract stat metrics printing
Date 2015-11-05 03:50 +0100
Message-ID <qriMF-ys-15@gated-at.bofh.it> (permalink)
References <qqz3c-4xe-3@gated-at.bofh.it> <qqz3c-4xe-5@gated-at.bofh.it> <qr1Vw-6xC-9@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Wed, Nov 04, 2015 at 09:42:48AM +0100, Jiri Olsa wrote:
> On Mon, Nov 02, 2015 at 05:50:22PM -0800, Andi Kleen wrote:
> 
> SNIP
> 
> >  		evsel->attr.type == PERF_TYPE_HW_CACHE &&
> >  		evsel->attr.config ==  ( PERF_COUNT_HW_CACHE_L1D |
> >  					((PERF_COUNT_HW_CACHE_OP_READ) << 8) |
> > -					((PERF_COUNT_HW_CACHE_RESULT_MISS) << 16)) &&
> > -			runtime_l1_dcache_stats[ctx][cpu].n != 0) {
> > -		print_l1_dcache_misses(out, cpu, evsel, avg);
> > +					 ((PERF_COUNT_HW_CACHE_RESULT_MISS) << 16))) {
> > +		if (runtime_l1_dcache_stats[ctx][cpu].n != 0)
> > +			print_l1_dcache_misses(cpu, evsel, avg, out);
> > +		else
> > +			print_metric(ctxp, NULL, NULL, "of all L1-dcache hits", 0);
> 
> hum, what's the reason for all those else cases
> ending up printing nothing?
> 
> we have one metric per line anyway right?

There can be stuff after the metric, need to print spaces then to get
the correct indentation.

Also it's needed for the metrics only patch (posted separately) so
that it can catch all column headers, even if some are missing initially.

-Andi

-- 
ak@linux.intel.com -- Speaking for myself only.
--
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/

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

perf, tools: Refactor and support interval and CSV metrics v6 Andi Kleen <andi@firstfloor.org> - 2015-11-03 03:00 +0100
  [PATCH 3/9] perf, tools, stat: Abstract stat metrics printing Andi Kleen <andi@firstfloor.org> - 2015-11-03 03:00 +0100
    Re: [PATCH 3/9] perf, tools, stat: Abstract stat metrics printing Jiri Olsa <jolsa@redhat.com> - 2015-11-04 09:40 +0100
    Re: [PATCH 3/9] perf, tools, stat: Abstract stat metrics printing Jiri Olsa <jolsa@redhat.com> - 2015-11-04 09:50 +0100
      Re: [PATCH 3/9] perf, tools, stat: Abstract stat metrics printing Andi Kleen <andi@firstfloor.org> - 2015-11-05 03:50 +0100
        Re: [PATCH 3/9] perf, tools, stat: Abstract stat metrics printing Jiri Olsa <jolsa@redhat.com> - 2015-11-05 08:00 +0100
          Re: [PATCH 3/9] perf, tools, stat: Abstract stat metrics printing Andi Kleen <andi@firstfloor.org> - 2015-11-05 16:30 +0100
  [PATCH 4/9] perf, tools, stat: Add support for metrics in interval mode Andi Kleen <andi@firstfloor.org> - 2015-11-03 03:00 +0100
  [PATCH 8/9] perf, tools: Support metrics in --per-core/socket mode Andi Kleen <andi@firstfloor.org> - 2015-11-03 03:00 +0100
  [PATCH 9/9] perf, tools, stat: Document CSV format in manpage Andi Kleen <andi@firstfloor.org> - 2015-11-03 03:00 +0100
  [PATCH 7/9] perf, tools, stat: Move non counting counter printing to printout Andi Kleen <andi@firstfloor.org> - 2015-11-03 03:00 +0100
  [PATCH 1/9] perf, tools, stat: Move sw clock metrics printout to stat-shadow Andi Kleen <andi@firstfloor.org> - 2015-11-03 03:00 +0100
    Re: [PATCH 1/9] perf, tools, stat: Move sw clock metrics printout to  stat-shadow Jiri Olsa <jolsa@redhat.com> - 2015-11-04 09:20 +0100
    [tip:perf/urgent] perf stat:   Move sw clock metrics printout to stat-shadow tip-bot for Andi Kleen <tipbot@zytor.com> - 2015-11-08 08:30 +0100
  [PATCH 2/9] tools, perf, stat: Use common printout faction to avoid duplicated code Andi Kleen <andi@firstfloor.org> - 2015-11-03 03:00 +0100
    Re: [PATCH 2/9] tools, perf, stat: Use common printout faction to  avoid duplicated code Jiri Olsa <jolsa@redhat.com> - 2015-11-04 09:20 +0100
    [tip:perf/urgent] perf stat:   Use common printout function to avoid duplicated code tip-bot for Andi Kleen <tipbot@zytor.com> - 2015-11-08 08:30 +0100
  [PATCH 6/9] perf, tools, stat: Implement CSV metrics output Andi Kleen <andi@firstfloor.org> - 2015-11-03 03:00 +0100
  Re: perf, tools: Refactor and support interval and CSV metrics v6 Jiri Olsa <jolsa@redhat.com> - 2015-11-03 08:50 +0100
    Re: perf, tools: Refactor and support interval and CSV metrics v6 Andi Kleen <andi@firstfloor.org> - 2015-11-05 03:50 +0100

csiph-web