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>
This commit is contained in:
@ -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 {
|
||||
|
Reference in New Issue
Block a user