From 9080554ff25b08f48762d2ee7cfa3981317e9c1d Mon Sep 17 00:00:00 2001 From: Mathieu Desnoyers Date: Mon, 9 Jan 2012 11:42:57 -0500 Subject: [PATCH] Fix timestamps for slow-paced event rates Given that we currently do not implement any timer that provides guarantees of 27-bit timestamps overflow detection, force the timestamp to 64-bit. Signed-off-by: Mathieu Desnoyers --- liblttng-ust/ltt-events.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/liblttng-ust/ltt-events.c b/liblttng-ust/ltt-events.c index f69eb07a..94e06780 100644 --- a/liblttng-ust/ltt-events.c +++ b/liblttng-ust/ltt-events.c @@ -309,10 +309,20 @@ int ltt_session_enable(struct ltt_session *session) cds_list_for_each_entry(chan, &session->chan, list) { if (chan->header_type) continue; /* don't change it if session stop/restart */ + /* + * Because we don't use any timer in the application, we + * currently cannot guarantee that we have frequent + * events that let us detect 27-bit overflows. + * Therefore, for now, we force large event headers, + * which contain 64-bit timestamps. + */ + chan->header_type = 2; /* large */ +#if 0 if (chan->free_event_id < 31) chan->header_type = 1; /* compact */ else chan->header_type = 2; /* large */ +#endif //0 } CMM_ACCESS_ONCE(session->active) = 1; -- 2.34.1