Re: [PATCH 07/11] perf tools report: Support running scripts for current time range
From: Jiri Olsa
Date: Mon Feb 25 2019 - 07:56:01 EST
On Sun, Feb 24, 2019 at 07:37:18AM -0800, Andi Kleen wrote:
> From: Andi Kleen <ak@xxxxxxxxxxxxxxx>
>
> When using the time sort key, add new context menus to run
> scripts for only the currently selected time range. Compute
> the correct range for the selection add pass it as the --time option to
> perf script.
>
> Signed-off-by: Andi Kleen <ak@xxxxxxxxxxxxxxx>
getting compilation error:
CC ui/browsers/hists.o
ui/browsers/hists.c: In function âperf_evsel__hists_browseâ:
ui/browsers/hists.c:2565:8: error: â%sâ directive output may be truncated writing up to 63 bytes into a region of size between 28 and 91 [-Werror=format-truncation=]
n += snprintf(script_opt + n, len - n, " --time %s,%s", start, end);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/stdio.h:862,
from ui/browsers/hists.c:5:
/usr/include/bits/stdio2.h:64:10: note: â__builtin___snprintf_chkâ output between 10 and 136 bytes into a destination of size 100
return __builtin___snprintf_chk (__s, __n, __USE_FORTIFY_LEVEL - 1,
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
__bos (__s), __fmt, __va_arg_pack ());
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
[jolsa@krava perf]$ gcc --version
gcc (GCC) 8.2.1 20181215 (Red Hat 8.2.1-6)
jirka