1 /* SPDX-License-Identifier: GPL-2.0 */
7 #include <linux/list.h>
8 #include <linux/rbtree.h>
17 * Collection of DSOs as an array for iteration speed, but sorted for O(n)
21 struct rw_semaphore lock
;
24 unsigned int allocated
;
28 void dsos__init(struct dsos
*dsos
);
29 void dsos__exit(struct dsos
*dsos
);
31 int __dsos__add(struct dsos
*dsos
, struct dso
*dso
);
32 int dsos__add(struct dsos
*dsos
, struct dso
*dso
);
33 struct dso
*dsos__find(struct dsos
*dsos
, const char *name
, bool cmp_short
);
35 struct dso
*dsos__findnew_id(struct dsos
*dsos
, const char *name
, const struct dso_id
*id
);
37 bool dsos__read_build_ids(struct dsos
*dsos
, bool with_hits
);
39 size_t dsos__fprintf_buildid(struct dsos
*dsos
, FILE *fp
,
40 bool (skip
)(struct dso
*dso
, int parm
), int parm
);
41 size_t dsos__fprintf(struct dsos
*dsos
, FILE *fp
);
43 int dsos__hit_all(struct dsos
*dsos
);
45 struct dso
*dsos__findnew_module_dso(struct dsos
*dsos
, struct machine
*machine
,
46 struct kmod_path
*m
, const char *filename
);
48 struct dso
*dsos__find_kernel_dso(struct dsos
*dsos
);
50 int dsos__for_each_dso(struct dsos
*dsos
, int (*cb
)(struct dso
*dso
, void *data
), void *data
);
52 #endif /* __PERF_DSOS */