]> git.baikalelectronics.ru Git - kernel.git/commit
tracing: Simplify assignment parsing for hist triggers
authorTom Zanussi <zanussi@kernel.org>
Fri, 28 Jun 2019 17:40:20 +0000 (12:40 -0500)
committerSteven Rostedt (VMware) <rostedt@goodmis.org>
Wed, 29 Jan 2020 04:16:27 +0000 (23:16 -0500)
commit99584dec0c84fface6c0f2567e2f3fcb1560b7da
treec67dccdfd905a89ab364435840c54a462ab720cb
parentab5bc8d4e978eb636693f44114e23399e7c93a17
tracing: Simplify assignment parsing for hist triggers

In the process of adding better error messages for sorting, I realized
that strsep was being used incorrectly and some of the error paths I
was expecting to be hit weren't and just fell through to the common
invalid key error case.

It also became obvious that for keyword assignments, it wasn't
necessary to save the full assignment and reparse it later, and having
a common empty-assignment check would also make more sense in terms of
error processing.

Change the code to fix these problems and simplify it for new error
message changes in a subsequent patch.

Link: http://lkml.kernel.org/r/1c3ef0b6655deaf345f6faee2584a0298ac2d743.1561743018.git.zanussi@kernel.org
Fixes: da8311dc8902 ("tracing: Add hist trigger support for user-defined sorting ('sort=' param)")
Fixes: febedee9e830 ("tracing: Add 'hist' event trigger command")
Fixes: 6bcad730cacf ("tracing: Add a clock attribute for hist triggers")
Reported-by: Masami Hiramatsu <mhiramat@kernel.org>
Reviewed-by: Masami Hiramatsu <mhiramat@kernel.org>
Signed-off-by: Tom Zanussi <zanussi@kernel.org>
Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
kernel/trace/trace_events_hist.c