• Home
  • Raw
  • Download

Lines Matching refs:id

40 static bool dso_id__empty(struct dso_id *id)  in dso_id__empty()  argument
42 if (!id) in dso_id__empty()
45 return !id->maj && !id->min && !id->ino && !id->ino_generation; in dso_id__empty()
48 static void dso__inject_id(struct dso *dso, struct dso_id *id) in dso__inject_id() argument
50 dso->id.maj = id->maj; in dso__inject_id()
51 dso->id.min = id->min; in dso__inject_id()
52 dso->id.ino = id->ino; in dso__inject_id()
53 dso->id.ino_generation = id->ino_generation; in dso__inject_id()
70 return __dso_id__cmp(&a->id, &b->id); in dso__cmp_id()
97 static int __dso__cmp_long_name(const char *long_name, struct dso_id *id, struct dso *b) in __dso__cmp_long_name() argument
100 return rc ?: dso_id__cmp(id, &b->id); in __dso__cmp_long_name()
103 static int __dso__cmp_short_name(const char *short_name, struct dso_id *id, struct dso *b) in __dso__cmp_short_name() argument
106 return rc ?: dso_id__cmp(id, &b->id); in __dso__cmp_short_name()
111 return __dso__cmp_short_name(a->short_name, &a->id, b); in dso__cmp_short_name()
120 const char *name, struct dso_id *id) in __dsos__findnew_link_by_longname_id() argument
132 int rc = __dso__cmp_long_name(name, id, this); in __dsos__findnew_link_by_longname_id()
171 __dsos__findnew_link_by_longname_id(&dsos->root, dso, NULL, &dso->id); in __dsos__add()
202 …ruct dso *__dsos__findnew_by_longname_id(struct rb_root *root, const char *name, struct dso_id *id) in __dsos__findnew_by_longname_id() argument
204 return __dsos__findnew_link_by_longname_id(root, NULL, name, id); in __dsos__findnew_by_longname_id()
207 static struct dso *__dsos__find_id(struct dsos *dsos, const char *name, struct dso_id *id, bool cmp… in __dsos__find_id() argument
213 if (__dso__cmp_short_name(name, id, pos) == 0) in __dsos__find_id()
217 return __dsos__findnew_by_longname_id(&dsos->root, name, id); in __dsos__find_id()
257 static struct dso *__dsos__addnew_id(struct dsos *dsos, const char *name, struct dso_id *id) in __dsos__addnew_id() argument
259 struct dso *dso = dso__new_id(name, id); in __dsos__addnew_id()
275 static struct dso *__dsos__findnew_id(struct dsos *dsos, const char *name, struct dso_id *id) in __dsos__findnew_id() argument
277 struct dso *dso = __dsos__find_id(dsos, name, id, false); in __dsos__findnew_id()
279 if (dso && dso_id__empty(&dso->id) && !dso_id__empty(id)) in __dsos__findnew_id()
280 dso__inject_id(dso, id); in __dsos__findnew_id()
282 return dso ? dso : __dsos__addnew_id(dsos, name, id); in __dsos__findnew_id()
285 struct dso *dsos__findnew_id(struct dsos *dsos, const char *name, struct dso_id *id) in dsos__findnew_id() argument
289 dso = dso__get(__dsos__findnew_id(dsos, name, id)); in dsos__findnew_id()