summaryrefslogtreecommitdiffstats
path: root/tools/perf/util/sort.h
diff options
context:
space:
mode:
authorArnaldo Carvalho de Melo2010-04-02 14:50:42 +0200
committerArnaldo Carvalho de Melo2010-04-02 21:28:28 +0200
commitb9fb93047756c5e4129dfda7591612de61b0e877 (patch)
tree76e66aed31494cdf9f287011bbe1025f21910dac /tools/perf/util/sort.h
parentperf kmem: Fixup the symbol address before using it (diff)
downloadkernel-qcow2-linux-b9fb93047756c5e4129dfda7591612de61b0e877.tar.gz
kernel-qcow2-linux-b9fb93047756c5e4129dfda7591612de61b0e877.tar.xz
kernel-qcow2-linux-b9fb93047756c5e4129dfda7591612de61b0e877.zip
perf hist: Only allocate callchain_node if processing callchains
The struct callchain_node size is 120 bytes, that are never used when there are no callchains or '-g none' is specified, so conditionally allocate it, reducing sizeof(struct hist_entry) from 210 bytes to only 96, greatly speeding the non-callchain processing. LKML-Reference: <new-submission> Cc: Frédéric Weisbecker <fweisbec@gmail.com> Cc: Mike Galbraith <efault@gmx.de> Cc: Peter Zijlstra <a.p.zijlstra@chello.nl> Cc: Paul Mackerras <paulus@samba.org> Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/util/sort.h')
-rw-r--r--tools/perf/util/sort.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/perf/util/sort.h b/tools/perf/util/sort.h
index 439ec5fa0f5f..5bf2b744e7b2 100644
--- a/tools/perf/util/sort.h
+++ b/tools/perf/util/sort.h
@@ -49,12 +49,12 @@ struct hist_entry {
u64 ip;
char level;
struct symbol *parent;
- struct callchain_node callchain;
union {
unsigned long position;
struct hist_entry *pair;
struct rb_root sorted_chain;
};
+ struct callchain_node callchain[0];
};
enum sort_type {