diff options
author | Ingo Molnar <mingo@kernel.org> | 2017-11-03 15:06:53 +0100 |
---|---|---|
committer | Ingo Molnar <mingo@kernel.org> | 2017-11-03 15:06:53 +0100 |
commit | 340b5319c98eb14f7a70947a38e17d06f5beea88 (patch) | |
tree | ece6aeb203be9207ae16eb2ffb985fddc42db46d /tools/perf/tests/topology.c | |
parent | perf/core: Rewrite event timekeeping (diff) | |
parent | perf srcline: Show correct function name for srcline of callchains (diff) | |
download | linux-340b5319c98eb14f7a70947a38e17d06f5beea88.tar.xz linux-340b5319c98eb14f7a70947a38e17d06f5beea88.zip |
Merge tag 'perf-core-for-mingo-4.15-20171103' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux into perf/core
Pull perf/core improvements and fixes from Arnaldo Carvalho de Melo:
- Beautify the 'kcmp' and 'prctl' syscall arguments in 'perf trace'
(Arnaldo Carvalho de Melo)
- Implement a way to print formatted output to per-event files in 'perf script'
to facilitate generate flamegraphs, elliminating the need to write scripts to
do that separation (yuzhoujian, Arnaldo Carvalho de Melo)
Make 'perf stat --per-thread' update shadow stats to show metrics (Jiri Olsa)
- Fix double mapping al->addr in callchain processing for children without self
period (Namhyung Kim)
- Fix memory leak in addr2inlines() when libbfd is not used (Namhyung Kim)
- Show correct function name for srcline of callchains when libbfd is not used
(Namhyung Kim)
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'tools/perf/tests/topology.c')
-rw-r--r-- | tools/perf/tests/topology.c | 22 |
1 files changed, 13 insertions, 9 deletions
diff --git a/tools/perf/tests/topology.c b/tools/perf/tests/topology.c index 19b0561fd6f6..9bbfed51f1d6 100644 --- a/tools/perf/tests/topology.c +++ b/tools/perf/tests/topology.c @@ -29,12 +29,14 @@ static int get_temp(char *path) static int session_write_header(char *path) { struct perf_session *session; - struct perf_data_file file = { - .path = path, - .mode = PERF_DATA_MODE_WRITE, + struct perf_data data = { + .file = { + .path = path, + }, + .mode = PERF_DATA_MODE_WRITE, }; - session = perf_session__new(&file, false, NULL); + session = perf_session__new(&data, false, NULL); TEST_ASSERT_VAL("can't get session", session); session->evlist = perf_evlist__new_default(); @@ -46,7 +48,7 @@ static int session_write_header(char *path) session->header.data_size += DATA_SIZE; TEST_ASSERT_VAL("failed to write header", - !perf_session__write_header(session, session->evlist, file.fd, true)); + !perf_session__write_header(session, session->evlist, data.file.fd, true)); perf_session__delete(session); @@ -56,13 +58,15 @@ static int session_write_header(char *path) static int check_cpu_topology(char *path, struct cpu_map *map) { struct perf_session *session; - struct perf_data_file file = { - .path = path, - .mode = PERF_DATA_MODE_READ, + struct perf_data data = { + .file = { + .path = path, + }, + .mode = PERF_DATA_MODE_READ, }; int i; - session = perf_session__new(&file, false, NULL); + session = perf_session__new(&data, false, NULL); TEST_ASSERT_VAL("can't get session", session); for (i = 0; i < session->header.env.nr_cpus_avail; i++) { |