perf map: Introduce map__has_symbols()
To further simplify checking if symbols are available for a given map and to reduce the number of users of MAP__{FUNCTION,VARIABLE}. Cc: Adrian Hunter <adrian.hunter@intel.com> Cc: David Ahern <dsahern@gmail.com> Cc: Jiri Olsa <jolsa@kernel.org> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Wang Nan <wangnan0@huawei.com> Link: https://lkml.kernel.org/n/tip-iyfoyvbfdti5uehgpjum3qrq@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
This commit is contained in:
@@ -259,6 +259,11 @@ bool __map__is_kernel(const struct map *map)
|
||||
return __machine__kernel_map(map->groups->machine, map->type) == map;
|
||||
}
|
||||
|
||||
bool map__has_symbols(const struct map *map)
|
||||
{
|
||||
return dso__has_symbols(map->dso, map->type);
|
||||
}
|
||||
|
||||
static void map__exit(struct map *map)
|
||||
{
|
||||
BUG_ON(!RB_EMPTY_NODE(&map->rb_node));
|
||||
|
Reference in New Issue
Block a user