diff options
author | Arnaldo Carvalho de Melo <acme@redhat.com> | 2018-04-23 17:13:49 -0300 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2018-04-26 13:47:06 -0300 |
commit | e94b861a231501e73d786970ed5a1fb3ea643906 (patch) | |
tree | 03d5e4ceba24394b2b5f7b14a741870d47ab2c07 /tools/perf/util/map.c | |
parent | d88205db9caa0e9d42dde8ff6c2fa0c7b57cd11d (diff) | |
download | linux-e94b861a231501e73d786970ed5a1fb3ea643906.tar.bz2 |
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>
Diffstat (limited to 'tools/perf/util/map.c')
-rw-r--r-- | tools/perf/util/map.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/tools/perf/util/map.c b/tools/perf/util/map.c index 8fe57031e1a8..f553e302bf9c 100644 --- a/tools/perf/util/map.c +++ b/tools/perf/util/map.c @@ -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)); |