perf daemon: Add 'signal' command
Allow the 'perf daemon' to send SIGUSR2 to all running sessions or just to a specific session. Example: # cat ~/.perfconfig [daemon] base=/opt/perfdata [session-cycles] run = -m 10M -e cycles --overwrite --switch-output -a [session-sched] run = -m 20M -e sched:* --overwrite --switch-output -a Start the daemon: # perf daemon start Send signal to all running sessions: # perf daemon signal signal 12 sent to session 'cycles [773738]' signal 12 sent to session 'sched [773739]' Or to specific one: # perf daemon signal --session sched signal 12 sent to session 'sched [773739]' And verify signals were delivered and perf.data dumped: # cat /opt/perfdata/session-cycles/output rounding mmap pages size to 32M (8192 pages) [ perf record: dump data: Woken up 1 times ] [ perf record: Dump perf.data.2021010220382490 ] # car /opt/perfdata/session-sched/output rounding mmap pages size to 32M (8192 pages) [ perf record: dump data: Woken up 1 times ] [ perf record: Dump perf.data.2021010220382489 ] [ perf record: dump data: Woken up 1 times ] [ perf record: Dump perf.data.2021010220393745 ] Signed-off-by: Jiri Olsa <jolsa@kernel.org> Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com> Cc: Alexei Budankov <abudankov@huawei.com> Cc: Ian Rogers <irogers@google.com> Cc: Ingo Molnar <mingo@kernel.org> Cc: Mark Rutland <mark.rutland@arm.com> Cc: Michael Petlan <mpetlan@redhat.com> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Peter Zijlstra <a.p.zijlstra@chello.nl> Link: https://lore.kernel.org/r/20210208200908.1019149-12-jolsa@kernel.orgSigned-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Showing
Please register or sign in to comment