|
@@ -432,8 +432,12 @@ static struct hist_entry *hists__findnew_entry(struct hists *hists,
|
|
cmp = hist_entry__cmp(he, entry);
|
|
cmp = hist_entry__cmp(he, entry);
|
|
|
|
|
|
if (!cmp) {
|
|
if (!cmp) {
|
|
- if (sample_self)
|
|
|
|
|
|
+ if (sample_self) {
|
|
he_stat__add_period(&he->stat, period, weight);
|
|
he_stat__add_period(&he->stat, period, weight);
|
|
|
|
+ hists->stats.total_period += period;
|
|
|
|
+ if (!he->filtered)
|
|
|
|
+ hists->stats.total_non_filtered_period += period;
|
|
|
|
+ }
|
|
if (symbol_conf.cumulate_callchain)
|
|
if (symbol_conf.cumulate_callchain)
|
|
he_stat__add_period(he->stat_acc, period, weight);
|
|
he_stat__add_period(he->stat_acc, period, weight);
|
|
|
|
|
|
@@ -466,7 +470,10 @@ static struct hist_entry *hists__findnew_entry(struct hists *hists,
|
|
if (!he)
|
|
if (!he)
|
|
return NULL;
|
|
return NULL;
|
|
|
|
|
|
- hists->nr_entries++;
|
|
|
|
|
|
+ if (sample_self)
|
|
|
|
+ hists__inc_stats(hists, he);
|
|
|
|
+ else
|
|
|
|
+ hists->nr_entries++;
|
|
|
|
|
|
rb_link_node(&he->rb_node_in, parent, p);
|
|
rb_link_node(&he->rb_node_in, parent, p);
|
|
rb_insert_color(&he->rb_node_in, hists->entries_in);
|
|
rb_insert_color(&he->rb_node_in, hists->entries_in);
|