summaryrefslogtreecommitdiffstats
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.c24
1 files changed, 14 insertions, 10 deletions
diff --git a/tools/perf/builtin-diff.c b/tools/perf/builtin-diff.c
index f6f5dd15bea7..827e4800d862 100644
--- a/tools/perf/builtin-diff.c
+++ b/tools/perf/builtin-diff.c
@@ -6,6 +6,7 @@
6 * DSOs and symbol information, sort them and produce a diff. 6 * DSOs and symbol information, sort them and produce a diff.
7 */ 7 */
8#include "builtin.h" 8#include "builtin.h"
9#include "perf.h"
9 10
10#include "util/debug.h" 11#include "util/debug.h"
11#include "util/event.h" 12#include "util/event.h"
@@ -15,6 +16,7 @@
15#include "util/session.h" 16#include "util/session.h"
16#include "util/tool.h" 17#include "util/tool.h"
17#include "util/sort.h" 18#include "util/sort.h"
19#include "util/srcline.h"
18#include "util/symbol.h" 20#include "util/symbol.h"
19#include "util/data.h" 21#include "util/data.h"
20#include "util/config.h" 22#include "util/config.h"
@@ -22,6 +24,8 @@
22#include "util/annotate.h" 24#include "util/annotate.h"
23#include "util/map.h" 25#include "util/map.h"
24#include <linux/zalloc.h> 26#include <linux/zalloc.h>
27#include <subcmd/pager.h>
28#include <subcmd/parse-options.h>
25 29
26#include <errno.h> 30#include <errno.h>
27#include <inttypes.h> 31#include <inttypes.h>
@@ -376,7 +380,7 @@ struct hist_entry_ops block_hist_ops = {
376static int diff__process_sample_event(struct perf_tool *tool, 380static int diff__process_sample_event(struct perf_tool *tool,
377 union perf_event *event, 381 union perf_event *event,
378 struct perf_sample *sample, 382 struct perf_sample *sample,
379 struct perf_evsel *evsel, 383 struct evsel *evsel,
380 struct machine *machine) 384 struct machine *machine)
381{ 385{
382 struct perf_diff *pdiff = container_of(tool, struct perf_diff, tool); 386 struct perf_diff *pdiff = container_of(tool, struct perf_diff, tool);
@@ -448,10 +452,10 @@ static struct perf_diff pdiff = {
448 }, 452 },
449}; 453};
450 454
451static struct perf_evsel *evsel_match(struct perf_evsel *evsel, 455static struct evsel *evsel_match(struct evsel *evsel,
452 struct perf_evlist *evlist) 456 struct evlist *evlist)
453{ 457{
454 struct perf_evsel *e; 458 struct evsel *e;
455 459
456 evlist__for_each_entry(evlist, e) { 460 evlist__for_each_entry(evlist, e) {
457 if (perf_evsel__match2(evsel, e)) 461 if (perf_evsel__match2(evsel, e))
@@ -461,9 +465,9 @@ static struct perf_evsel *evsel_match(struct perf_evsel *evsel,
461 return NULL; 465 return NULL;
462} 466}
463 467
464static void perf_evlist__collapse_resort(struct perf_evlist *evlist) 468static void perf_evlist__collapse_resort(struct evlist *evlist)
465{ 469{
466 struct perf_evsel *evsel; 470 struct evsel *evsel;
467 471
468 evlist__for_each_entry(evlist, evsel) { 472 evlist__for_each_entry(evlist, evsel) {
469 struct hists *hists = evsel__hists(evsel); 473 struct hists *hists = evsel__hists(evsel);
@@ -1009,8 +1013,8 @@ static void data__fprintf(void)
1009 1013
1010static void data_process(void) 1014static void data_process(void)
1011{ 1015{
1012 struct perf_evlist *evlist_base = data__files[0].session->evlist; 1016 struct evlist *evlist_base = data__files[0].session->evlist;
1013 struct perf_evsel *evsel_base; 1017 struct evsel *evsel_base;
1014 bool first = true; 1018 bool first = true;
1015 1019
1016 evlist__for_each_entry(evlist_base, evsel_base) { 1020 evlist__for_each_entry(evlist_base, evsel_base) {
@@ -1019,8 +1023,8 @@ static void data_process(void)
1019 int i; 1023 int i;
1020 1024
1021 data__for_each_file_new(i, d) { 1025 data__for_each_file_new(i, d) {
1022 struct perf_evlist *evlist = d->session->evlist; 1026 struct evlist *evlist = d->session->evlist;
1023 struct perf_evsel *evsel; 1027 struct evsel *evsel;
1024 struct hists *hists; 1028 struct hists *hists;
1025 1029
1026 evsel = evsel_match(evsel_base, evlist); 1030 evsel = evsel_match(evsel_base, evlist);