perf hist: Only allocate callchain_node if processing callchains
authorArnaldo Carvalho de Melo <acme@redhat.com>
Fri, 2 Apr 2010 12:50:42 +0000 (09:50 -0300)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Fri, 2 Apr 2010 19:28:28 +0000 (16:28 -0300)
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>

No differences found