]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
perf annotate: Set al->data_nr using the notes->src->nr_events
authorNamhyung Kim <namhyung@kernel.org>
Sat, 3 Aug 2024 21:13:31 +0000 (14:13 -0700)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Mon, 5 Aug 2024 19:13:18 +0000 (16:13 -0300)
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>
tools/perf/util/disasm.c

index 85fb0cfedf94554bc13e3388369d73159cb90b09..22289003e16d14cae773555db375e0950b4bc9b8 100644 (file)
@@ -1037,10 +1037,8 @@ static size_t disasm_line_size(int nr)
 struct disasm_line *disasm_line__new(struct annotate_args *args)
 {
        struct disasm_line *dl = NULL;
-       int nr = 1;
-
-       if (evsel__is_group_event(args->evsel))
-               nr = args->evsel->core.nr_members;
+       struct annotation *notes = symbol__annotation(args->ms.sym);
+       int nr = notes->src->nr_events;
 
        dl = zalloc(disasm_line_size(nr));
        if (!dl)