1 /* SPDX-License-Identifier: GPL-2.0 */
7 #include <linux/list.h>
8 #include <linux/rbtree.h>
15 * DSOs are put into both a list for fast iteration and rbtree for fast
19 struct list_head head
;
20 struct rb_root root
; /* rbtree root sorted by long name */
21 struct rw_semaphore lock
;
24 void __dsos__add(struct dsos
*dsos
, struct dso
*dso
);
25 void dsos__add(struct dsos
*dsos
, struct dso
*dso
);
26 struct dso
*__dsos__addnew(struct dsos
*dsos
, const char *name
);
27 struct dso
*__dsos__find(struct dsos
*dsos
, const char *name
, bool cmp_short
);
29 struct dso
*dsos__findnew_id(struct dsos
*dsos
, const char *name
, struct dso_id
*id
);
31 struct dso
*__dsos__findnew_link_by_longname_id(struct rb_root
*root
, struct dso
*dso
,
32 const char *name
, struct dso_id
*id
);
34 bool __dsos__read_build_ids(struct list_head
*head
, bool with_hits
);
36 size_t __dsos__fprintf_buildid(struct list_head
*head
, FILE *fp
,
37 bool (skip
)(struct dso
*dso
, int parm
), int parm
);
38 size_t __dsos__fprintf(struct list_head
*head
, FILE *fp
);
40 #endif /* __PERF_DSOS */