lkml.org 
[lkml]   [2009]   [Aug]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [RFC PATCH] Add timer-source of walltime for ftrace

    On Wed, 19 Aug 2009, KOSAKI Motohiro wrote:

    > > +u64 notrace trace_clock_walltime(void)
    > > +{
    > > + u32 remainder;
    > > + return base_walltime.tv_sec + div_u64_rem(
    > > + trace_clock() + base_walltime.tv_nsec,
    > > + NSEC_PER_SEC, &remainder);
    > > +}
    >
    > Why do we need calculate walltime at ring-buffer recordng phase?
    > IOW, Why can't we calculate this at displaing time?

    Right! We should have something like this:

    return (u64)base_walltime.tv_sec * NSEC_PER_SEC +
    trace_clock() + base_walltime.tv_nsec;

    And then we could divide it out later.

    And then we could even show more fields in the output and not limit
    ourselves to seconds.

    -- Steve



    \
     
     \ /
      Last update: 2009-08-18 21:01    [W:7.143 / U:1.372 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site