History

tracing: Dump stacktrace trigger to the corresponding instance

The stacktrace event trigger is not dumping the stacktrace to the instance where it was enabled, but to the global "instance." Use the private_data, pointing to the trigger file, to figure out the corresponding trace instance, and use it in the trigger action, like snapshot_trigger does. Link: https://lkml.kernel.org/r/afbb0b4f18ba92c276865bc97204d438473f4ebc.1645396236.git.bristot@kernel.org

Daniel Bristot de Oliveira committed 4 years ago

Commit ce33c841 parent 7414db41 file · +6 −1Browse files

Showing the changes to kernel (1 of 1 file). Show all

Unified · Split

kernel/trace/trace_events_trigger.c+6−1
@@ -1540,7 +1540,12 @@ stacktrace_trigger(struct event_trigger_data *data, · 1539 unmodified lines
15401540 struct trace_buffer *buffer, void *rec,
15411541 struct ring_buffer_event *event)
15421542 {
1543− trace_dump_stack(STACK_SKIP);
1543+ struct trace_event_file *file = data->private_data;
1544+
1545+ if (file)
1546+ __trace_stack(file->tr, tracing_gen_ctx(), STACK_SKIP);
1547+ else
1548+ trace_dump_stack(STACK_SKIP);
15441549 }
15451550
15461551 static void

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t