mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 03:01:39 -04:00
perf c2c: Keep struct hist_entry at the end of struct c2c_hist_entry
Exactly as the comment just before 'struct c2c_hist_entry" says, i.e.
the last entry in struct hist_entry is a zero length array, that when
allocating space for hist_entry gets extra space if callchains are in
use, which, if hist_entry is not at the end of c2c_hist_entry, the
members after it gets corrupted when callchains get added to the rb
trees collecting them, etc.
Signed-off-by: Jiri Olsa <[email protected]>
Reported-by: Arnaldo Carvalho de Melo <[email protected]>
Cc: Jin Yao <[email protected]>
Fixes: 7f834c2e84 ("perf c2c report: Display node for cacheline address")
Link: http://lkml.kernel.org/n/[email protected]
Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
This commit is contained in:
parent
a5cfa6217c
commit
4c82052736
1 changed files with 5 additions and 5 deletions
|
|
@ -56,16 +56,16 @@ struct c2c_hist_entry {
|
|||
|
||||
struct compute_stats cstats;
|
||||
|
||||
unsigned long paddr;
|
||||
unsigned long paddr_cnt;
|
||||
bool paddr_zero;
|
||||
char *nodestr;
|
||||
|
||||
/*
|
||||
* must be at the end,
|
||||
* because of its callchain dynamic entry
|
||||
*/
|
||||
struct hist_entry he;
|
||||
|
||||
unsigned long paddr;
|
||||
unsigned long paddr_cnt;
|
||||
bool paddr_zero;
|
||||
char *nodestr;
|
||||
};
|
||||
|
||||
static char const *coalesce_default = "pid,iaddr";
|
||||
|
|
|
|||
Loading…
Reference in a new issue