lkml.org 
[lkml]   [2014]   [Jul]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH-v2] tracing: Fix wraparound problems in "uptime" tracer
From
On Thu, Jul 17, 2014 at 7:08 PM, Steven Rostedt <rostedt@goodmis.org> wrote:
>> Do we really need to convert to nanoseconds? Couldn't we just return
>> jiffies:
>
> Sure, and we can make it a "counter". That is, the counters don't hide
> 1000 counts on output.

Can you explain that a bit more ... how do we mark it as a "counter"?

>> u64 notrace trace_clock_jiffies(void)
>> {
>> return jiffies_64 - INITIAL_JIFFIES;
>> }

Hmm it seems that we make it hard for applications to see what HZ
value the kernel is actually using. All user-facing interfaces should
convert to USER_HZ (100). So we should say:

u64 notrace trace_clock_jiffies(void)
{
return jiffies_64_to_clock_t(jiffies_64 - INITIAL_JIFFIES);
}

Do we need to change anything in Documentation/trace/ftrace.txt?

Currently it says:

uptime: This uses the jiffies counter and the time stamp
is relative to the time since boot up.

-Tony


\
 
 \ /
  Last update: 2014-07-19 11:41    [W:0.066 / U:0.272 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site