static int perf_session__add_hist_entry(struct perf_session *self, struct addr_location *al, u64 count) { bool hit; struct hist_entry *he = __perf_session__add_hist_entry(self, al, NULL, count, &hit); if (he == NULL) return -ENOMEM; if (hit) he->count += count; return 0; }
static int perf_session__add_hist_entry(struct perf_session *self, struct addr_location *al, u64 count) { bool hit; struct hist_entry *he; if (sym_hist_filter != NULL && (al->sym == NULL || strcmp(sym_hist_filter, al->sym->name) != 0)) { /* We're only interested in a symbol named sym_hist_filter */ if (al->sym != NULL) { rb_erase(&al->sym->rb_node, &al->map->dso->symbols[al->map->type]); symbol__delete(al->sym); } return 0; } he = __perf_session__add_hist_entry(self, al, NULL, count, &hit); if (he == NULL) return -ENOMEM; return annotate__hist_hit(he, al->addr); }