All of lore.kernel.org
 help / color / mirror / Atom feed
From: Arnaldo Carvalho de Melo <acme@ghostprotocols.net>
To: Andi Kleen <andi@firstfloor.org>
Cc: mingo@kernel.org, peterz@infradead.org,
	linux-kernel@vger.kernel.org, Andi Kleen <ak@linux.intel.com>
Subject: Re: [PATCH 4/4] perf, tools: Add perf stat --transaction v3
Date: Thu, 15 Aug 2013 12:01:50 -0300	[thread overview]
Message-ID: <20130815150150.GB1940@ghostprotocols.net> (raw)
In-Reply-To: <20130815142925.GG19750@two.firstfloor.org>

Em Thu, Aug 15, 2013 at 04:29:25PM +0200, Andi Kleen escreveu:
> > >   * Update various tracking values we maintain to print
> > >   * more semantic information such as miss/hit ratios,
> > > @@ -283,8 +340,12 @@ static void update_shadow_stats(struct perf_evsel *counter, u64 *count)
> > >  		update_stats(&runtime_nsecs_stats[0], count[0]);
> > >  	else if (perf_evsel__match(counter, HARDWARE, HW_CPU_CYCLES))
> > >  		update_stats(&runtime_cycles_stats[0], count[0]);
> > > -	else if (perf_evsel__match(counter, HARDWARE, HW_STALLED_CYCLES_FRONTEND))
> > > -		update_stats(&runtime_stalled_cycles_front_stats[0], count[0]);
> > 
> > Why remove the test for HW_STALLED_CYCLES_FRONTEND?
> 
> Hmm that was probably a merge error.
> 
> I'll fix & resend.

Ok
 
> > Got it why it doesn't need to account for the '{' in the array ;-)
> > 
> > While this works and isn't in any fast path, I find it ugly with all
> > this looping in nth_evsel.
> > 
> > Why not:
> > 
> > 	} else if (evsel->idx == T_CYCLES_IN_TX)) &&
> > 
> > ? I guess this works as you expect, no?
> 
> I had some problems with people using -T, but also setting custom
> events, that is why I added the extra comparison

But it'd fail the same, as if you go from the first entry in the
evlist->entries linked list, looping while incrementing a number, that
number should match the nth entry ->idx member.

I'll try to experiment with this when you resend with the parts you
agreed should be changed.
 
> The event lists are small enough that it's not really noticeable.
> I suppose could set up an array once.

Its not about performance hits, they are negligible, but about using
something that should provide equivalent results.

- Arnaldo

  reply	other threads:[~2013-08-15 15:01 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-08-14 18:34 perf, x86: Add parts of the remaining haswell PMU functionality v2 Andi Kleen
2013-08-14 18:34 ` [PATCH 1/4] perf, x86: Avoid checkpointed counters causing excessive TSX aborts v4 Andi Kleen
2013-08-14 18:34 ` [PATCH 2/4] perf, x86: Report TSX transaction abort cost as weight v2 Andi Kleen
2013-08-14 18:34 ` [PATCH 3/4] perf, x86: Add Haswell TSX event aliases v6 Andi Kleen
2013-08-14 18:34 ` [PATCH 4/4] perf, tools: Add perf stat --transaction v3 Andi Kleen
2013-08-15 10:18   ` Peter Zijlstra
2013-08-15 13:26   ` Arnaldo Carvalho de Melo
2013-08-15 14:06     ` Andi Kleen
2013-08-15 14:21       ` Arnaldo Carvalho de Melo
2013-08-15 14:29     ` Andi Kleen
2013-08-15 15:01       ` Arnaldo Carvalho de Melo [this message]
2013-08-15 16:42         ` Andi Kleen
2013-08-21 13:15           ` Arnaldo Carvalho de Melo
2013-08-21 14:48             ` Andi Kleen
  -- strict thread matches above, loose matches on Subject: below --
2013-08-09  1:15 perf, x86: Add parts of the remaining haswell PMU functionality Andi Kleen
2013-08-09  1:15 ` [PATCH 4/4] perf, tools: Add perf stat --transaction v3 Andi Kleen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20130815150150.GB1940@ghostprotocols.net \
    --to=acme@ghostprotocols.net \
    --cc=ak@linux.intel.com \
    --cc=andi@firstfloor.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@kernel.org \
    --cc=peterz@infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.