aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/trace/trace_output.c
diff options
context:
space:
mode:
authorDeepa Dinamani <deepa.kernel@gmail.com>2017-05-08 18:59:13 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2017-05-08 20:15:15 -0400
commit51aad0aee5b70e26347e4d891d568518909f3452 (patch)
treeba6ec5bcb36a564a5679080ce7084b59f646caf9 /kernel/trace/trace_output.c
parent48fbfe50f1d5fef51bac98d105d2a28df42a1205 (diff)
trace: make trace_hwlat timestamp y2038 safe
struct timespec is not y2038 safe on 32 bit machines and needs to be replaced by struct timespec64 in order to represent times beyond year 2038 on such machines. Fix all the timestamp representation in struct trace_hwlat and all the corresponding implementations. Link: http://lkml.kernel.org/r/1491613030-11599-3-git-send-email-deepa.kernel@gmail.com Signed-off-by: Deepa Dinamani <deepa.kernel@gmail.com> Acked-by: Steven Rostedt (VMware) <rostedt@goodmis.org> Cc: Ingo Molnar <mingo@redhat.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'kernel/trace/trace_output.c')
-rw-r--r--kernel/trace/trace_output.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/kernel/trace/trace_output.c b/kernel/trace/trace_output.c
index 02a4aeb22c47..08f9bab8089e 100644
--- a/kernel/trace/trace_output.c
+++ b/kernel/trace/trace_output.c
@@ -4,7 +4,6 @@
4 * Copyright (C) 2008 Red Hat Inc, Steven Rostedt <srostedt@redhat.com> 4 * Copyright (C) 2008 Red Hat Inc, Steven Rostedt <srostedt@redhat.com>
5 * 5 *
6 */ 6 */
7
8#include <linux/module.h> 7#include <linux/module.h>
9#include <linux/mutex.h> 8#include <linux/mutex.h>
10#include <linux/ftrace.h> 9#include <linux/ftrace.h>
@@ -1161,11 +1160,11 @@ trace_hwlat_print(struct trace_iterator *iter, int flags,
1161 1160
1162 trace_assign_type(field, entry); 1161 trace_assign_type(field, entry);
1163 1162
1164 trace_seq_printf(s, "#%-5u inner/outer(us): %4llu/%-5llu ts:%ld.%09ld", 1163 trace_seq_printf(s, "#%-5u inner/outer(us): %4llu/%-5llu ts:%lld.%09ld",
1165 field->seqnum, 1164 field->seqnum,
1166 field->duration, 1165 field->duration,
1167 field->outer_duration, 1166 field->outer_duration,
1168 field->timestamp.tv_sec, 1167 (long long)field->timestamp.tv_sec,
1169 field->timestamp.tv_nsec); 1168 field->timestamp.tv_nsec);
1170 1169
1171 if (field->nmi_count) { 1170 if (field->nmi_count) {
@@ -1195,10 +1194,10 @@ trace_hwlat_raw(struct trace_iterator *iter, int flags,
1195 1194
1196 trace_assign_type(field, iter->ent); 1195 trace_assign_type(field, iter->ent);
1197 1196
1198 trace_seq_printf(s, "%llu %lld %ld %09ld %u\n", 1197 trace_seq_printf(s, "%llu %lld %lld %09ld %u\n",
1199 field->duration, 1198 field->duration,
1200 field->outer_duration, 1199 field->outer_duration,
1201 field->timestamp.tv_sec, 1200 (long long)field->timestamp.tv_sec,
1202 field->timestamp.tv_nsec, 1201 field->timestamp.tv_nsec,
1203 field->seqnum); 1202 field->seqnum);
1204 1203