perf hists: Allocate output sort field
Currently we use static output fields, because we have single global list of all sort/output fields. We will add hists specific sort and output lists in following patches, so we need all format entries to be dynamically allocated. Adding support to allocate output sort field. Signed-off-by: Jiri Olsa <jolsa@kernel.org> Cc: David Ahern <dsahern@gmail.com> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Peter Zijlstra <a.p.zijlstra@chello.nl> Link: http://lkml.kernel.org/r/1453109064-1026-10-git-send-email-jolsa@kernel.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Этот коммит содержится в:

коммит произвёл
Arnaldo Carvalho de Melo

родитель
3ee60c3b18
Коммит
1945c3e734
@@ -533,11 +533,23 @@ void perf_hpp__column_disable(unsigned col)
|
||||
|
||||
void perf_hpp__cancel_cumulate(void)
|
||||
{
|
||||
struct perf_hpp_fmt *fmt, *acc, *ovh, *tmp;
|
||||
|
||||
if (is_strict_order(field_order))
|
||||
return;
|
||||
|
||||
perf_hpp__column_disable(PERF_HPP__OVERHEAD_ACC);
|
||||
perf_hpp__format[PERF_HPP__OVERHEAD].name = "Overhead";
|
||||
ovh = &perf_hpp__format[PERF_HPP__OVERHEAD];
|
||||
acc = &perf_hpp__format[PERF_HPP__OVERHEAD_ACC];
|
||||
|
||||
perf_hpp__for_each_format_safe(fmt, tmp) {
|
||||
if (acc->equal(acc, fmt)) {
|
||||
perf_hpp__column_unregister(fmt);
|
||||
continue;
|
||||
}
|
||||
|
||||
if (ovh->equal(ovh, fmt))
|
||||
fmt->name = "Overhead";
|
||||
}
|
||||
}
|
||||
|
||||
static bool fmt_equal(struct perf_hpp_fmt *a, struct perf_hpp_fmt *b)
|
||||
|
Ссылка в новой задаче
Block a user