mirror of
https://github.com/edk2-porting/linux-next.git
synced 2024-12-20 11:13:58 +08:00
perf script: Add a few missing conversions to fprintf style
In a1a587073c
("perf script: Use fprintf like printing uniformly")
there were a few cases that were missed, fix it.
Reported-by: yuzhoujian <yuzhoujian@didichuxing.com>
Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: David Ahern <dsahern@gmail.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Wang Nan <wangnan0@huawei.com>
Link: http://lkml.kernel.org/n/tip-sq9hvfk5mkjdqzlpyiq7jkos@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
This commit is contained in:
parent
0d3d73aac2
commit
69c7125229
@ -1447,7 +1447,7 @@ static void process_event(struct perf_script *script,
|
|||||||
perf_sample__fprintf_start(sample, thread, evsel, fp);
|
perf_sample__fprintf_start(sample, thread, evsel, fp);
|
||||||
|
|
||||||
if (PRINT_FIELD(PERIOD))
|
if (PRINT_FIELD(PERIOD))
|
||||||
printf("%10" PRIu64 " ", sample->period);
|
fprintf(fp, "%10" PRIu64 " ", sample->period);
|
||||||
|
|
||||||
if (PRINT_FIELD(EVNAME)) {
|
if (PRINT_FIELD(EVNAME)) {
|
||||||
const char *evname = perf_evsel__name(evsel);
|
const char *evname = perf_evsel__name(evsel);
|
||||||
@ -1455,8 +1455,7 @@ static void process_event(struct perf_script *script,
|
|||||||
if (!script->name_width)
|
if (!script->name_width)
|
||||||
script->name_width = perf_evlist__max_name_len(script->session->evlist);
|
script->name_width = perf_evlist__max_name_len(script->session->evlist);
|
||||||
|
|
||||||
printf("%*s: ", script->name_width,
|
fprintf(fp, "%*s: ", script->name_width, evname ?: "[unknown]");
|
||||||
evname ? evname : "[unknown]");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (print_flags)
|
if (print_flags)
|
||||||
@ -1513,8 +1512,8 @@ static void process_event(struct perf_script *script,
|
|||||||
perf_sample__fprintf_insn(sample, attr, thread, machine, fp);
|
perf_sample__fprintf_insn(sample, attr, thread, machine, fp);
|
||||||
|
|
||||||
if (PRINT_FIELD(PHYS_ADDR))
|
if (PRINT_FIELD(PHYS_ADDR))
|
||||||
printf("%16" PRIx64, sample->phys_addr);
|
fprintf(fp, "%16" PRIx64, sample->phys_addr);
|
||||||
printf("\n");
|
fprintf(fp, "\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
static struct scripting_ops *scripting_ops;
|
static struct scripting_ops *scripting_ops;
|
||||||
|
Loading…
Reference in New Issue
Block a user