linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Namhyung Kim <namhyung@kernel.org>
To: Tom Zanussi <tom.zanussi@linux.intel.com>
Cc: rostedt@goodmis.org, tglx@linutronix.de, mhiramat@kernel.org,
	vedang.patel@intel.com, bigeasy@linutronix.de,
	joel.opensrc@gmail.com, joelaf@google.com,
	mathieu.desnoyers@efficios.com, baohong.liu@intel.com,
	rajvi.jingar@intel.com, julia@ni.com,
	linux-kernel@vger.kernel.org, linux-rt-users@vger.kernel.org,
	kernel-team@lge.com
Subject: Re: [PATCH v4 06/37] ring-buffer: Redefine the unimplemented RINGBUF_TYPE_TIME_STAMP
Date: Mon, 6 Nov 2017 14:09:53 +0900	[thread overview]
Message-ID: <20171106050953.GA7557@sejong> (raw)
In-Reply-To: <8927a4736dc6f602079d0797b60d3bf7a5d2d9d7.1509395595.git.tom.zanussi@linux.intel.com>

Hi Tom,

On Mon, Oct 30, 2017 at 03:51:48PM -0500, Tom Zanussi wrote:
> RINGBUF_TYPE_TIME_STAMP is defined but not used, and from what I can
> gather was reserved for something like an absolute timestamp feature
> for the ring buffer, if not a complete replacement of the current
> time_delta scheme.
> 
> This code redefines RINGBUF_TYPE_TIME_STAMP to implement absolute time
> stamps.  Another way to look at it is that it essentially forces
> extended time_deltas for all events.
> 
> The motivation for doing this is to enable time_deltas that aren't
> dependent on previous events in the ring buffer, making it feasible to
> use the ring_buffer_event timetamps in a more random-access way, for
> purposes other than serial event printing.
> 
> To set/reset this mode, use tracing_set_timestamp_abs() from the
> previous interface patch.
> 
> Signed-off-by: Tom Zanussi <tom.zanussi@linux.intel.com>
> ---

[SNIP]
> @@ -2220,13 +2246,16 @@ static void rb_inc_iter(struct ring_buffer_iter *iter)
>  }
>  
>  /* Slow path, do not inline */
> -static noinline struct ring_buffer_event *
> +static struct noinline ring_buffer_event *

struct noinline?  Looks like a mistake..

Thanks,
Namhyung


