linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Steven Rostedt <rostedt@goodmis.org>
To: Tom Zanussi <tom.zanussi@linux.intel.com>
Cc: daniel.wagner@bmw-carit.de, masami.hiramatsu.pt@hitachi.com,
	namhyung@kernel.org, josh@joshtriplett.org, andi@firstfloor.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH v7 06/10] trace: Add lock-free tracing_map
Date: Fri, 12 Jun 2015 14:17:31 -0400	[thread overview]
Message-ID: <20150612141731.01232907@gandalf.local.home> (raw)
In-Reply-To: <e025909c160df379949ea3fb80c76d43a8116587.1433797842.git.tom.zanussi@linux.intel.com>

On Mon,  8 Jun 2015 16:32:05 -0500
Tom Zanussi <tom.zanussi@linux.intel.com> wrote:

> Add tracing_map, a special-purpose lock-free map for tracing.
> 
> tracing_map is designed to aggregate or 'sum' one or more values
> associated with a specific object of type tracing_map_elt, which

What is "elt"? I don't see it explained anywhere.


> is associated by the map to a given key.
> 
> It provides various hooks allowing per-tracer customization and is
> separated out into a separate file in order to allow it to be shared
> between multiple tracers, but isn't meant to be generally used outside
> of that context.
> 
> The tracing_map implementation was inspired by lock-free map
> algorithms originated by Dr. Cliff Click:
> 
>  http://www.azulsystems.com/blog/cliff/2007-03-26-non-blocking-hashtable
>  http://www.azulsystems.com/events/javaone_2007/2007_LockFreeHash.pdf
> 
> Signed-off-by: Tom Zanussi <tom.zanussi@linux.intel.com>


> +/**
> + * tracing_map_update_sum - Add a value to a tracing_map_elt's sum
> + * @elt: The tracing_map_elt

Not a very useful comment, as I have no idea what "elt" is.

I'll continue to review this patch about the mysterious element "elt".

-- Steve

> + * @i: The index of the given sum associated with the tracing_map_elt
> + * @n: The value to add to the sum
> + *
> + * Add n to sum i associated with the specified tracing_map_elt
> + * instance.  The index i is the index returned by the call to
> + * tracing_map_add_sum_field() when the tracing map was set up.
> + */
> +void tracing_map_update_sum(struct tracing_map_elt *elt, unsigned int i, u64 n)
> +{
> +	atomic64_add(n, &elt->fields[i].sum);
> +}
> +


  reply	other threads:[~2015-06-12 18:17 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-06-08 21:31 [PATCH v7 00/10] tracing: 'hist' triggers Tom Zanussi
2015-06-08 21:32 ` [PATCH v3 01/10] tracing: Update cond flag when enabling or disabling a trigger Tom Zanussi
2015-06-12 18:01   ` Steven Rostedt
2015-06-13  8:45     ` Daniel Wagner
2015-06-15  7:02       ` Daniel Wagner
2015-06-29 20:25     ` Tom Zanussi
2015-06-08 21:32 ` [PATCH v7 02/10] tracing: Make ftrace_event_field checking functions available Tom Zanussi
2015-06-08 21:32 ` [PATCH v7 03/10] tracing: Add event record param to trigger_ops.func() Tom Zanussi
2015-06-08 21:32 ` [PATCH v7 04/10] tracing: Add get_syscall_name() Tom Zanussi
2015-06-08 21:32 ` [PATCH v7 05/10] tracing: Add a per-event-trigger 'paused' field Tom Zanussi
2015-06-08 21:32 ` [PATCH v7 06/10] trace: Add lock-free tracing_map Tom Zanussi
2015-06-12 18:17   ` Steven Rostedt [this message]
2015-06-29 20:19     ` Tom Zanussi
2015-06-12 20:47   ` Steven Rostedt
2015-06-12 20:52   ` Steven Rostedt
2015-06-29 20:33     ` Tom Zanussi
2015-06-08 21:32 ` [PATCH v7 07/10] tracing: Add 'hist' event trigger command Tom Zanussi
2015-06-10 14:14   ` Masami Hiramatsu
2015-06-10 16:32     ` Tom Zanussi
2015-06-08 21:32 ` [PATCH v7 08/10] tracing: Add enable_hist/disable_hist triggers Tom Zanussi
2015-06-08 21:32 ` [PATCH v7 09/10] tracing: Add 'hist' trigger Documentation Tom Zanussi
2015-06-08 21:32 ` [PATCH v3 10/10] ftrace: Add function_hist tracer Tom Zanussi
2015-06-10  2:57 ` [PATCH v7 00/10] tracing: 'hist' triggers Masami Hiramatsu
2015-06-11  3:05 ` Namhyung Kim
2015-06-11 20:42   ` Tom Zanussi

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=20150612141731.01232907@gandalf.local.home \
    --to=rostedt@goodmis.org \
    --cc=andi@firstfloor.org \
    --cc=daniel.wagner@bmw-carit.de \
    --cc=josh@joshtriplett.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=masami.hiramatsu.pt@hitachi.com \
    --cc=namhyung@kernel.org \
    --cc=tom.zanussi@linux.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).