diff options
Diffstat (limited to 'tools/perf/ui/hist.c')
| -rw-r--r-- | tools/perf/ui/hist.c | 5 | 
1 files changed, 4 insertions, 1 deletions
diff --git a/tools/perf/ui/hist.c b/tools/perf/ui/hist.c index f164bd26fc41..2bf959d08354 100644 --- a/tools/perf/ui/hist.c +++ b/tools/perf/ui/hist.c @@ -11,6 +11,7 @@  #include "../util/sort.h"  #include "../util/evsel.h"  #include "../util/evlist.h" +#include "../util/thread.h"  #include "../util/util.h"  /* hist period print (hpp) functions */ @@ -274,7 +275,9 @@ static int __hpp__sort_acc(struct hist_entry *a, struct hist_entry *b,  		if (ret)  			return ret; -		if (a->thread != b->thread || !hist_entry__has_callchains(a) || !symbol_conf.use_callchain) +		if ((a->thread == NULL ? NULL : RC_CHK_ACCESS(a->thread)) != +		    (b->thread == NULL ? NULL : RC_CHK_ACCESS(b->thread)) || +		    !hist_entry__has_callchains(a) || !symbol_conf.use_callchain)  			return 0;  		ret = b->callchain->max_depth - a->callchain->max_depth;  |