Lines Matching refs:cache
15 static struct cache expansion_cache;
293 static char *get_type_name(struct die *cache) in get_type_name() argument
299 if (cache->state == DIE_INCOMPLETE) { in get_type_name()
300 warn("found incomplete cache entry: %p", cache); in get_type_name()
303 if (cache->state == DIE_SYMBOL || cache->state == DIE_FQN) in get_type_name()
305 if (!cache->fqn || !*cache->fqn) in get_type_name()
308 prefix = get_type_prefix(cache->tag); in get_type_name()
313 quote = strstr(cache->fqn, " ") ? "'" : ""; in get_type_name()
316 if (asprintf(&name, "%c#%s%s%s", prefix, quote, cache->fqn, quote) < 0) in get_type_name()
317 error("asprintf failed for '%s'", cache->fqn); in get_type_name()
359 static void __type_expand(struct die *cache, struct type_expansion *type) in __type_expand() argument
365 list_for_each_entry(df, &cache->fragments, list) { in __type_expand()
391 if (list_is_last(&df->list, &cache->fragments) || in __type_expand()
397 error("empty die_fragment in %p", cache); in __type_expand()
402 static void type_expand(const char *name, struct die *cache, in type_expand() argument
412 __type_expand(cache, type); in type_expand()
483 static void expand_type(struct die *cache, void *arg) in expand_type() argument
488 if (cache->mapped) in expand_type()
491 cache->mapped = true; in expand_type()
497 if (cache->state == DIE_UNEXPANDED && in expand_type()
498 !__die_map_get(cache->addr, DIE_COMPLETE, &cache)) { in expand_type()
499 if (cache->mapped) in expand_type()
502 cache->mapped = true; in expand_type()
505 name = get_type_name(cache); in expand_type()
511 type_expand(name, cache, &type); in expand_type()
521 struct die *cache; in expand_symbol() local
531 if (__die_map_get(sym->die_addr, DIE_SYMBOL, &cache)) in expand_symbol()
534 type_expand(sym->name, cache, &type); in expand_symbol()