]> 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)
commit27a5a0bd7563e913e4f3a382b50106cd1f55ae0c
treec67dccdfd905a89ab364435840c54a462ab720cb
parent500dc7371946b24d343f5b1beb42ed09fb790a79
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: 91c422d66bfb ("tracing: Add hist trigger support for user-defined sorting ('sort=' param)")
Fixes: 5afd41b3d3d7 ("tracing: Add 'hist' event trigger command")
Fixes: b11444ad20b5 ("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