aboutsummaryrefslogtreecommitdiffstats
path: root/tools/perf/util/symbol.c
diff options
context:
space:
mode:
Diffstat (limited to 'tools/perf/util/symbol.c')
-rw-r--r--tools/perf/util/symbol.c25
1 files changed, 12 insertions, 13 deletions
diff --git a/tools/perf/util/symbol.c b/tools/perf/util/symbol.c
index 75cd46807c70..292f941555a8 100644
--- a/tools/perf/util/symbol.c
+++ b/tools/perf/util/symbol.c
@@ -18,18 +18,6 @@
18#define NT_GNU_BUILD_ID 3 18#define NT_GNU_BUILD_ID 3
19#endif 19#endif
20 20
21enum dso_origin {
22 DSO__ORIG_KERNEL = 0,
23 DSO__ORIG_JAVA_JIT,
24 DSO__ORIG_BUILD_ID_CACHE,
25 DSO__ORIG_FEDORA,
26 DSO__ORIG_UBUNTU,
27 DSO__ORIG_BUILDID,
28 DSO__ORIG_DSO,
29 DSO__ORIG_KMODULE,
30 DSO__ORIG_NOT_FOUND,
31};
32
33static void dsos__add(struct list_head *head, struct dso *dso); 21static void dsos__add(struct list_head *head, struct dso *dso);
34static struct map *map__new2(u64 start, struct dso *dso, enum map_type type); 22static struct map *map__new2(u64 start, struct dso *dso, enum map_type type);
35static int dso__load_kernel_sym(struct dso *self, struct map *map, 23static int dso__load_kernel_sym(struct dso *self, struct map *map,
@@ -1017,7 +1005,7 @@ static int dso__load_sym(struct dso *self, struct map *map, const char *name,
1017 } 1005 }
1018 curr_map->map_ip = identity__map_ip; 1006 curr_map->map_ip = identity__map_ip;
1019 curr_map->unmap_ip = identity__map_ip; 1007 curr_map->unmap_ip = identity__map_ip;
1020 curr_dso->origin = DSO__ORIG_KERNEL; 1008 curr_dso->origin = self->origin;
1021 map_groups__insert(kmap->kmaps, curr_map); 1009 map_groups__insert(kmap->kmaps, curr_map);
1022 dsos__add(&dsos__kernel, curr_dso); 1010 dsos__add(&dsos__kernel, curr_dso);
1023 dso__set_loaded(curr_dso, map->type); 1011 dso__set_loaded(curr_dso, map->type);
@@ -1887,6 +1875,17 @@ out_fail:
1887 return -1; 1875 return -1;
1888} 1876}
1889 1877
1878size_t vmlinux_path__fprintf(FILE *fp)
1879{
1880 int i;
1881 size_t printed = 0;
1882
1883 for (i = 0; i < vmlinux_path__nr_entries; ++i)
1884 printed += fprintf(fp, "[%d] %s\n", i, vmlinux_path[i]);
1885
1886 return printed;
1887}
1888
1890static int setup_list(struct strlist **list, const char *list_str, 1889static int setup_list(struct strlist **list, const char *list_str,
1891 const char *list_name) 1890 const char *list_name)
1892{ 1891{