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

Path csiph.com!goblin2!goblin.stu.neva.ru!gothmog.csi.it!bofh.it!news.nic.it!robomod
From Andi Kleen <andi@firstfloor.org>
Newsgroups linux.kernel
Subject Re: [PATCH 3/9] perf, tools, stat: Abstract stat metrics printing
Date Thu, 05 Nov 2015 03:50:01 +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>
X-Original-To Jiri Olsa <jolsa@redhat.com>
MIME-Version 1.0
Content-Type text/plain; charset=us-ascii
Content-Disposition inline
User-Agent Mutt/1.5.21 (2010-09-15)
Sender robomod@news.nic.it
List-ID <linux-kernel.vger.kernel.org>
X-Mailing-List linux-kernel@vger.kernel.org
Approved robomod@news.nic.it
Lines 37
Organization linux.* mail to news gateway
X-Original-Cc Andi Kleen <andi@firstfloor.org>, jolsa@kernel.org, acme@kernel.org, mingo@kernel.org, linux-kernel@vger.kernel.org, Andi Kleen <ak@linux.intel.com>
X-Original-Date Thu, 5 Nov 2015 03:43:07 +0100
X-Original-Message-ID <20151105024307.GA3533@two.firstfloor.org>
X-Original-References <1446515428-7450-1-git-send-email-andi@firstfloor.org> <1446515428-7450-4-git-send-email-andi@firstfloor.org> <20151104084248.GF29671@krava.brq.redhat.com>
X-Original-Sender linux-kernel-owner@vger.kernel.org
Xref csiph.com linux.kernel:1262850

Show key headers only | 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 | Next — Previous 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