Skip to contentSkip to conversation

ring-buffer: Remove unused absolute timestamp mode

PATCH New Vincent Donnefort 1 participant 3 messages Nov 26

Subsystems (4)
lore
Share & tools
lore

Vincent Donnefort

author maintainer
#0 lore raw

v2 cover ring-buffer: Remove unused absolute timestamp mode

Since commit b94bc80df648 ("tracing: Use a no_filter_buffering_ref to stop using the filter buffer"), nothing enables buffer-wide absolute timestamps on the ring buffer and userspace has no interface to set it.

This series remove that dead code.

Changelog:

v2:
* Drop the tracefs timestamp_mode file and its documentation. (Steven)
* Rebase on 7.4-rc4.

v1 (https://lore.kernel.org/all/[email protected]/)

Vincent Donnefort (2):
ring-buffer: Remove unused absolute timestamp mode tracing/histograms: Drop stale absolute timestamp note from docs

 Documentation/trace/ftrace.rst    | 24 ----------
 Documentation/trace/histogram.rst | 11 ++---
 include/linux/ring_buffer.h       |  2 -
 kernel/trace/ring_buffer.c        | 77 +++++++++----------------------
 kernel/trace/trace.c              | 43 -----------------
 5 files changed, 26 insertions(+), 131 deletions(-)

base-commit: b6a9fa34ce4187cb69d3c588a4bbffc31ce5db8f

Signature · 1 line
2.56.1.839.g22a8290db9-goog
author maintainer
#1 lore raw

PATCH v2 1/2 ring-buffer: Remove unused absolute timestamp mode

Since commit b94bc80df648 ("tracing: Use a no_filter_buffering_ref to stop using the filter buffer") dropped the last user of ring_buffer_set_time_stamp_abs(), there's been no one enabling absolute timestamps on the ring buffer.

Drop the support to simplify the ring buffer code, along with the tracefs timestamp_mode file and its documentation.

---
 Documentation/trace/ftrace.rst | 24 -----------
 include/linux/ring_buffer.h    |  2 -
 kernel/trace/ring_buffer.c     | 77 ++++++++++------------------------
 kernel/trace/trace.c           | 43 -------------------
 4 files changed, 21 insertions(+), 125 deletions(-)
Documentation/trace/ftrace.rst +0 -24
index 9423722848c6..f42f4e483709 100644
@@ -710,30 +710,6 @@ of ftrace. Here is a list of some of the key files:
 
 	See events.rst for more information.
 
-  timestamp_mode:
-
-	Certain tracers may change the timestamp mode used when
-	logging trace events into the event buffer.  Events with
-	different modes can coexist within a buffer but the mode in
-	effect when an event is logged determines which timestamp mode
-	is used for that event.  The default timestamp mode is
-	'delta'.
-
-	Usual timestamp modes for tracing:
-
-	  # cat timestamp_mode
-	  [delta] absolute
-
-	  The timestamp mode with the square brackets around it is the
-	  one in effect.
-
-	  delta: Default timestamp mode - timestamp is a delta against
-	         a per-buffer timestamp.
-
-	  absolute: The timestamp is a full timestamp, not a delta
-                 against some other value.  As such it takes up more
-                 space and is less efficient.
-
   hwlat_detector:
 
 	Directory for the Hardware Latency Detector.
include/linux/ring_buffer.h +0 -2
index 649b2276b557..378d336effca 100644
@@ -220,8 +220,6 @@ void ring_buffer_normalize_time_stamp(struct trace_buffer *buffer,
 				      int cpu, u64 *ts);
 void ring_buffer_set_clock(struct trace_buffer *buffer,
 			   u64 (*clock)(void));
-void ring_buffer_set_time_stamp_abs(struct trace_buffer *buffer, bool abs);
-bool ring_buffer_time_stamp_abs(struct trace_buffer *buffer);
 
 size_t ring_buffer_nr_dirty_pages(struct trace_buffer *buffer, int cpu);
 
kernel/trace/ring_buffer.c +21 -56

157 lines not on this page · raw message

kernel/trace/trace.c +0 -43

67 lines not on this page · raw message

Signature · 1 line
2.56.1.839.g22a8290db9-goog
author maintainer
#2 lore raw

PATCH v2 2/2 tracing/histograms: Drop stale absolute timestamp note from docs

In reply to Vincent Donnefort

Since commit b94bc80df648 ("tracing: Use a no_filter_buffering_ref to stop using the filter buffer") stopped using absolute timestamp for the histograms, the paragraph about timestamps has been stale. Update it.

---
 Documentation/trace/histogram.rst | 11 +++++------
 1 file changed, 5 insertions(+), 6 deletions(-)
Documentation/trace/histogram.rst +5 -6
index 97b67f05f5ea..9b301b86a4df 100644
@@ -1676,12 +1676,11 @@ features have been added to the hist trigger support:
 
 A note on inter-event timestamps: If common_timestamp is used in a
 histogram, the trace buffer is automatically switched over to using
-absolute timestamps and the "global" trace clock, in order to avoid
-bogus timestamp differences with other clocks that aren't coherent
-across CPUs.  This can be overridden by specifying one of the other
-trace clocks instead, using the "clock=XXX" hist trigger attribute,
-where XXX is any of the clocks listed in the tracing/trace_clock
-pseudo-file.
+the "global" trace clock, in order to avoid bogus timestamp
+differences with other clocks that aren't coherent across CPUs. This
+can be overridden by specifying one of the other trace clocks instead,
+using the "clock=XXX" hist trigger attribute, where XXX is any of the
+clocks listed in the tracing/trace_clock pseudo-file.
 
 These features are described in more detail in the following sections.
 
Signature · 1 line
2.56.1.839.g22a8290db9-goog