From: kernel test robot <lkp@intel.com>
To: kbuild-all@lists.01.org
Subject: Re: [PATCH v2 02/10] tracing/boot: Add per-event histogram action options
Date: Tue, 10 Aug 2021 03:19:50 +0800 [thread overview]
Message-ID: <202108100314.iXabVs0e-lkp@intel.com> (raw)
In-Reply-To: <162852408422.143877.5430352080751791322.stgit@devnote2>
[-- Attachment #1: Type: text/plain, Size: 5580 bytes --]
Hi Masami,
I love your patch! Perhaps something to improve:
[auto build test WARNING on trace/for-next]
[also build test WARNING on linux/master linus/master v5.14-rc5 next-20210809]
[cannot apply to tip/perf/core]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]
url: https://github.com/0day-ci/linux/commits/Masami-Hiramatsu/tracing-boot-Add-histogram-syntax-support-in-boot-time-tracing/20210809-235246
base: https://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace.git for-next
config: i386-randconfig-r014-20210809 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
reproduce (this is a W=1 build):
# https://github.com/0day-ci/linux/commit/f9498294f1e13e2ee4a0a6bec385e74f6603d633
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Masami-Hiramatsu/tracing-boot-Add-histogram-syntax-support-in-boot-time-tracing/20210809-235246
git checkout f9498294f1e13e2ee4a0a6bec385e74f6603d633
# save the attached .config to linux build tree
make W=1 ARCH=i386
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
All warnings (new ones prefixed by >>):
kernel/trace/trace_boot.c: In function 'trace_boot_compose_hist_cmd':
>> kernel/trace/trace_boot.c:357:34: warning: passing argument 3 of 'append_str_nospace' discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
357 | append_str_nospace(&buf, end, p);
| ^
kernel/trace/trace_boot.c:198:50: note: expected 'char *' but argument is of type 'const char *'
198 | append_str_nospace(char **bufp, char *end, char *str)
| ~~~~~~^~~
vim +357 kernel/trace/trace_boot.c
296
297 /*
298 * Histogram boottime tracing syntax.
299 *
300 * ftrace.[instance.INSTANCE.]event.GROUP.EVENT.hist {
301 * keys = <KEY>[,...]
302 * values = <VAL>[,...]
303 * sort = <SORT-KEY>[,...]
304 * size = <ENTRIES>
305 * name = <HISTNAME>
306 * var { <VAR> = <EXPR> ... }
307 * pause|continue|clear
308 * onmax|onchange { var = <VAR>; <ACTION> [= <PARAM>] }
309 * onmatch { event = <EVENT>; <ACTION> [= <PARAM>] }
310 * filter = <FILTER>
311 * }
312 *
313 * Where <ACTION> are;
314 *
315 * trace = <EVENT>, <ARG1>[, ...]
316 * save = <ARG1>[, ...]
317 * snapshot
318 */
319 static int __init
320 trace_boot_compose_hist_cmd(struct xbc_node *hnode, char *buf, size_t size)
321 {
322 struct xbc_node *node, *knode;
323 char *end = buf + size;
324 const char *p;
325 int ret = 0;
326
327 append_printf(&buf, end, "hist");
328
329 ret = trace_boot_hist_add_array(hnode, &buf, end, "keys");
330 if (ret < 0) {
331 if (ret == -ENOENT)
332 pr_err("hist requires keys.\n");
333 return -EINVAL;
334 }
335
336 ret = trace_boot_hist_add_array(hnode, &buf, end, "values");
337 if (ret == -EINVAL)
338 return ret;
339 ret = trace_boot_hist_add_array(hnode, &buf, end, "sort");
340 if (ret == -EINVAL)
341 return ret;
342
343 p = xbc_node_find_value(hnode, "size", NULL);
344 if (p)
345 append_printf(&buf, end, ":size=%s", p);
346
347 p = xbc_node_find_value(hnode, "name", NULL);
348 if (p)
349 append_printf(&buf, end, ":name=%s", p);
350
351 node = xbc_node_find_child(hnode, "var");
352 if (node) {
353 xbc_node_for_each_key_value(node, knode, p) {
354 /* Expression must not include spaces. */
355 append_printf(&buf, end, ":%s=",
356 xbc_node_get_data(knode));
> 357 append_str_nospace(&buf, end, p);
358 }
359 }
360
361 /* Histogram control attributes (mutual exclusive) */
362 if (xbc_node_find_child(hnode, "pause"))
363 append_printf(&buf, end, ":pause");
364 else if (xbc_node_find_child(hnode, "continue"))
365 append_printf(&buf, end, ":continue");
366 else if (xbc_node_find_child(hnode, "clear"))
367 append_printf(&buf, end, ":clear");
368
369 /* Histogram handler and actions */
370 node = xbc_node_find_child(hnode, "onmax");
371 if (node && trace_boot_hist_add_handler(node, &buf, end, "var") < 0)
372 return -EINVAL;
373 node = xbc_node_find_child(hnode, "onchange");
374 if (node && trace_boot_hist_add_handler(node, &buf, end, "var") < 0)
375 return -EINVAL;
376 node = xbc_node_find_child(hnode, "onmatch");
377 if (node && trace_boot_hist_add_handler(node, &buf, end, "event") < 0)
378 return -EINVAL;
379
380 p = xbc_node_find_value(hnode, "filter", NULL);
381 if (p)
382 append_printf(&buf, end, " if %s", p);
383
384 if (buf == end) {
385 pr_err("hist exceeds the max command length.\n");
386 return -E2BIG;
387 }
388
389 return 0;
390 }
391 #else
392 static int __init
393 trace_boot_compose_hist_cmd(struct xbc_node *hnode, char *buf, size_t size)
394 {
395 return -EOPNOTSUPP;
396 }
397 #endif
398
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 35744 bytes --]
next prev parent reply other threads:[~2021-08-09 19:19 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-08-09 15:47 [PATCH v2 00/10] tracing/boot: Add histogram syntax support in boot-time tracing Masami Hiramatsu
2021-08-09 15:47 ` [PATCH v2 01/10] tracing/boot: Fix a hist trigger dependency for boot time tracing Masami Hiramatsu
2021-08-09 15:48 ` [PATCH v2 02/10] tracing/boot: Add per-event histogram action options Masami Hiramatsu
2021-08-09 19:19 ` kernel test robot [this message]
2021-08-10 0:33 ` Masami Hiramatsu
2021-08-09 15:48 ` [PATCH v2 03/10] tracing/boot: Support multiple handlers for per-event histogram Masami Hiramatsu
2021-08-09 15:48 ` [PATCH v2 04/10] tracing/boot: Support multiple histograms for each event Masami Hiramatsu
2021-08-09 15:48 ` [PATCH v2 05/10] tracing/boot: Show correct histogram error command Masami Hiramatsu
2021-08-10 0:48 ` Masami Hiramatsu
2021-08-09 15:48 ` [PATCH v2 06/10] Documentation: tracing: Add histogram syntax to boot-time tracing Masami Hiramatsu
2021-08-09 15:48 ` [PATCH v2 07/10] tools/bootconfig: Support per-group/all event enabling option Masami Hiramatsu
2021-08-09 15:48 ` [PATCH v2 08/10] tools/bootconfig: Add histogram syntax support to bconf2ftrace.sh Masami Hiramatsu
2021-08-09 15:48 ` [PATCH v2 09/10] tools/bootconfig: Use per-group/all enable option in ftrace2bconf script Masami Hiramatsu
2021-08-09 15:49 ` [PATCH v2 10/10] bootconfig/tracing/ktest: Update ktest example for boot-time tracing Masami Hiramatsu
2021-08-09 23:38 ` [PATCH v2 00/10] tracing/boot: Add histogram syntax support in " Masami Hiramatsu
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=202108100314.iXabVs0e-lkp@intel.com \
--to=lkp@intel.com \
--cc=kbuild-all@lists.01.org \
/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.