From: David Ahern <dsahern@gmail.com>
To: peterz@infradead.org, tglx@linutronix.de
Cc: Frederic Weisbecker <fweisbec@gmail.com>,
linux-perf-users@vger.kernel.org, linux-kernel@vger.kernel.org,
acme@ghostprotocols.net, mingo@elte.hu, paulus@samba.org,
johnstul@us.ibm.com, rostedt@goodmis.org
Subject: Re: [PATCH 1/6] trace: add tracepoints to timekeeping code - xtime changes
Date: Sun, 14 Aug 2011 22:03:59 -0600 [thread overview]
Message-ID: <4E489AAF.7080906@gmail.com> (raw)
In-Reply-To: <4DFB60FF.1080500@gmail.com>
Thomas/Peter:
On 06/17/2011 08:13 AM, David Ahern wrote:
>
>
> On 06/17/2011 07:23 AM, Frederic Weisbecker wrote:
>> On Tue, Jun 07, 2011 at 05:55:03PM -0600, David Ahern wrote:
>>> Trace points in timekeeping.c where xtime is modified by a user
>>> or ntp.
>>>
>>> Signed-off-by: David Ahern <dsahern@gmail.com>
>>> ---
>>> include/trace/events/timekeeping.h | 43 ++++++++++++++++++++++++++++++++++++
>>> kernel/time/timekeeping.c | 8 ++++++
>>> 2 files changed, 51 insertions(+), 0 deletions(-)
>>> create mode 100644 include/trace/events/timekeeping.h
>>>
>>> diff --git a/include/trace/events/timekeeping.h b/include/trace/events/timekeeping.h
>>> new file mode 100644
>>> index 0000000..3d5d083
>>> --- /dev/null
>>> +++ b/include/trace/events/timekeeping.h
>>> @@ -0,0 +1,43 @@
>>> +#undef TRACE_SYSTEM
>>> +#define TRACE_SYSTEM timekeeping
>>> +
>>> +#if !defined(_TRACE_TIMEKEEP_H) || defined(TRACE_HEADER_MULTI_READ)
>>> +#define _TRACE_TIMEKEEP_H
>>> +
>>> +#include <linux/tracepoint.h>
>>> +#include <linux/time.h>
>>> +
>>> +DECLARE_EVENT_CLASS(tod_template,
>>> +
>>> + TP_PROTO(const struct timespec *tv),
>>> +
>>> + TP_ARGS(tv),
>>> +
>>> + TP_STRUCT__entry(
>>> + __field( __kernel_time_t, tv_sec)
>>> + __field( long, tv_nsec)
>>> + ),
>>> +
>>> + TP_fast_assign(
>>> + __entry->tv_sec = tv->tv_sec;
>>> + __entry->tv_nsec = tv->tv_nsec;
>>> + ),
>>> +
>>> + TP_printk("tv_sec=%ld tv_nsec=%ld", __entry->tv_sec, __entry->tv_nsec)
>>> +);
>>> +
>>> +DEFINE_EVENT(tod_template, settimeofday,
>>> + TP_PROTO(const struct timespec *tv),
>>> + TP_ARGS(tv));
>>> +
>>> +DEFINE_EVENT(tod_template, timekeeping_inject_offset,
>>> + TP_PROTO(const struct timespec *tv),
>>> + TP_ARGS(tv));
>>> +
>>> +DEFINE_EVENT(tod_template, timekeeping_inject_sleeptime,
>>> + TP_PROTO(const struct timespec *tv),
>>> + TP_ARGS(tv));
>>
>> Does the fact it's any of the three way of updating xtime make any
>> difference from the user point of view?
>
> This use case only cares that xtime is updated.
>
>>
>> If not can we rather factorize that in a single settimeofday tracepoint?
>> Or update_time_of_day if we don't want to confuse the user with the
>> syscall.
>
> Peter and Thomas expressed interest in timekeeping tracepoints. How the
> update happens might be wanted. If desired I can consolidate xtime = *tv
> into a single update function and put the trace point there.
Any comments on the proposed trace points in the timekeeping code? I am
working on a new spin of the patches and would like to know if there are
changes needed here too.
Thanks,
David
next prev parent reply other threads:[~2011-08-15 4:04 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-06-07 23:53 [PATCH 0/6] Add time-of-day option to perf events David Ahern
2011-06-07 23:55 ` [PATCH 1/6] trace: add tracepoints to timekeeping code - xtime changes David Ahern
2011-06-17 13:23 ` Frederic Weisbecker
2011-06-17 14:13 ` David Ahern
2011-06-17 14:19 ` Frederic Weisbecker
2011-08-15 4:03 ` David Ahern [this message]
2011-06-07 23:55 ` [PATCH 2/6] perf utils: export parse_single_tracepoint_event David Ahern
2011-06-07 23:55 ` [PATCH 3/6] perf: add reference time event David Ahern
2011-06-17 13:32 ` Frederic Weisbecker
2011-06-17 14:04 ` David Ahern
2011-06-17 14:17 ` Frederic Weisbecker
2011-06-17 14:28 ` David Ahern
2011-07-11 4:20 ` David Ahern
2011-07-12 14:30 ` Frederic Weisbecker
2011-07-12 16:35 ` David Ahern
2011-07-12 17:03 ` Frederic Weisbecker
2011-08-04 15:10 ` David Ahern
[not found] ` <20110808193033.GA2744@ghostprotocols.net>
2011-08-15 4:06 ` David Ahern
2011-06-07 23:56 ` [PATCH 4/6] perf record: add time-of-day option David Ahern
2011-06-17 14:14 ` Frederic Weisbecker
2011-06-17 14:23 ` David Ahern
2011-06-17 15:15 ` Frederic Weisbecker
2011-08-15 4:24 ` David Ahern
2011-06-07 23:56 ` [PATCH 5/6] perf script: pass trace event to print_trace_event David Ahern
2011-06-07 23:56 ` [PATCH 6/6] perf script: add time-of-day option for displaying events David Ahern
2011-06-14 18:42 ` [PATCH 0/6] Add time-of-day option to perf events David Ahern
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4E489AAF.7080906@gmail.com \
--to=dsahern@gmail.com \
--cc=acme@ghostprotocols.net \
--cc=fweisbec@gmail.com \
--cc=johnstul@us.ibm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-perf-users@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=paulus@samba.org \
--cc=peterz@infradead.org \
--cc=rostedt@goodmis.org \
--cc=tglx@linutronix.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).