};
static int c2c_hists__init(struct c2c_hists *hists,
- const char *sort);
+ const char *sort,
+ int nr_header_lines);
static struct c2c_hists*
he__get_c2c_hists(struct hist_entry *he,
- const char *sort)
+ const char *sort,
+ int nr_header_lines)
{
struct c2c_hist_entry *c2c_he;
struct c2c_hists *hists;
if (!hists)
return NULL;
- ret = c2c_hists__init(hists, sort);
+ ret = c2c_hists__init(hists, sort, nr_header_lines);
if (ret) {
free(hists);
return NULL;
if (!mi_dup)
goto free_mi;
- c2c_hists = he__get_c2c_hists(he, "offset");
+ c2c_hists = he__get_c2c_hists(he, "offset", 2);
if (!c2c_hists)
goto free_mi_dup;
}
static int c2c_hists__init(struct c2c_hists *hists,
- const char *sort)
+ const char *sort,
+ int nr_header_lines)
{
__hists__init(&hists->hists, &hists->list);
*/
perf_hpp_list__init(&hists->list);
+ /* Overload number of header lines.*/
+ hists->list.nr_header_lines = nr_header_lines;
+
return hpp_list__parse(&hists->list, NULL, sort);
}
file.path = input_name;
- err = c2c_hists__init(&c2c.hists, "dcacheline");
+ err = c2c_hists__init(&c2c.hists, "dcacheline", 2);
if (err) {
pr_debug("Failed to initialize hists\n");
goto out;