From 31c12beac8ce45308a787227d1d03217523ac219 Mon Sep 17 00:00:00 2001 From: Mathieu Desnoyers Date: Thu, 26 Jan 2012 12:53:26 -0500 Subject: [PATCH] Revert "Force 64-bit timestamps" This reverts commit aae88c703374f4b1fbb8a5e7e95591bf8ce3e837. This commit was assuming the LTTng 0.x clock management scheme, and does not apply to LTTng 2.0, which does not require a timer. Signed-off-by: Mathieu Desnoyers --- liblttng-ust/ltt-events.c | 10 ++++++++++ liblttng-ust/ltt-ring-buffer-client.h | 2 +- libringbuffer/frontend_api.h | 10 ---------- 3 files changed, 11 insertions(+), 11 deletions(-) diff --git a/liblttng-ust/ltt-events.c b/liblttng-ust/ltt-events.c index 9751089c..ee88b431 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; diff --git a/liblttng-ust/ltt-ring-buffer-client.h b/liblttng-ust/ltt-ring-buffer-client.h index b180b793..a2ace400 100644 --- a/liblttng-ust/ltt-ring-buffer-client.h +++ b/liblttng-ust/ltt-ring-buffer-client.h @@ -365,7 +365,7 @@ static const struct lttng_ust_lib_ring_buffer_config client_config = { .cb.buffer_create = client_buffer_create, .cb.buffer_finalize = client_buffer_finalize, - .tsc_bits = 27, + .tsc_bits = 32, .alloc = RING_BUFFER_ALLOC_PER_CPU, .sync = RING_BUFFER_SYNC_GLOBAL, .mode = RING_BUFFER_MODE_TEMPLATE, diff --git a/libringbuffer/frontend_api.h b/libringbuffer/frontend_api.h index d5a2f2a0..49f6e4c2 100644 --- a/libringbuffer/frontend_api.h +++ b/libringbuffer/frontend_api.h @@ -93,18 +93,8 @@ int lib_ring_buffer_try_reserve(const struct lttng_ust_lib_ring_buffer_config *c */ //prefetch(&buf->commit_hot[subbuf_index(*o_begin, chan)]); - /* - * 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 event headers - * to contain 64-bit timestamps. - */ - ctx->rflags |= RING_BUFFER_RFLAG_FULL_TSC; -#if 0 if (last_tsc_overflow(config, buf, ctx->tsc)) ctx->rflags |= RING_BUFFER_RFLAG_FULL_TSC; -#endif //0 if (caa_unlikely(subbuf_offset(*o_begin, chan) == 0)) return 1; -- 2.34.1