Re: Add top down metrics to perf stat

2016-05-20 Thread Andi Kleen
> [jolsa@ibm-x3650m4-01 perf]$ sudo ./perf stat --topdown -I 1000 -a > nmi_watchdog enabled with topdown. May give wrong results. > Disable with echo 0 > /proc/sys/kernel/nmi_watchdog > 1.002097350 retiring bad speculation > frontend bound backend boun

Re: Add top down metrics to perf stat

2016-05-20 Thread Jiri Olsa
On Fri, May 13, 2016 at 06:44:49PM -0700, Andi Kleen wrote: > Note to reviewers: includes both tools and kernel patches. > The kernel patches are at the beginning. > > [v2: Address review feedback. > Metrics are now always printed, but colored when crossing threshold. > --topdown implies --metric-

Re: Add top down metrics to perf stat

2016-05-20 Thread Jiri Olsa
On Thu, May 19, 2016 at 04:51:30PM -0700, Andi Kleen wrote: > On Mon, May 16, 2016 at 02:58:38PM +0200, Jiri Olsa wrote: > > On Fri, May 13, 2016 at 06:44:49PM -0700, Andi Kleen wrote: > > > > SNIP > > > > > > > > The formulas to compute the metrics are generic, they > > > only change based

Add top down metrics to perf stat

2016-05-19 Thread Andi Kleen
Note to reviewers: includes both tools and kernel patches. The kernel patches are at the beginning. [v2: Address review feedback. Metrics are now always printed, but colored when crossing threshold. --topdown implies --metric-only. Various smaller fixes, see individual patches] [v3: Add --single-t

Re: Add top down metrics to perf stat

2016-05-19 Thread Andi Kleen
On Mon, May 16, 2016 at 02:58:38PM +0200, Jiri Olsa wrote: > On Fri, May 13, 2016 at 06:44:49PM -0700, Andi Kleen wrote: > > SNIP > > > > > The formulas to compute the metrics are generic, they > > only change based on the availability on the abstracted > > input values. > > > > The ker

Re: Add top down metrics to perf stat

2016-05-16 Thread Jiri Olsa
On Fri, May 13, 2016 at 06:44:49PM -0700, Andi Kleen wrote: SNIP > > The formulas to compute the metrics are generic, they > only change based on the availability on the abstracted > input values. > > The kernel declares the events supported by the current > CPU and perf stat then compu

Add top down metrics to perf stat

2016-05-13 Thread Andi Kleen
Note to reviewers: includes both tools and kernel patches. The kernel patches are at the beginning. [v2: Address review feedback. Metrics are now always printed, but colored when crossing threshold. --topdown implies --metric-only. Various smaller fixes, see individual patches] [v3: Add --single-t

Re: Add top down metrics to perf stat

2016-05-12 Thread Jiri Olsa
On Thu, May 05, 2016 at 04:03:57PM -0700, Andi Kleen wrote: SNIP > The kernel declares the events supported by the current > CPU and perf stat then computes the formulas based on the > available metrics. > > > Example output: > > $ perf stat --topdown -I 1000 cmd > 1.000735655

Add top down metrics to perf stat

2016-05-05 Thread Andi Kleen
Note to reviewers: includes both tools and kernel patches. The kernel patches are at the beginning. [v2: Address review feedback. Metrics are now always printed, but colored when crossing threshold. --topdown implies --metric-only. Various smaller fixes, see individual patches] [v3: Add --single-t

Add top down metrics to perf stat

2016-04-27 Thread Andi Kleen
Note to reviewers: includes both tools and kernel patches. The kernel patches are at the beginning. [v2: Address review feedback. Metrics are now always printed, but colored when crossing threshold. --topdown implies --metric-only. Various smaller fixes, see individual patches] [v3: Add --single-t

Add top down metrics to perf stat

2016-04-04 Thread Andi Kleen
Note to reviewers: includes both tools and kernel patches. The kernel patches are at the beginning. [v2: Address review feedback. Metrics are now always printed, but colored when crossing threshold. --topdown implies --metric-only. Various smaller fixes, see individual patches] [v3: Add --single-t

Re: Add top down metrics to perf stat

2016-03-27 Thread Andi Kleen
> can't see this one (-16): > > [jolsa@krava perf]$ git remote update ak > Fetching ak > [jolsa@krava perf]$ git branch -r | grep top-down > ak/perf/top-down-10 > ak/perf/top-down-11 > ak/perf/top-down-13 > ak/perf/top-down-2 Please try again, I pushed it again. -Andi

Re: Add top down metrics to perf stat

2016-03-27 Thread Jiri Olsa
On Tue, Mar 22, 2016 at 04:08:46PM -0700, Andi Kleen wrote: SNIP > In this case perf stat automatically enables --per-core mode and also requires > global mode (-a) and avoiding other filters (no cgroup mode) > > When Hyper Threading is off this can be overriden with the --single-thread > option

Add top down metrics to perf stat

2016-03-22 Thread Andi Kleen
[v2: Address review feedback. Metrics are now always printed, but colored when crossing threshold. --topdown implies --metric-only. Various smaller fixes, see individual patches] [v3: Add --single-thread option and support it with HT off. Clean up old HT workaround. Improve documentation. Various s

Re: Add top down metrics to perf stat v2

2015-12-18 Thread Andi Kleen
On Fri, Dec 18, 2015 at 01:31:18AM -0800, Stephane Eranian wrote: > >> Why force --per-core when HT is on. I know you you need to aggregate > >> per core, but > >> you could still display globally. And then if user requests > >> --per-core, then display per core. > > > > Global TopDown doesn't make

Re: Add top down metrics to perf stat v2

2015-12-18 Thread Stephane Eranian
Andi, On Thu, Dec 17, 2015 at 5:55 PM, Andi Kleen wrote: > Thanks for testing. > > > On Thu, Dec 17, 2015 at 03:31:30PM -0800, Stephane Eranian wrote: >> I would not add a --topdown option but instead a --metric option with >> arguments >> such that other metrics could be added later: >> >>$

Re: Add top down metrics to perf stat v2

2015-12-17 Thread Andi Kleen
Thanks for testing. On Thu, Dec 17, 2015 at 03:31:30PM -0800, Stephane Eranian wrote: > I would not add a --topdown option but instead a --metric option with > arguments > such that other metrics could be added later: > >$ perf stat --metrics topdown -I 1000 -a sleep 100 > > If you do this

Re: Add top down metrics to perf stat v2

2015-12-17 Thread Stephane Eranian
On Thu, Dec 17, 2015 at 6:01 AM, Andi Kleen wrote: > On Thu, Dec 17, 2015 at 02:27:58AM -0800, Stephane Eranian wrote: >> > S0-C1 2 4175583320.00 topdown-slots-retired >> > (100.00%) >> > S0-C1 2 1743329246 topdown

Re: Add top down metrics to perf stat v2

2015-12-17 Thread Andi Kleen
On Thu, Dec 17, 2015 at 02:27:58AM -0800, Stephane Eranian wrote: > > S0-C1 2 4175583320.00 topdown-slots-retired > > (100.00%) > > S0-C1 2 1743329246 topdown-recovery-bubbles # > > 22.22% bad speculation

Re: Add top down metrics to perf stat v2

2015-12-17 Thread Stephane Eranian
Andi, On Tue, Dec 15, 2015 at 4:54 PM, Andi Kleen wrote: > Note to reviewers: includes both tools and kernel patches. > The kernel patches are at the end. > > This patchkit adds support for TopDown measurements to perf stat > It applies on top of my earlier metrics patchkit, posted > separately,

Add top down metrics to perf stat v2

2015-12-15 Thread Andi Kleen
Note to reviewers: includes both tools and kernel patches. The kernel patches are at the end. This patchkit adds support for TopDown measurements to perf stat It applies on top of my earlier metrics patchkit, posted separately, and the --metric-only patchkit (also posted separately) TopDown is in

Add top down metrics to perf stat

2015-08-07 Thread Andi Kleen
This patchkit adds support for TopDown to perf stat It applies on top of my earlier metrics patchkit, posted separately. TopDown is intended to replace the frontend cycles idle/ backend cycles idle metrics in standard perf stat output. These metrics are not reliable in many workloads, due to out