lkml.org 
[lkml]   [2015]   [Dec]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH/RFC 09/16] perf tools: Update hist entry's hists pointer
    Date
    When sample is processed using multi-thread, each sample is gathered on
    each thread's hist tree and then merged into the real hist tree. But
    hist_entry->hists pointer was not updated so it could refer wrong hists
    resulted in missing outputs.

    Signed-off-by: Namhyung Kim <namhyung@kernel.org>
    ---
    tools/perf/util/hist.c | 8 ++++++++
    1 file changed, 8 insertions(+)

    diff --git a/tools/perf/util/hist.c b/tools/perf/util/hist.c
    index ea4f3ad978b0..a12e5022fe04 100644
    --- a/tools/perf/util/hist.c
    +++ b/tools/perf/util/hist.c
    @@ -1008,6 +1008,14 @@ bool hists__collapse_insert_entry(struct hists *hists __maybe_unused,
    }
    hists->nr_entries++;

    + /*
    + * If a hist entry is processed in multi-threaded environment,
    + * it points to a dummy local hists which was used only for
    + * intermidate processing. So update it to a real one so that
    + * it can find the correct info later.
    + */
    + he->hists = hists;
    +
    rb_link_node(&he->rb_node_in, parent, p);
    rb_insert_color(&he->rb_node_in, root);
    return true;
    --
    2.6.2


    \
     
     \ /
      Last update: 2015-12-10 09:41    [W:4.098 / U:0.028 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site