mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-02-19 07:49:02 -05:00
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>
This commit is contained in:
committed by
Arnaldo Carvalho de Melo
parent
b00e4d0d93
commit
bb588e3829
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user