diff options
author | Jiri Olsa <jolsa@kernel.org> | 2017-01-23 16:07:59 -0500 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2017-10-30 12:36:09 -0400 |
commit | 8ceb41d7e305f186543c58178d2e1fe34f708948 (patch) | |
tree | 998e9ad77e2034a847f627283ec041fa4b647331 /tools/perf/builtin-diff.c | |
parent | 642ee1c6df4c8571d8a6846a2623fb54f925ef92 (diff) |
perf tools: Rename struct perf_data_file to perf_data
Rename struct perf_data_file to perf_data, because we will add the
possibility to have multiple files under perf.data, so the 'perf_data'
name fits better.
Signed-off-by: Jiri Olsa <jolsa@kernel.org>
Cc: Andi Kleen <andi@firstfloor.org>
Cc: Changbin Du <changbin.du@intel.com>
Cc: David Ahern <dsahern@gmail.com>
Cc: Jin Yao <yao.jin@linux.intel.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Wang Nan <wangnan0@huawei.com>
Link: http://lkml.kernel.org/n/tip-39wn4d77phel3dgkzo3lyan0@git.kernel.org
[ Fixup recent changes in 'perf script --per-event-dump' ]
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/builtin-diff.c')
-rw-r--r-- | tools/perf/builtin-diff.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/tools/perf/builtin-diff.c b/tools/perf/builtin-diff.c index 0cd4cf6a344b..5292e3d13cec 100644 --- a/tools/perf/builtin-diff.c +++ b/tools/perf/builtin-diff.c | |||
@@ -47,7 +47,7 @@ struct diff_hpp_fmt { | |||
47 | 47 | ||
48 | struct data__file { | 48 | struct data__file { |
49 | struct perf_session *session; | 49 | struct perf_session *session; |
50 | struct perf_data_file file; | 50 | struct perf_data data; |
51 | int idx; | 51 | int idx; |
52 | struct hists *hists; | 52 | struct hists *hists; |
53 | struct diff_hpp_fmt fmt[PERF_HPP_DIFF__MAX_INDEX]; | 53 | struct diff_hpp_fmt fmt[PERF_HPP_DIFF__MAX_INDEX]; |
@@ -707,7 +707,7 @@ static void data__fprintf(void) | |||
707 | 707 | ||
708 | data__for_each_file(i, d) | 708 | data__for_each_file(i, d) |
709 | fprintf(stdout, "# [%d] %s %s\n", | 709 | fprintf(stdout, "# [%d] %s %s\n", |
710 | d->idx, d->file.path, | 710 | d->idx, d->data.path, |
711 | !d->idx ? "(Baseline)" : ""); | 711 | !d->idx ? "(Baseline)" : ""); |
712 | 712 | ||
713 | fprintf(stdout, "#\n"); | 713 | fprintf(stdout, "#\n"); |
@@ -776,16 +776,16 @@ static int __cmd_diff(void) | |||
776 | int ret = -EINVAL, i; | 776 | int ret = -EINVAL, i; |
777 | 777 | ||
778 | data__for_each_file(i, d) { | 778 | data__for_each_file(i, d) { |
779 | d->session = perf_session__new(&d->file, false, &tool); | 779 | d->session = perf_session__new(&d->data, false, &tool); |
780 | if (!d->session) { | 780 | if (!d->session) { |
781 | pr_err("Failed to open %s\n", d->file.path); | 781 | pr_err("Failed to open %s\n", d->data.path); |
782 | ret = -1; | 782 | ret = -1; |
783 | goto out_delete; | 783 | goto out_delete; |
784 | } | 784 | } |
785 | 785 | ||
786 | ret = perf_session__process_events(d->session); | 786 | ret = perf_session__process_events(d->session); |
787 | if (ret) { | 787 | if (ret) { |
788 | pr_err("Failed to process %s\n", d->file.path); | 788 | pr_err("Failed to process %s\n", d->data.path); |
789 | goto out_delete; | 789 | goto out_delete; |
790 | } | 790 | } |
791 | 791 | ||
@@ -1286,11 +1286,11 @@ static int data_init(int argc, const char **argv) | |||
1286 | return -ENOMEM; | 1286 | return -ENOMEM; |
1287 | 1287 | ||
1288 | data__for_each_file(i, d) { | 1288 | data__for_each_file(i, d) { |
1289 | struct perf_data_file *file = &d->file; | 1289 | struct perf_data *data = &d->data; |
1290 | 1290 | ||
1291 | file->path = use_default ? defaults[i] : argv[i]; | 1291 | data->path = use_default ? defaults[i] : argv[i]; |
1292 | file->mode = PERF_DATA_MODE_READ, | 1292 | data->mode = PERF_DATA_MODE_READ, |
1293 | file->force = force, | 1293 | data->force = force, |
1294 | 1294 | ||
1295 | d->idx = i; | 1295 | d->idx = i; |
1296 | } | 1296 | } |