[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20110427162711.GA29460@elte.hu>
Date: Wed, 27 Apr 2011 18:27:11 +0200
From: Ingo Molnar <mingo@...e.hu>
To: Arun Sharma <arun@...rma-home.net>
Cc: Arun Sharma <asharma@...com>,
Stephane Eranian <eranian@...gle.com>,
Arnaldo Carvalho de Melo <acme@...radead.org>,
linux-kernel@...r.kernel.org, Andi Kleen <ak@...ux.intel.com>,
Peter Zijlstra <peterz@...radead.org>,
Lin Ming <ming.m.lin@...el.com>,
Arnaldo Carvalho de Melo <acme@...hat.com>,
Thomas Gleixner <tglx@...utronix.de>,
Peter Zijlstra <a.p.zijlstra@...llo.nl>, eranian@...il.com,
Linus Torvalds <torvalds@...ux-foundation.org>,
Andrew Morton <akpm@...ux-foundation.org>
Subject: Re: [PATCH] perf events: Add stalled cycles generic event -
PERF_COUNT_HW_STALLED_CYCLES
* Ingo Molnar <mingo@...e.hu> wrote:
> > [...] why not pick cycles where no uops are retiring?
> >
> > cycles_no_uops_retired = cycles - c["UOPS_RETIRED:ANY:c=1:t=1"]
> >
> > In the presence of C-states and some halted cycles, I found that I couldn't
> > measure it via UOPS_RETIRED:ANY:c=1:i=1 because it counts halted cycles too
> > and could be greater than (unhalted) cycles.
>
> Agreed, good point.
>
> You are right that it is more robust to pick 'the CPU was busy on our behalf'
> metric instead of a 'CPU is idle' metric, because that way 'HLT' as a special
> type of idling around does not have to be identified.
Sidenote, there's one advantage of the idle event: it's more meaningful to
profile idle cycles - and it's easy to ignore the HLT loop in the profile
output (we already do).
That way we get a 'hidden overhead' profile: a profile of frequently executed
code which executes in the CPU in a suboptimal way.
So we should probably offer both events.
Thanks,
Ingo
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists