perf hists: Replace perf_evsel arg perf_hpp_fmt's header callback
[cascardo/linux.git] / tools / perf / ui / hist.c
index 3baeaa6..0b232d6 100644 (file)
@@ -229,9 +229,9 @@ static int hpp__width_fn(struct perf_hpp_fmt *fmt,
 }
 
 static int hpp__header_fn(struct perf_hpp_fmt *fmt, struct perf_hpp *hpp,
-                         struct perf_evsel *evsel)
+                         struct hists *hists)
 {
-       int len = hpp__width_fn(fmt, hpp, evsel);
+       int len = hpp__width_fn(fmt, hpp, hists_to_evsel(hists));
        return scnprintf(hpp->buf, hpp->size, "%*s", len, fmt->name);
 }
 
@@ -635,7 +635,7 @@ unsigned int hists__sort_list_width(struct hists *hists)
                ret += fmt->width(fmt, &dummy_hpp, hists_to_evsel(hists));
        }
 
-       if (verbose && sort__has_sym) /* Addr + origin */
+       if (verbose && hists__has(hists, sym)) /* Addr + origin */
                ret += 3 + BITS_PER_LONG / 4;
 
        return ret;