lkml.org 
[lkml]   [2009]   [Nov]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    Date
    From
    SubjectRe: [RFC][PATCH 0/7] perf trace: general-purpose scripting support, v2

    * Peter Zijlstra <peterz@infradead.org> wrote:

    > On Wed, 2009-11-25 at 09:28 +0100, Peter Zijlstra wrote:
    > > On Wed, 2009-11-25 at 01:15 -0600, Tom Zanussi wrote:
    > > > sched::sched_wakeup 0 01238.657997033 6183 firefox comm=firefox, pid=6199, prio=120, success=1, target_cpu=1
    > > > sched::sched_switch 1 01238.657991740 7140 firefox prev_comm=firefox, prev_pid=7140, prev_prio=120, prev_state=S, next_comm=firefox, next_pid=6199, next_prio=120
    > > >
    > > > min_wakeup_latency: -5293
    > >
    > > Looks like we missed a clock update on the cross cpu wakeup, Mike was
    > > busy plugging those holes -- I've been starting at a patch that might
    > > cure this (amongst other things).
    >
    > Hmm, current -tip should have that cured as per:

    well, but timestamp inconsistencies are still possible fundamentally, as
    cpu_clock() is not globally serialized.

    If so then the (hack only) patch below would cure those timestamp
    inconsistencies?

    Ingo

    Not-Signed-off-by-me

    diff --git a/kernel/perf_event.c b/kernel/perf_event.c
    index 35df94e..4f36b47 100644
    --- a/kernel/perf_event.c
    +++ b/kernel/perf_event.c
    @@ -248,7 +248,7 @@ static void perf_unpin_context(struct perf_event_context *ctx)

    static inline u64 perf_clock(void)
    {
    - return cpu_clock(smp_processor_id());
    + return trace_clock_global();
    }

    /*

    \
     
     \ /
      Last update: 2009-11-25 10:47    [W:0.025 / U:95.796 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site