perf machine: Don't open code assign dso->short_name
authorArnaldo Carvalho de Melo <acme@redhat.com>
Tue, 10 Dec 2013 13:58:47 +0000 (10:58 -0300)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Tue, 10 Dec 2013 19:51:08 +0000 (16:51 -0300)
Use dso__set_short_name instead, as it will release any previously,
possibly allocated, short name.

Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: David Ahern <dsahern@gmail.com>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Stephane Eranian <eranian@google.com>
Link: http://lkml.kernel.org/n/tip-1v39elw7v6nxczpntpp7ljwr@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/perf/util/machine.c

index f66f309a091a9a05949f8dfc54ecd753c3e16234..f85da9a9a5d939a08d7017f84f881a91789a55a9 100644 (file)
@@ -935,7 +935,7 @@ static int machine__process_kernel_mmap_event(struct machine *machine,
                if (name == NULL)
                        goto out_problem;
 
-               map->dso->short_name = name;
+               dso__set_short_name(map->dso, name);
                map->dso->short_name_allocated = 1;
                map->end = map->start + event->mmap.len;
        } else if (is_kernel_mmap) {