From: Anton Blanchard Date: Tue, 4 May 2010 11:19:15 +0000 (+1000) Subject: perf: Fix performance issue with perf report X-Git-Tag: v2.6.35-rc1~522^2~75^2 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=02bf60aad7d5912dfcdbe0154f1bd67ea7a8301e;p=pandora-kernel.git perf: Fix performance issue with perf report 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. Cc: Peter Zijlstra Cc: Paul Mackerras Cc: Ingo Molnar Cc: Frederic Weisbecker Cc: Eric B Munson Acked-by: Eric B Munson LKML-Reference: <20100504111915.GB14636@kryten> Signed-off-by: Anton Blanchard -- Signed-off-by: Arnaldo Carvalho de Melo --- Reading git-diff-tree failed