Re: [PATCH 2/4] perf, tools: Fix metrics calculation with event qualifiers
From: Jiri Olsa
Date: Mon Mar 09 2015 - 03:56:08 EST
On Sun, Mar 08, 2015 at 04:55:22PM -0700, Andi Kleen wrote:
> From: Andi Kleen <ak@xxxxxxxxxxxxxxx>
> Currently in perf IPC and other metrics cannot be directly shown
> separately for both user and kernel in a single run. The problem was
> that the metrics matching code did not check event qualifiers.
> With this patch the following case works correctly.
> % perf stat -e cycles:k,cycles:u,instructions:k,instructions:u true
> Performance counter stats for 'true':
> 531,718 cycles:k
> 203,895 cycles:u
> 338,151 instructions:k # 0.64 insns per cycle
> 105,961 instructions:u # 0.52 insns per cycle
> 0.002989739 seconds time elapsed
> Previously it would misreport the ratios because they were matching
> the wrong value.
> The patch is fairly big, but quite mechanic as it just
> adds context indexes everywhere.
> Reported-by: William Cohen <wcohen@xxxxxxxxxx>
> Signed-off-by: Andi Kleen <ak@xxxxxxxxxxxxxxx>
I like the patch, but your new version doesn't address Ingo's
comments on first version:
I can make follow up patch, if you are not going to work on that,
because I think this is really needed.. let me know
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/