mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-08-27 11:19:37 +00:00
tracing: Fix output of top level event "enable" file
When writing a tool for enabling events in the tracing system, an anomaly was discovered. The top level event "enable" file would never show "1" when all events were enabled. The system and event "enable" files worked as expected. The reason was because the top level event "enable" file included the "ftrace" tracer events, which are not controlled by the "enable" file and would cause the output to be wrong. This appears to have been a bug since it was created. -----BEGIN PGP SIGNATURE----- iIoEABYIADIWIQRRSw7ePDh/lE+zeZMp5XQQmuv6qgUCYCGOmxQccm9zdGVkdEBn b29kbWlzLm9yZwAKCRAp5XQQmuv6qhDFAQDjSrHmSC0ziTck9QMXSUdxLs0gjENr R0n5WPZ/mRboxQD/aWlw99TnuSwFDzB0gTlwDuDd1Ge2snqqmFCRTscU7gE= =Pig3 -----END PGP SIGNATURE----- Merge tag 'trace-v5.11-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace Pull tracing fix from Steven Rostedt: "Fix output of top level event tracing 'enable' file. When writing a tool for enabling events in the tracing system, an anomaly was discovered. The top level event 'enable' file would never show '1' when all events were enabled. The system and event 'enable' files worked as expected. The reason was because the top level event 'enable' file included the 'ftrace' tracer events, which are not controlled by the 'enable' file and would cause the output to be wrong. This appears to have been a bug since it was created" * tag 'trace-v5.11-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace: tracing: Do not count ftrace events in top level enable output
This commit is contained in:
commit
e0756cfc7d
1 changed files with 2 additions and 1 deletions
|
@ -1212,7 +1212,8 @@ system_enable_read(struct file *filp, char __user *ubuf, size_t cnt,
|
||||||
mutex_lock(&event_mutex);
|
mutex_lock(&event_mutex);
|
||||||
list_for_each_entry(file, &tr->events, list) {
|
list_for_each_entry(file, &tr->events, list) {
|
||||||
call = file->event_call;
|
call = file->event_call;
|
||||||
if (!trace_event_name(call) || !call->class || !call->class->reg)
|
if ((call->flags & TRACE_EVENT_FL_IGNORE_ENABLE) ||
|
||||||
|
!trace_event_name(call) || !call->class || !call->class->reg)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
if (system && strcmp(call->class->system, system->name) != 0)
|
if (system && strcmp(call->class->system, system->name) != 0)
|
||||||
|
|
Loading…
Reference in a new issue