All of lore.kernel.org
 help / color / mirror / Atom feed
From: "平松雅巳 / HIRAMATU,MASAMI" <masami.hiramatsu.pt@hitachi.com>
To: "'Tom Zanussi'" <tom.zanussi@linux.intel.com>,
	"rostedt@goodmis.org" <rostedt@goodmis.org>
Cc: "namhyung@kernel.org" <namhyung@kernel.org>,
	"josh@joshtriplett.org" <josh@joshtriplett.org>,
	"andi@firstfloor.org" <andi@firstfloor.org>,
	"mathieu.desnoyers@efficios.com" <mathieu.desnoyers@efficios.com>,
	"peterz@infradead.org" <peterz@infradead.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: RE: [PATCH v14 01/22] tracing: Update some tracing_map constants and comments
Date: Thu, 25 Feb 2016 05:55:22 +0000	[thread overview]
Message-ID: <50399556C9727B4D88A595C8584AAB37B4E196E4@GSjpTKYDCembx32.service.hitachi.net> (raw)
In-Reply-To: <fb81a9c771dc75cffa90688627e1d216b59c3add.1456333190.git.tom.zanussi@linux.intel.com>

Hi Tom,

From: Tom Zanussi [mailto:tom.zanussi@linux.intel.com]
>
>Make it clear exactly how many keys and values are supported through
>better defines, and add 1 to the vals count, since normally clients
>want support for at least a hitcount and two other values.

OK, but would that (increment the vals count) be possible to apply
later patch? I think we'd better make this a cleanup patch.

Thank you,

