diff options
author | 2024-08-03 14:13:31 -0700 | |
---|---|---|
committer | 2024-08-05 16:13:18 -0300 | |
commit | bb588e38290fb7236e7f2c0bcbd720150277ca83 (patch) | |
tree | ea6b7fbf749a2e343d87143a34c3fc8f7e9b6082 | |
parent | perf annotate: Use annotation__pcnt_width() consistently (diff) | |
download | wireguard-linux-bb588e38290fb7236e7f2c0bcbd720150277ca83.tar.xz wireguard-linux-bb588e38290fb7236e7f2c0bcbd720150277ca83.zip |
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>
-rw-r--r-- | tools/perf/util/disasm.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/tools/perf/util/disasm.c b/tools/perf/util/disasm.c index 85fb0cfedf94..22289003e16d 100644 --- a/tools/perf/util/disasm.c +++ b/tools/perf/util/disasm.c @@ -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) |