Re: [PATCH] perf: Fix performance issue with perf report

From: Eric B Munson
Date: Tue May 04 2010 - 07:56:53 EST


On Tue, 04 May 2010, Anton Blanchard wrote:

>
> On a large machine we spend a lot of time in perf_header__find_attr when
> running perf report.
>
> If we are parsing a file without PERF_SAMPLE_ID then for each sample we call
> perf_header__find_attr and loop through all counter IDs, never finding a match.
> As the machine gets larger there are more per cpu counters and we spend an
> awful lot of time in there.
>
> The patch below initialises each sample id to -1ULL and checks for this in
> perf_header__find_attr. We may need to do something more intelligent eventually
> (eg a hash lookup from counter id to attr) but this at least fixes the most
> common usage of perf report.
>
> Signed-off-by: Anton Blanchard <anton@xxxxxxxxx>

Acked-by: Eric B Munson <ebmunson@xxxxxxxxxx>

Attachment: signature.asc
Description: Digital signature