lkml.org 
[lkml]   [2023]   [Nov]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [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);
    > + }
    > +}

    \
     
     \ /
      Last update: 2023-11-20 13:53    [W:6.289 / U:0.008 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site