mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-22 06:32:08 +00:00
perf tools: Add struct perf_data_file
Add struct perf_data_file to represent a single file within a perf_data struct. 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-c3f9p4xzykr845ktqcek6p4t@git.kernel.org [ Fixup recent changes in 'perf script --per-event-dump' ] Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
This commit is contained in:
parent
8ceb41d7e3
commit
eae8ad8042
23 changed files with 127 additions and 97 deletions
|
@ -707,7 +707,7 @@ static void data__fprintf(void)
|
|||
|
||||
data__for_each_file(i, d)
|
||||
fprintf(stdout, "# [%d] %s %s\n",
|
||||
d->idx, d->data.path,
|
||||
d->idx, d->data.file.path,
|
||||
!d->idx ? "(Baseline)" : "");
|
||||
|
||||
fprintf(stdout, "#\n");
|
||||
|
@ -778,14 +778,14 @@ static int __cmd_diff(void)
|
|||
data__for_each_file(i, d) {
|
||||
d->session = perf_session__new(&d->data, false, &tool);
|
||||
if (!d->session) {
|
||||
pr_err("Failed to open %s\n", d->data.path);
|
||||
pr_err("Failed to open %s\n", d->data.file.path);
|
||||
ret = -1;
|
||||
goto out_delete;
|
||||
}
|
||||
|
||||
ret = perf_session__process_events(d->session);
|
||||
if (ret) {
|
||||
pr_err("Failed to process %s\n", d->data.path);
|
||||
pr_err("Failed to process %s\n", d->data.file.path);
|
||||
goto out_delete;
|
||||
}
|
||||
|
||||
|
@ -1288,9 +1288,9 @@ static int data_init(int argc, const char **argv)
|
|||
data__for_each_file(i, d) {
|
||||
struct perf_data *data = &d->data;
|
||||
|
||||
data->path = use_default ? defaults[i] : argv[i];
|
||||
data->mode = PERF_DATA_MODE_READ,
|
||||
data->force = force,
|
||||
data->file.path = use_default ? defaults[i] : argv[i];
|
||||
data->mode = PERF_DATA_MODE_READ,
|
||||
data->force = force,
|
||||
|
||||
d->idx = i;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue