Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1475301

Re: [PATCH v4 3/3] tracing: Histogram for missed timer offsets

From Masami Hiramatsu <masami.hiramatsu@linaro.org>
Newsgroups linux.kernel
Subject Re: [PATCH v4 3/3] tracing: Histogram for missed timer offsets
Date 2016-09-02 18:00 +0200
Message-ID <scZ2Q-1kr-77@gated-at.bofh.it> (permalink)
References <sbOsN-3yX-13@gated-at.bofh.it> <sbOsO-3yX-37@gated-at.bofh.it> <sbOVP-3IU-13@gated-at.bofh.it> <scW4W-7YZ-29@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


2016-09-02 21:41 GMT+09:00 Binoy Jayan <binoy.jayan@linaro.org>:
> On 30 August 2016 at 16:20, Masami Hiramatsu
> <masami.hiramatsu@linaro.org> wrote:
>> Hi Binoy,
>>>
>>> +static inline void trace_latency_hrtimer_mark_ts(struct hrtimer *timer,
>>> +                                        struct hrtimer_clock_base *new_base,
>>> +                                        ktime_t tim)
>>> +{
>>> +#if defined(CONFIG_PREEMPT_TRACER) || defined(CONFIG_IRQSOFF_TRACER)
>>> +       if (trace_latency_hrtimer_interrupt_enabled()) {
>>
>> You would better use unlikely() here.
>>
>>> +               ktime_t now = new_base->get_time();
>>> +
>>> +               if (ktime_to_ns(tim) < ktime_to_ns(now))
>>
>> Wouldn't we need to consider the case of wrap around?
>>
>>> +                       timer->praecox = now;
>>> +               else
>>> +                       timer->praecox = ktime_set(0, 0);
>>> +       }
>>> +#endif
>>> +}
>
> Hi Masami,
>
> I always see these values to be relative and not absolute time. I
> found 'praecox' to be always zero during test.
> What do you think.

Ah, right. Since "tim" is expire time (timer target), that should
always be "now + x"
(x is enough larger than how long setting the hrtimer takes). Or,
hrtimer expires
before finished to set. :)

Thank you,
-- 
Masami Hiramatsu

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH v4 0/3] *** Latency histograms - IRQSOFF,PREEMPTOFF *** Binoy Jayan <binoy.jayan@linaro.org> - 2016-08-30 12:30 +0200
  [PATCH v4 1/3] tracing: Deference pointers without RCU checks Binoy Jayan <binoy.jayan@linaro.org> - 2016-08-30 12:30 +0200
  [PATCH v4 3/3] tracing: Histogram for missed timer offsets Binoy Jayan <binoy.jayan@linaro.org> - 2016-08-30 12:30 +0200
    Re: [PATCH v4 3/3] tracing: Histogram for missed timer offsets Masami Hiramatsu <masami.hiramatsu@linaro.org> - 2016-08-30 13:00 +0200
      Re: [PATCH v4 3/3] tracing: Histogram for missed timer offsets Binoy Jayan <binoy.jayan@linaro.org> - 2016-09-02 14:50 +0200
        Re: [PATCH v4 3/3] tracing: Histogram for missed timer offsets Masami Hiramatsu <masami.hiramatsu@linaro.org> - 2016-09-02 18:00 +0200
    Re: [PATCH v4 3/3] tracing: Histogram for missed timer offsets Steven Rostedt <rostedt@goodmis.org> - 2016-08-30 16:20 +0200
      Re: [PATCH v4 3/3] tracing: Histogram for missed timer offsets Binoy Jayan <binoy.jayan@linaro.org> - 2016-08-31 13:40 +0200
        Re: [PATCH v4 3/3] tracing: Histogram for missed timer offsets Steven Rostedt <rostedt@goodmis.org> - 2016-08-31 14:50 +0200
  Re: [PATCH v4 0/3] *** Latency histograms - IRQSOFF,PREEMPTOFF *** Daniel Wagner <daniel.wagner@bmw-carit.de> - 2016-08-30 13:50 +0200
    Re: [PATCH v4 0/3] *** Latency histograms - IRQSOFF,PREEMPTOFF *** Masami Hiramatsu <masami.hiramatsu@linaro.org> - 2016-08-30 14:10 +0200

csiph-web