lkml.org 
[lkml]   [2014]   [May]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH 08/27] perf callchain: Add callchain_cursor_snapshot()
    Date
    The callchain_cursor_snapshot() is for saving current status of the
    callchain. It'll be used to accumulate callchain information for each node.

    Tested-by: Arun Sharma <asharma@fb.com>
    Tested-by: Rodrigo Campos <rodrigo@sdfg.com.ar>
    Acked-by: Jiri Olsa <jolsa@redhat.com>
    Cc: Frederic Weisbecker <fweisbec@gmail.com>
    Signed-off-by: Namhyung Kim <namhyung@kernel.org>
    ---
    tools/perf/util/callchain.h | 9 +++++++++
    1 file changed, 9 insertions(+)

    diff --git a/tools/perf/util/callchain.h b/tools/perf/util/callchain.h
    index 24a53d562d0a..8f84423a75da 100644
    --- a/tools/perf/util/callchain.h
    +++ b/tools/perf/util/callchain.h
    @@ -167,4 +167,13 @@ int fill_callchain_info(struct addr_location *al, struct callchain_cursor_node *

    extern const char record_callchain_help[];
    int parse_callchain_report_opt(const char *arg);
    +
    +static inline void callchain_cursor_snapshot(struct callchain_cursor *dest,
    + struct callchain_cursor *src)
    +{
    + *dest = *src;
    +
    + dest->first = src->curr;
    + dest->nr -= src->pos;
    +}
    #endif /* __PERF_CALLCHAIN_H */
    --
    1.9.2


    \
     
     \ /
      Last update: 2014-05-29 07:01    [W:4.066 / U:0.580 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site