Skip to content

Commit f60227f

Browse files
glemcorostedt
authored andcommitted
tools/rv: Do not skip idle in trace
Currently, the userspace RV tool skips trace events triggered by the RV tool itself, this can be changed by passing the parameter -s, which sets the variable config_my_pid to 0 (instead of the tool's PID). This has the side effect of skipping events generated by idle (PID 0). Set config_my_pid to -1 (an invalid pid) to avoid skipping idle. Cc: Nam Cao <namcao@linutronix.de> Cc: Tomas Glozar <tglozar@redhat.com> Cc: Juri Lelli <jlelli@redhat.com> Cc: Clark Williams <williams@redhat.com> Cc: John Kacur <jkacur@redhat.com> Link: https://lore.kernel.org/20250723161240.194860-2-gmonaco@redhat.com Fixes: 6d60f89 ("tools/rv: Add in-kernel monitor interface") Signed-off-by: Gabriele Monaco <gmonaco@redhat.com> Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>
1 parent f3735df commit f60227f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

tools/verification/rv/src/in_kernel.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -431,7 +431,7 @@ ikm_event_handler(struct trace_seq *s, struct tep_record *record,
431431

432432
if (config_has_id && (config_my_pid == id))
433433
return 0;
434-
else if (config_my_pid && (config_my_pid == pid))
434+
else if (config_my_pid == pid)
435435
return 0;
436436

437437
tep_print_event(trace_event->tep, s, record, "%16s-%-8d [%.3d] ",
@@ -734,7 +734,7 @@ static int parse_arguments(char *monitor_name, int argc, char **argv)
734734
config_reactor = optarg;
735735
break;
736736
case 's':
737-
config_my_pid = 0;
737+
config_my_pid = -1;
738738
break;
739739
case 't':
740740
config_trace = 1;

0 commit comments

Comments
 (0)