lkml.org 
[lkml]   [2011]   [Sep]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH 1/4] perf: fix counter of ftrace events
    Date
    Each event adds some points to its counters. By default it adds 1,
    and a number of points may be transmited in event's parameters.

    E.g. sched:sched_stat_runtime adds how long process has been running.

    But this functionality was broken by v2.6.31-rc5-392-gf413cdb
    and now the event's parameters doesn't affect on a number of points.

    TP_perf_assign isn't defined, so __perf_count(c) isn't executed and
    __count is always equal to 1.

    Signed-off-by: Andrew Vagin <avagin@openvz.org>
    ---
    include/trace/ftrace.h | 3 +++
    1 files changed, 3 insertions(+), 0 deletions(-)

    diff --git a/include/trace/ftrace.h b/include/trace/ftrace.h
    index 533c49f..7697249 100644
    --- a/include/trace/ftrace.h
    +++ b/include/trace/ftrace.h
    @@ -711,6 +711,9 @@ __attribute__((section("_ftrace_events"))) *__event_##call = &event_##call
    #undef __perf_count
    #define __perf_count(c) __count = (c)

    +#undef TP_perf_assign
    +#define TP_perf_assign(args...) args
    +
    #undef DECLARE_EVENT_CLASS
    #define DECLARE_EVENT_CLASS(call, proto, args, tstruct, assign, print) \
    static notrace void \
    --
    1.7.1


    \
     
     \ /
      Last update: 2011-09-26 17:57    [W:2.437 / U:0.080 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site