[PATCH 11/32] tracing: Add post-trigger flag to hist trigger command

Tom Zanussi
2017-06-26T22:56:28Z

Add EVENT_CMD_FL_POST_TRIGGER to the hist trigger cmd - it doesn't
affect the hist trigger results, and allows further events such as
synthetic events to be generated from a hist trigger.

Without this change, generating an event from a hist trigger will
cause the generated event to fail a ring buffer trace_recursive_lock()
check and return without actually logging the event.
---
kernel/trace/trace_events_hist.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/kernel/trace/trace_events_hist.c b/kernel/trace/trace_events_hist.c
index fccbffe..dab6ff6 100644
--- a/kernel/trace/trace_events_hist.c
+++ b/kernel/trace/trace_events_hist.c
@@ -1676,7 +1676,7 @@ static int event_hist_trigger_func(struct event_command *cmd_ops,
static struct event_command trigger_hist_cmd = {
.name = "hist",
.trigger_type = ETT_EVENT_HIST,
- .flags = EVENT_CMD_FL_NEEDS_REC,
+ .flags = EVENT_CMD_FL_NEEDS_REC | EVENT_CMD_FL_POST_TRIGGER,
.func = event_hist_trigger_func,
.reg = hist_register_trigger,
.unreg = hist_unregister_trigger,
--
1.9.3