>
>Also, note the error return value for tracing_map_add_key/val_field()
>in the comments.
>
>Signed-off-by: Tom Zanussi <tom.zanussi@linux.intel.com>
>---
> kernel/trace/tracing_map.c | 4 ++--
> kernel/trace/tracing_map.h | 5 +++--
> 2 files changed, 5 insertions(+), 4 deletions(-)
>
>diff --git a/kernel/trace/tracing_map.c b/kernel/trace/tracing_map.c
>index dd6401d..e0f1729 100644
>--- a/kernel/trace/tracing_map.c
>+++ b/kernel/trace/tracing_map.c
>@@ -163,7 +163,7 @@ static int tracing_map_add_field(struct tracing_map *map,
>  * tracing_map_update_sum() or reading it via tracing_map_read_sum().
>  *
>  * Return: The index identifying the field in the map and associated
>- * tracing_map_elts.
>+ * tracing_map_elts, or -EINVAL on error.
>  */
> int tracing_map_add_sum_field(struct tracing_map *map)
> {
>@@ -184,7 +184,7 @@ int tracing_map_add_sum_field(struct tracing_map *map)
>  * the key referenced by this key field resides.
>  *
>  * Return: The index identifying the field in the map and associated
>- * tracing_map_elts.
>+ * tracing_map_elts, or -EINVAL on error.
>  */
> int tracing_map_add_key_field(struct tracing_map *map,
> 			      unsigned int offset,
>diff --git a/kernel/trace/tracing_map.h b/kernel/trace/tracing_map.h
>index 7571825..b575d0b 100644
>--- a/kernel/trace/tracing_map.h
>+++ b/kernel/trace/tracing_map.h
>@@ -5,9 +5,10 @@
> #define TRACING_MAP_BITS_MAX		17
> #define TRACING_MAP_BITS_MIN		7
>
>-#define TRACING_MAP_FIELDS_MAX		4
> #define TRACING_MAP_KEYS_MAX		2
>-
>+#define TRACING_MAP_VALS_MAX		3
>+#define TRACING_MAP_FIELDS_MAX		(TRACING_MAP_KEYS_MAX + \
>+					 TRACING_MAP_VALS_MAX)
> #define TRACING_MAP_SORT_KEYS_MAX	2
>
> typedef int (*tracing_map_cmp_fn_t) (void *val_a, void *val_b);
>--
>1.9.3

  reply	other threads:[~2016-02-25  5:55 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-02-24 18:31 [PATCH 00/22] tracing: 'hist' triggers Tom Zanussi
2016-02-24 18:31 ` [PATCH v14 01/22] tracing: Update some tracing_map constants and comments Tom Zanussi
2016-02-25  5:55   ` 平松雅巳 / HIRAMATU,MASAMI [this message]
2016-02-25 14:54     ` Tom Zanussi
2016-02-24 18:31 ` [PATCH v14 02/22] tracing: Add 'hist' event trigger command Tom Zanussi
2016-02-24 18:31 ` [PATCH v14 03/22] tracing: Add hist trigger support for multiple values ('vals=' param) Tom Zanussi
2016-02-24 18:31 ` [PATCH v14 04/22] tracing: Add hist trigger support for compound keys Tom Zanussi
2016-02-24 18:31 ` [PATCH v14 05/22] tracing: Add hist trigger support for user-defined sorting ('sort=' param) Tom Zanussi
2016-02-24 18:31 ` [PATCH v14 06/22] tracing: Add hist trigger support for pausing and continuing a trace Tom Zanussi
2016-02-24 18:31 ` [PATCH v14 07/22] tracing: Add hist trigger support for clearing " Tom Zanussi
2016-02-24 18:31 ` [PATCH v14 08/22] tracing: Add hist trigger 'hex' modifier for displaying numeric fields Tom Zanussi
2016-02-24 18:31 ` [PATCH v14 09/22] tracing: Add hist trigger 'sym' and 'sym-offset' modifiers Tom Zanussi
2016-02-24 18:31 ` [PATCH v14 10/22] tracing: Add hist trigger 'execname' modifier Tom Zanussi
2016-02-24 18:31 ` [PATCH v14 11/22] tracing: Add hist trigger 'syscall' modifier Tom Zanussi
2016-02-24 18:31 ` [PATCH v14 12/22] tracing: Add hist trigger support for stacktraces as keys Tom Zanussi
2016-02-24 18:31 ` [PATCH v14 13/22] tracing: Support string type key properly Tom Zanussi
2016-02-24 18:31 ` [PATCH v14 14/22] tracing: Remove restriction on string position in hist trigger keys Tom Zanussi
2016-02-24 18:31 ` [PATCH v14 15/22] tracing: Add enable_hist/disable_hist triggers Tom Zanussi
2016-02-24 18:31 ` [PATCH v14 16/22] tracing: Add 'hist' trigger Documentation Tom Zanussi
2016-02-24 18:31 ` [PATCH v14 17/22] tracing: Add support for multiple hist triggers per event Tom Zanussi
2016-02-24 18:31 ` [PATCH v14 18/22] tracing: Add support for named triggers Tom Zanussi
2016-02-24 18:31 ` [PATCH v14 19/22] tracing: Add support for named hist triggers Tom Zanussi
2016-02-24 18:31 ` [PATCH v14 20/22] kselftests/ftrace : Add event trigger testcases Tom Zanussi
2016-02-24 18:31 ` [PATCH v14 21/22] kselftests/ftrace: Add hist " Tom Zanussi
2016-02-24 18:31 ` [PATCH v14 22/22] tracing: Add hist trigger 'log2' modifier Tom Zanussi
2016-02-25  9:19 ` [PATCH] kselftests/ftrace: Add a test for log2 modifier of hist trigger Masami Hiramatsu
2016-02-25 14:56   ` 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=50399556C9727B4D88A595C8584AAB37B4E196E4@GSjpTKYDCembx32.service.hitachi.net \
    --to=masami.hiramatsu.pt@hitachi.com \
    --cc=andi@firstfloor.org \
    --cc=josh@joshtriplett.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mathieu.desnoyers@efficios.com \
    --cc=namhyung@kernel.org \
    --cc=peterz@infradead.org \
    --cc=rostedt@goodmis.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.