Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

perf annotate: Set al->data_nr using the notes->src->nr_events

This is a preparation to support skipping empty events.

Signed-off-by: Namhyung Kim <namhyung@kernel.org>
Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: Ian Rogers <irogers@google.com>
Cc: Ingo Molnar <mingo@kernel.org>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Kan Liang <kan.liang@linux.intel.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Link: https://lore.kernel.org/r/20240803211332.1107222-5-namhyung@kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>

authored by

Namhyung Kim and committed by
Arnaldo Carvalho de Melo
bb588e38 b00e4d0d

+2 -4
+2 -4
tools/perf/util/disasm.c
··· 1037 1037 struct disasm_line *disasm_line__new(struct annotate_args *args) 1038 1038 { 1039 1039 struct disasm_line *dl = NULL; 1040 - int nr = 1; 1041 - 1042 - if (evsel__is_group_event(args->evsel)) 1043 - nr = args->evsel->core.nr_members; 1040 + struct annotation *notes = symbol__annotation(args->ms.sym); 1041 + int nr = notes->src->nr_events; 1044 1042 1045 1043 dl = zalloc(disasm_line_size(nr)); 1046 1044 if (!dl)