perf tools: Add refcnt into struct mem_info
authorJiri Olsa <jolsa@kernel.org>
Wed, 7 Mar 2018 15:50:06 +0000 (16:50 +0100)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Thu, 8 Mar 2018 14:30:44 +0000 (11:30 -0300)
commit9f87498f1cb72958c6f8725eb93d2f7ef81fa11e
treefacec74738cca821c7b7fc7c93c0f860cf74cc17
parent915b4e27f1d32b3c7de4874ac1e3fe1f801151ca
perf tools: Add refcnt into struct mem_info

It's passed along several hists entries in --hierarchy mode, so it's
better we keep track of it.

The current fail I see is that it gets removed in hierarchy --mem-mode
mode, where it's shared in the different hierarchies, but removed from
the template hist entry, so the report crashes.

Signed-off-by: Jiri Olsa <jolsa@kernel.org>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: David Ahern <dsahern@gmail.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Link: http://lkml.kernel.org/r/20180307155020.32613-6-jolsa@kernel.org
[ Rename mem_info__aloc() to mem_info__new(), to fix the typo and use the convention for constructors ]
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/perf/util/hist.c
tools/perf/util/machine.c
tools/perf/util/symbol.c
tools/perf/util/symbol.h