|
@@ -1391,6 +1391,39 @@ bool perf_hpp__is_sort_entry(struct perf_hpp_fmt *format)
|
|
return format->header == __sort__hpp_header;
|
|
return format->header == __sort__hpp_header;
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+bool perf_hpp__is_trace_entry(struct perf_hpp_fmt *fmt)
|
|
|
|
+{
|
|
|
|
+ struct hpp_sort_entry *hse;
|
|
|
|
+
|
|
|
|
+ if (!perf_hpp__is_sort_entry(fmt))
|
|
|
|
+ return false;
|
|
|
|
+
|
|
|
|
+ hse = container_of(fmt, struct hpp_sort_entry, hpp);
|
|
|
|
+ return hse->se == &sort_trace;
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+bool perf_hpp__is_srcline_entry(struct perf_hpp_fmt *fmt)
|
|
|
|
+{
|
|
|
|
+ struct hpp_sort_entry *hse;
|
|
|
|
+
|
|
|
|
+ if (!perf_hpp__is_sort_entry(fmt))
|
|
|
|
+ return false;
|
|
|
|
+
|
|
|
|
+ hse = container_of(fmt, struct hpp_sort_entry, hpp);
|
|
|
|
+ return hse->se == &sort_srcline;
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+bool perf_hpp__is_srcfile_entry(struct perf_hpp_fmt *fmt)
|
|
|
|
+{
|
|
|
|
+ struct hpp_sort_entry *hse;
|
|
|
|
+
|
|
|
|
+ if (!perf_hpp__is_sort_entry(fmt))
|
|
|
|
+ return false;
|
|
|
|
+
|
|
|
|
+ hse = container_of(fmt, struct hpp_sort_entry, hpp);
|
|
|
|
+ return hse->se == &sort_srcfile;
|
|
|
|
+}
|
|
|
|
+
|
|
static bool __sort__hpp_equal(struct perf_hpp_fmt *a, struct perf_hpp_fmt *b)
|
|
static bool __sort__hpp_equal(struct perf_hpp_fmt *a, struct perf_hpp_fmt *b)
|
|
{
|
|
{
|
|
struct hpp_sort_entry *hse_a;
|
|
struct hpp_sort_entry *hse_a;
|