Messages in this thread | | | Date | Wed, 8 Nov 2023 17:25:00 -0300 | From | Arnaldo Carvalho de Melo <> | Subject | Re: [PATCH 2/5] perf annotate: Split struct annotated_branch |
| |
Em Fri, Nov 03, 2023 at 12:19:04PM -0700, Namhyung Kim escreveu: > The cycles info is only meaningful when sample has branch stacks. To > save the memory for normal cases, move those fields to annotated_branch > and dynamically allocate it when needed. Also move cycles_hist from > annotated_source as it's related here.
<SNIP>
> +static void annotated_branch__delete(struct annotated_branch *branch) > +{ > + if (branch) { > + free(branch->cycles_hist);
I changed the above free to zfree
> + free(branch); > + } > +}
| |