summaryrefslogtreecommitdiff
path: root/tools/perf/ui/hist.c
diff options
context:
space:
mode:
Diffstat (limited to 'tools/perf/ui/hist.c')
-rw-r--r--tools/perf/ui/hist.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/tools/perf/ui/hist.c b/tools/perf/ui/hist.c
index 5a11bf0aabc7..71c8bb71a350 100644
--- a/tools/perf/ui/hist.c
+++ b/tools/perf/ui/hist.c
@@ -524,6 +524,11 @@ void perf_hpp__cancel_cumulate(void)
perf_hpp__format[PERF_HPP__OVERHEAD].name = "Overhead";
}
+static bool fmt_equal(struct perf_hpp_fmt *a, struct perf_hpp_fmt *b)
+{
+ return a->equal && a->equal(a, b);
+}
+
void perf_hpp__setup_output_field(void)
{
struct perf_hpp_fmt *fmt;
@@ -542,7 +547,7 @@ void perf_hpp__setup_output_field(void)
struct perf_hpp_fmt *pos;
perf_hpp__for_each_format(pos) {
- if (perf_hpp__same_sort_entry(pos, fmt))
+ if (fmt_equal(fmt, pos))
goto next;
}
}
@@ -571,7 +576,7 @@ void perf_hpp__append_sort_keys(void)
struct perf_hpp_fmt *pos;
perf_hpp__for_each_sort_list(pos) {
- if (perf_hpp__same_sort_entry(pos, fmt))
+ if (fmt_equal(fmt, pos))
goto next;
}
}