aboutsummaryrefslogtreecommitdiffstats
path: root/tools/perf/builtin-diff.c
diff options
context:
space:
mode:
Diffstat (limited to 'tools/perf/builtin-diff.c')
-rw-r--r--tools/perf/builtin-diff.c14
1 files changed, 3 insertions, 11 deletions
diff --git a/tools/perf/builtin-diff.c b/tools/perf/builtin-diff.c
index 4cce68f23686..613a5c4f6d83 100644
--- a/tools/perf/builtin-diff.c
+++ b/tools/perf/builtin-diff.c
@@ -25,17 +25,9 @@ static bool show_displacement;
25static int perf_session__add_hist_entry(struct perf_session *self, 25static int perf_session__add_hist_entry(struct perf_session *self,
26 struct addr_location *al, u64 count) 26 struct addr_location *al, u64 count)
27{ 27{
28 bool hit; 28 if (__perf_session__add_hist_entry(&self->hists, al, NULL, count) != NULL)
29 struct hist_entry *he = __perf_session__add_hist_entry(&self->hists, 29 return 0;
30 al, NULL, 30 return -ENOMEM;
31 count, &hit);
32 if (he == NULL)
33 return -ENOMEM;
34
35 if (hit)
36 __perf_session__add_count(he, al, count);
37
38 return 0;
39} 31}
40 32
41static int diff__process_sample_event(event_t *event, struct perf_session *session) 33static int diff__process_sample_event(event_t *event, struct perf_session *session)