perf symbols: Remove open coded management of long_name_allocated member
Instead of expecting callers to set this member accodingly so that later at dso destruction it can, if needed, be correctly free()d, make it a requirement by passing it as a parameter to dso__set_long_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-na7t1tqim22vuqkt4zq5n4ri@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
This commit is contained in:
@@ -763,8 +763,7 @@ static int map_groups__set_modules_path_dir(struct map_groups *mg,
|
||||
ret = -1;
|
||||
goto out;
|
||||
}
|
||||
dso__set_long_name(map->dso, long_name);
|
||||
map->dso->long_name_allocated = 1;
|
||||
dso__set_long_name(map->dso, long_name, true);
|
||||
dso__kernel_module_get_build_id(map->dso, "");
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user