Hi Tom,
I'm trying to use histogram on a synthetic event, but faced an odd situation.
There is a synthetic event, which has foo and bar.
/sys/kernel/debug/tracing # cat synthetic_events
testevent int foo; int bar
And when I tried to add hist on trigger, both foo and bar can be used as below.
/sys/kernel/debug/tracing # echo "hist:keys=bar" > events/synthetic/testevent/trigger
/sys/kernel/debug/tracing # echo "hist:keys=foo" > events/synthetic/testevent/trigger
And, when I missed to specify the sort key, it failed
/sys/kernel/debug/tracing # echo "hist:keys=foo:sort=bar" > events/synthetic/testevent/trigger
sh: write error: Invalid argument
But no error on error_log file.
/sys/kernel/debug/tracing # cat error_log
/sys/kernel/debug/tracing #
Could you add some error message? What about below?
[ 5422.134656] hist:synthetic:testevent: error: Sort key must be one of keys.
Command: keys=foo;sort=bar
^
Thank you,
--
Masami Hiramatsu <[email protected]>
Hi Masami,
On 6/20/2019 7:17 AM, Masami Hiramatsu wrote:
> Hi Tom,
>
> I'm trying to use histogram on a synthetic event, but faced an odd situation.
>
> There is a synthetic event, which has foo and bar.
>
> /sys/kernel/debug/tracing # cat synthetic_events
> testevent int foo; int bar
>
> And when I tried to add hist on trigger, both foo and bar can be used as below.
>
> /sys/kernel/debug/tracing # echo "hist:keys=bar" > events/synthetic/testevent/trigger
> /sys/kernel/debug/tracing # echo "hist:keys=foo" > events/synthetic/testevent/trigger
>
> And, when I missed to specify the sort key, it failed
>
> /sys/kernel/debug/tracing # echo "hist:keys=foo:sort=bar" > events/synthetic/testevent/trigger
> sh: write error: Invalid argument
>
> But no error on error_log file.
>
> /sys/kernel/debug/tracing # cat error_log
> /sys/kernel/debug/tracing #
>
> Could you add some error message? What about below?
>
> [ 5422.134656] hist:synthetic:testevent: error: Sort key must be one of keys.
> Command: keys=foo;sort=bar
> ^
Sure, I'll submit a fix for this. Thanks for pointing it out.
Tom
> Thank you,
>
>