perf machine: Do not call map_groups__delete(), drop refcnt instead
authorArnaldo Carvalho de Melo <[email protected]>
Tue, 19 May 2015 23:07:14 +0000 (20:07 -0300)
committerArnaldo Carvalho de Melo <[email protected]>
Wed, 27 May 2015 15:21:44 +0000 (12:21 -0300)
It could be used somewhere, so just call map__groups_put() to make sure
we don't delete it prematurely

Cc: Adrian Hunter <[email protected]>
Cc: Borislav Petkov <[email protected]>
Cc: David Ahern <[email protected]>
Cc: Don Zickus <[email protected]>
Cc: Frederic Weisbecker <[email protected]>
Cc: Jiri Olsa <[email protected]>
Cc: Namhyung Kim <[email protected]>
Cc: Stephane Eranian <[email protected]>
Link: http://lkml.kernel.org/n/[email protected]
Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
tools/perf/util/machine.c

index daa55910ff281e014cd808d597e964a1150c05fe..7ec3188d3cb34d53a64fea44ef8afc66cdef50ac 100644 (file)
@@ -333,7 +333,7 @@ static void machine__update_thread_pid(struct machine *machine,
                if (!map_groups__empty(th->mg))
                        pr_err("Discarding thread maps for %d:%d\n",
                               th->pid_, th->tid);
-               map_groups__delete(th->mg);
+               map_groups__put(th->mg);
        }
 
        th->mg = map_groups__get(leader->mg);