summaryrefslogtreecommitdiff
path: root/tools/perf/util/c2c.c
AgeCommit message (Collapse)Author
8 daysperf c2c: extract shared data structures into util/c2c.hJiebin Sun
The function browser belongs in libperf-ui.a, but that archive is also linked into python/perf.so, where builtin command objects are unavailable. The browser therefore cannot depend on types or callbacks owned by builtin-c2c.c. Move c2c_hists, compute_stats, c2c_hist_entry, and the shared column formatting definitions from builtin-c2c.c to a new util/c2c.h. Move c2c_fmt_free() and c2c_fmt_equal() to a new util/c2c.c. Keep struct perf_c2c, the command instance, and perf_c2c__browse_cacheline() private to builtin-c2c.c. No functional change. Signed-off-by: Jiebin Sun <jiebin.sun@intel.com> Reviewed-by: Tianyou Li <tianyou.li@intel.com> Reviewed-by: Wangyang Guo <wangyang.guo@intel.com> Reviewed-by: Ian Rogers <irogers@google.com> Cc: Dapeng Mi <dapeng1.mi@linux.intel.com> Cc: James Clark <james.clark@linaro.org> Cc: Thomas Falcon <thomas.falcon@intel.com> Signed-off-by: Namhyung Kim <namhyung@kernel.org>