perf tools: Add reference counting for cpu_map object
Adding refference counting for cpu_map object, so it could be easily shared among other objects. Using cpu_map__put instead cpu_map__delete and making cpu_map__delete static. Signed-off-by: Jiri Olsa <jolsa@kernel.org> Cc: Adrian Hunter <adrian.hunter@intel.com> Cc: Andi Kleen <ak@linux.intel.com> Cc: David Ahern <dsahern@gmail.com> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Peter Zijlstra <a.p.zijlstra@chello.nl> Cc: Stephane Eranian <eranian@google.com> Link: http://lkml.kernel.org/r/1435012588-9007-4-git-send-email-jolsa@kernel.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
This commit is contained in:
parent
4cc9761481
commit
f30a79b012
13 changed files with 45 additions and 15 deletions
|
@ -384,7 +384,7 @@ static int pyrf_cpu_map__init(struct pyrf_cpu_map *pcpus,
|
|||
|
||||
static void pyrf_cpu_map__delete(struct pyrf_cpu_map *pcpus)
|
||||
{
|
||||
cpu_map__delete(pcpus->cpus);
|
||||
cpu_map__put(pcpus->cpus);
|
||||
pcpus->ob_type->tp_free((PyObject*)pcpus);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue