Em Wed, Oct 11, 2023 at 08:50:38PM -0700, Namhyung Kim escreveu: > The 'type' sort key is to aggregate hist entries by data type they > access. Add mem_type field to hist_entry struct to save the type. > If hist_entry__get_data_type() returns NULL, it'd use the > 'unknown_type' instance. Needed the patch below, doing the same that is a bit before for libtraceevent diff --git a/tools/perf/util/sort.c b/tools/perf/util/sort.c index c79564c1d5df5db3..3fae226d115ef8e6 100644 --- a/tools/perf/util/sort.c +++ b/tools/perf/util/sort.c @@ -2132,6 +2132,7 @@ struct sort_entry sort_addr = { .se_width_idx = HISTC_ADDR, }; +#ifdef HAVE_DWARF_SUPPORT /* --sort type */ static int64_t @@ -2190,7 +2191,7 @@ struct sort_entry sort_type = { .se_snprintf = hist_entry__type_snprintf, .se_width_idx = HISTC_TYPE, }; - +#endif // HAVE_DWARF_SUPPORT struct sort_dimension { const char *name; @@ -2246,7 +2247,9 @@ static struct sort_dimension common_sort_dimensions[] = { DIM(SORT_LOCAL_RETIRE_LAT, "local_retire_lat", sort_local_p_stage_cyc), DIM(SORT_GLOBAL_RETIRE_LAT, "retire_lat", sort_global_p_stage_cyc), DIM(SORT_SIMD, "simd", sort_simd), +#ifdef HAVE_DWARF_SUPPORT DIM(SORT_ANNOTATE_DATA_TYPE, "type", sort_type), +#endif }; #undef DIM