diff options
| author | Namhyung Kim <[email protected]> | 2024-08-03 14:13:31 -0700 |
|---|---|---|
| committer | Arnaldo Carvalho de Melo <[email protected]> | 2024-08-05 16:13:18 -0300 |
| commit | bb588e38290fb7236e7f2c0bcbd720150277ca83 (patch) | |
| tree | ea6b7fbf749a2e343d87143a34c3fc8f7e9b6082 /tools | |
| parent | b00e4d0d93d30a693ee88b2c25f40181d327e53b (diff) | |
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 <[email protected]>
Cc: Adrian Hunter <[email protected]>
Cc: Ian Rogers <[email protected]>
Cc: Ingo Molnar <[email protected]>
Cc: Jiri Olsa <[email protected]>
Cc: Kan Liang <[email protected]>
Cc: Peter Zijlstra <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
Diffstat (limited to 'tools')
| -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) |