|
@@ -405,6 +405,16 @@ static u8 symbol__parent_filter(const struct symbol *parent)
|
|
return 0;
|
|
return 0;
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+static void hist_entry__add_callchain_period(struct hist_entry *he, u64 period)
|
|
|
|
+{
|
|
|
|
+ if (!symbol_conf.use_callchain)
|
|
|
|
+ return;
|
|
|
|
+
|
|
|
|
+ he->hists->callchain_period += period;
|
|
|
|
+ if (!he->filtered)
|
|
|
|
+ he->hists->callchain_non_filtered_period += period;
|
|
|
|
+}
|
|
|
|
+
|
|
static struct hist_entry *hists__findnew_entry(struct hists *hists,
|
|
static struct hist_entry *hists__findnew_entry(struct hists *hists,
|
|
struct hist_entry *entry,
|
|
struct hist_entry *entry,
|
|
struct addr_location *al,
|
|
struct addr_location *al,
|
|
@@ -434,9 +444,7 @@ static struct hist_entry *hists__findnew_entry(struct hists *hists,
|
|
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;
|
|
|
|
|
|
+ hist_entry__add_callchain_period(he, 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);
|
|
@@ -471,9 +479,8 @@ static struct hist_entry *hists__findnew_entry(struct hists *hists,
|
|
return NULL;
|
|
return NULL;
|
|
|
|
|
|
if (sample_self)
|
|
if (sample_self)
|
|
- hists__inc_stats(hists, he);
|
|
|
|
- else
|
|
|
|
- hists->nr_entries++;
|
|
|
|
|
|
+ hist_entry__add_callchain_period(he, period);
|
|
|
|
+ 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);
|
|
@@ -1227,9 +1234,14 @@ static void output_resort(struct hists *hists, struct ui_progress *prog,
|
|
struct rb_root *root;
|
|
struct rb_root *root;
|
|
struct rb_node *next;
|
|
struct rb_node *next;
|
|
struct hist_entry *n;
|
|
struct hist_entry *n;
|
|
|
|
+ u64 callchain_total;
|
|
u64 min_callchain_hits;
|
|
u64 min_callchain_hits;
|
|
|
|
|
|
- min_callchain_hits = hists__total_period(hists) * (callchain_param.min_percent / 100);
|
|
|
|
|
|
+ callchain_total = hists->callchain_period;
|
|
|
|
+ if (symbol_conf.filter_relative)
|
|
|
|
+ callchain_total = hists->callchain_non_filtered_period;
|
|
|
|
+
|
|
|
|
+ min_callchain_hits = callchain_total * (callchain_param.min_percent / 100);
|
|
|
|
|
|
if (sort__need_collapse)
|
|
if (sort__need_collapse)
|
|
root = &hists->entries_collapsed;
|
|
root = &hists->entries_collapsed;
|