From: Michael Jeanson <mjeanson@efficios.com>
To: lttng-dev@lists.lttng.org
Subject: [PATCH lttng-modules] fix: y2038: itimer: change implementation to timespec64 (v5.5)
Date: Tue, 10 Dec 2019 11:41:11 -0500 [thread overview]
Message-ID: <20191210164114.26954-2-mjeanson__29773.7686590821$1575996137$gmane$org@efficios.com> (raw)
In-Reply-To: <20191210164114.26954-1-mjeanson@efficios.com>
See upstream commit:
commit bd40a175769d411b2a37e1c087082ac7ee2c15bb
Author: Arnd Bergmann <arnd@arndb.de>
Date: Thu Nov 7 15:27:39 2019 +0100
y2038: itimer: change implementation to timespec64
There is no 64-bit version of getitimer/setitimer since that is not
actually needed. However, the implementation is built around the
deprecated 'struct timeval' type.
Change the code to use timespec64 internally to reduce the dependencies
on timeval and associated helper functions.
Minor adjustments in the code are needed to make the native and compat
version work the same way, and to keep the range check working after
the conversion.
Signed-off-by: Michael Jeanson <mjeanson@efficios.com>
---
instrumentation/events/lttng-module/timer.h | 21 ++++++++++++++++++++-
1 file changed, 20 insertions(+), 1 deletion(-)
diff --git a/instrumentation/events/lttng-module/timer.h b/instrumentation/events/lttng-module/timer.h
index 997084f..1a45d82 100644
--- a/instrumentation/events/lttng-module/timer.h
+++ b/instrumentation/events/lttng-module/timer.h
@@ -294,7 +294,26 @@ LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(timer_hrtimer_class, hrtimer_cancel,
* zero, otherwise it is started
* @expires: the itimers expiry time
*/
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,11,0))
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5,5,0))
+LTTNG_TRACEPOINT_EVENT_MAP(itimer_state,
+
+ timer_itimer_state,
+
+ TP_PROTO(int which, const struct itimerspec64 *const value,
+ unsigned long long expires),
+
+ TP_ARGS(which, value, expires),
+
+ TP_FIELDS(
+ ctf_integer(int, which, which)
+ ctf_integer(unsigned long long, expires, expires)
+ ctf_integer(long, value_sec, value->it_value.tv_sec)
+ ctf_integer(long, value_nsec, value->it_value.tv_nsec)
+ ctf_integer(long, interval_sec, value->it_interval.tv_sec)
+ ctf_integer(long, interval_nsec, value->it_interval.tv_nsec)
+ )
+)
+#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(4,11,0))
LTTNG_TRACEPOINT_EVENT_MAP(itimer_state,
timer_itimer_state,
--
2.17.1
next parent reply other threads:[~2019-12-10 16:41 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20191210164114.26954-1-mjeanson@efficios.com>
2019-12-10 16:41 ` Michael Jeanson [this message]
2019-12-10 16:41 ` [PATCH lttng-modules] fix: btrfs: tracepoints: constify all pointers (v5.5) Michael Jeanson
2019-12-10 16:41 ` [PATCH lttng-modules] fix: btrfs block group struct refactor (v5.5) Michael Jeanson
2019-12-10 16:41 ` [PATCH lttng-modules] fix: ext4: Reserve revoke credits for freed blocks (v5.5) Michael Jeanson
2019-12-10 17:19 ` [PATCH lttng-modules] Update .gitignore from upstream Mathieu Desnoyers
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='20191210164114.26954-2-mjeanson__29773.7686590821$1575996137$gmane$org@efficios.com' \
--to=mjeanson@efficios.com \
--cc=lttng-dev@lists.lttng.org \
/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).