perf evsel: Add hists helper
Not all tools need a hists instance per perf_evsel, so lets pave the way to remove evsel->hists while leaving a way to access the hists from a specially allocated evsel, one that comes with space at the end where lives the evsel. Cc: Adrian Hunter <adrian.hunter@intel.com> Cc: Borislav Petkov <bp@suse.de> Cc: David Ahern <dsahern@gmail.com> Cc: Don Zickus <dzickus@redhat.com> Cc: Frederic Weisbecker <fweisbec@gmail.com> Cc: Jean Pihet <jean.pihet@linaro.org> Cc: Jiri Olsa <jolsa@redhat.com> Cc: Mike Galbraith <efault@gmx.de> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Paul Mackerras <paulus@samba.org> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Stephane Eranian <eranian@google.com> Link: http://lkml.kernel.org/n/tip-qlktkhe31w4mgtbd84035sr2@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
This commit is contained in:
parent
49c23f2d54
commit
4ea062ed43
14 changed files with 132 additions and 101 deletions
|
@ -1218,7 +1218,7 @@ static int __sort__hpp_header(struct perf_hpp_fmt *fmt, struct perf_hpp *hpp,
|
|||
hse = container_of(fmt, struct hpp_sort_entry, hpp);
|
||||
|
||||
if (!len)
|
||||
len = hists__col_len(&evsel->hists, hse->se->se_width_idx);
|
||||
len = hists__col_len(evsel__hists(evsel), hse->se->se_width_idx);
|
||||
|
||||
return scnprintf(hpp->buf, hpp->size, "%-*.*s", len, len, fmt->name);
|
||||
}
|
||||
|
@ -1233,7 +1233,7 @@ static int __sort__hpp_width(struct perf_hpp_fmt *fmt,
|
|||
hse = container_of(fmt, struct hpp_sort_entry, hpp);
|
||||
|
||||
if (!len)
|
||||
len = hists__col_len(&evsel->hists, hse->se->se_width_idx);
|
||||
len = hists__col_len(evsel__hists(evsel), hse->se->se_width_idx);
|
||||
|
||||
return len;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue