From 0ac1dd5b4a70cfc8591dd9426f800b484765badb Mon Sep 17 00:00:00 2001 From: Kyle Meyer Date: Tue, 27 Aug 2019 16:43:46 -0500 Subject: perf timechart: Refactor svg_build_topology_map() Exchange the parameters of svg_build_topology_map() with 'struct perf_env *env' and adjust the function accordingly. This patch should not change any behavior, it is merely refactoring for the following patch. Committer notes: No need to include env.h from svghelper.h, all it needs is a forward declaration for 'struct perf_env', so move the include directive to svghelper.c, where it is really needed. Signed-off-by: Kyle Meyer Reviewed-by: Jiri Olsa Cc: Alexander Shishkin Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Russ Anderson Link: http://lore.kernel.org/lkml/20190827214352.94272-2-meyerk@stormcage.eag.rdlabs.hpecorp.net Signed-off-by: Arnaldo Carvalho de Melo --- tools/perf/builtin-timechart.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'tools/perf/builtin-timechart.c') diff --git a/tools/perf/builtin-timechart.c b/tools/perf/builtin-timechart.c index 7d6a6ecf4e02..1ff81a790931 100644 --- a/tools/perf/builtin-timechart.c +++ b/tools/perf/builtin-timechart.c @@ -1518,10 +1518,7 @@ static int process_header(struct perf_file_section *section __maybe_unused, if (!tchart->topology) break; - if (svg_build_topology_map(ph->env.sibling_cores, - ph->env.nr_sibling_cores, - ph->env.sibling_threads, - ph->env.nr_sibling_threads)) + if (svg_build_topology_map(&ph->env)) fprintf(stderr, "problem building topology\n"); break; -- cgit v1.2.3-59-g8ed1b