void perf_hpp_list__register_sort_field(struct perf_hpp_list *list,
struct perf_hpp_fmt *format)
{
- if (perf_hpp__is_sort_entry(format) || perf_hpp__is_dynamic_entry(format))
- list->nr_sort_keys++;
-
list_add_tail(&format->sort_list, &list->sorts);
}
int socket_filter;
struct perf_hpp_list *hpp_list;
struct list_head hpp_formats;
- int nr_sort_keys;
int nr_hpp_node;
};
struct perf_hpp_list {
struct list_head fields;
struct list_head sorts;
- int nr_sort_keys;
};
extern struct perf_hpp_list perf_hpp_list;
return ret;
}
-static void evlist__set_hists_nr_sort_keys(struct perf_evlist *evlist)
-{
- struct perf_evsel *evsel;
-
- evlist__for_each(evlist, evsel) {
- struct perf_hpp_fmt *fmt;
- struct hists *hists = evsel__hists(evsel);
-
- hists->nr_sort_keys = perf_hpp_list.nr_sort_keys;
-
- /*
- * If dynamic entries were used, it might add multiple
- * entries to each evsel for a single field name. Set
- * actual number of sort keys for each hists.
- */
- perf_hpp_list__for_each_sort_list(&perf_hpp_list, fmt) {
- if (perf_hpp__is_dynamic_entry(fmt) &&
- !perf_hpp__defined_dynamic_entry(fmt, hists))
- hists->nr_sort_keys--;
- }
- }
-}
-
int setup_sorting(struct perf_evlist *evlist)
{
int err;
return err;
}
- if (evlist != NULL)
- evlist__set_hists_nr_sort_keys(evlist);
-
reset_dimensions();
/*