> -rb_add_time_stamp(struct ring_buffer_event *event, u64 delta)
> +rb_add_time_stamp(struct ring_buffer_event *event, u64 delta, bool abs)
>  {
> -	event->type_len = RINGBUF_TYPE_TIME_EXTEND;
> +	if (abs)
> +		event->type_len = RINGBUF_TYPE_TIME_STAMP;
> +	else
> +		event->type_len = RINGBUF_TYPE_TIME_EXTEND;
>  
> -	/* Not the first event on the page? */
> -	if (rb_event_index(event)) {
> +	/* Not the first event on the page, or not delta? */
> +	if (abs || rb_event_index(event)) {
>  		event->time_delta = delta & TS_MASK;
>  		event->array[0] = delta >> TS_SHIFT;
>  	} else {

  reply	other threads:[~2017-11-06  5:09 UTC|newest]

Thread overview: 42+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-10-30 20:51 [PATCH v4 00/37] tracing: Inter-event (e.g. latency) support Tom Zanussi
2017-10-30 20:51 ` [PATCH v4 01/37] tracing: Move hist trigger Documentation to histogram.txt Tom Zanussi
2017-10-30 20:51 ` [PATCH v4 02/37] tracing: Add Documentation for log2 modifier Tom Zanussi
2017-10-30 20:51 ` [PATCH v4 03/37] tracing: Add support to detect and avoid duplicates Tom Zanussi
2017-10-30 20:51 ` [PATCH v4 04/37] tracing: Remove code which merges duplicates Tom Zanussi
2017-10-30 20:51 ` [PATCH v4 05/37] ring-buffer: Add interface for setting absolute time stamps Tom Zanussi
2017-10-30 20:51 ` [PATCH v4 06/37] ring-buffer: Redefine the unimplemented RINGBUF_TYPE_TIME_STAMP Tom Zanussi
2017-11-06  5:09   ` Namhyung Kim [this message]
2017-11-06 15:52     ` Tom Zanussi
2017-10-30 20:51 ` [PATCH v4 07/37] tracing: Add timestamp_mode trace file Tom Zanussi
2017-10-30 20:51 ` [PATCH v4 08/37] tracing: Give event triggers access to ring_buffer_event Tom Zanussi
2017-10-30 20:51 ` [PATCH v4 09/37] tracing: Add ring buffer event param to hist field functions Tom Zanussi
2017-10-30 20:51 ` [PATCH v4 10/37] tracing: Break out hist trigger assignment parsing Tom Zanussi
2017-10-30 20:51 ` [PATCH v4 11/37] tracing: Add hist trigger timestamp support Tom Zanussi
2017-10-30 20:51 ` [PATCH v4 12/37] tracing: Add per-element variable support to tracing_map Tom Zanussi
2017-10-30 20:51 ` [PATCH v4 13/37] tracing: Add hist_data member to hist_field Tom Zanussi
2017-10-30 20:51 ` [PATCH v4 14/37] tracing: Add usecs modifier for hist trigger timestamps Tom Zanussi
2017-10-30 20:51 ` [PATCH v4 15/37] tracing: Add variable support to hist triggers Tom Zanussi
2017-10-30 20:51 ` [PATCH v4 16/37] tracing: Account for variables in named trigger compatibility Tom Zanussi
2017-10-30 20:51 ` [PATCH v4 17/37] tracing: Move get_hist_field_flags() Tom Zanussi
2017-10-30 20:52 ` [PATCH v4 18/37] tracing: Add simple expression support to hist triggers Tom Zanussi
2017-10-30 20:52 ` [PATCH v4 19/37] tracing: Generalize per-element hist trigger data Tom Zanussi
2017-10-30 20:52 ` [PATCH v4 20/37] tracing: Pass tracing_map_elt to hist_field accessor functions Tom Zanussi
2017-10-30 20:52 ` [PATCH v4 21/37] tracing: Add hist_field 'type' field Tom Zanussi
2017-10-30 20:52 ` [PATCH v4 22/37] tracing: Add variable reference handling to hist triggers Tom Zanussi
2017-10-30 20:52 ` [PATCH v4 23/37] tracing: Add hist trigger action hook Tom Zanussi
2017-10-30 20:52 ` [PATCH v4 24/37] tracing: Add support for 'synthetic' events Tom Zanussi
2017-10-30 20:52 ` [PATCH v4 25/37] tracing: Add support for 'field variables' Tom Zanussi
2017-10-30 20:52 ` [PATCH v4 26/37] tracing: Add 'onmatch' hist trigger action support Tom Zanussi
2017-10-30 20:52 ` [PATCH v4 27/37] tracing: Add 'onmax' " Tom Zanussi
2017-10-30 20:52 ` [PATCH v4 28/37] tracing: Allow whitespace to surround hist trigger filter Tom Zanussi
2017-10-30 20:52 ` [PATCH v4 29/37] tracing: Add cpu field for hist triggers Tom Zanussi
2017-10-30 20:52 ` [PATCH v4 30/37] tracing: Add hist trigger support for variable reference aliases Tom Zanussi
2017-10-30 20:52 ` [PATCH v4 31/37] tracing: Add 'last error' error facility for hist triggers Tom Zanussi
2017-10-30 20:52 ` [PATCH v4 32/37] tracing: Add inter-event hist trigger Documentation Tom Zanussi
2017-10-30 20:52 ` [PATCH v4 33/37] tracing: Make tracing_set_clock() non-static Tom Zanussi
2017-10-30 20:52 ` [PATCH v4 34/37] tracing: Add a clock attribute for hist triggers Tom Zanussi
2017-10-30 20:52 ` [PATCH v4 35/37] tracing: Increase trace_recursive_lock() limit for synthetic events Tom Zanussi
2017-10-30 20:52 ` [PATCH v4 36/37] tracing: Add inter-event blurb to HIST_TRIGGERS config option Tom Zanussi
2017-10-30 20:52 ` [PATCH v4 37/37] selftests: ftrace: Add inter-event hist triggers testcases Tom Zanussi
2017-10-31 14:29   ` Masami Hiramatsu
2017-10-31 20:40     ` Jingar, Rajvi

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=20171106050953.GA7557@sejong \
    --to=namhyung@kernel.org \
    --cc=baohong.liu@intel.com \
    --cc=bigeasy@linutronix.de \
    --cc=joel.opensrc@gmail.com \
    --cc=joelaf@google.com \
    --cc=julia@ni.com \
    --cc=kernel-team@lge.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-rt-users@vger.kernel.org \
    --cc=mathieu.desnoyers@efficios.com \
    --cc=mhiramat@kernel.org \
    --cc=rajvi.jingar@intel.com \
    --cc=rostedt@goodmis.org \
    --cc=tglx@linutronix.de \
    --cc=tom.zanussi@linux.intel.com \
    --cc=vedang.patel@intel.com \
    /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).