diff options
author | Thomas Richter <tmricht@linux.ibm.com> | 2025-05-20 11:37:26 +0200 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2025-05-20 13:11:09 -0300 |
commit | ba5f102eec56d61ef590d16ae53e47a4c882d7db (patch) | |
tree | 67756dbc86c245370dc84fe149db53a92dccbfad /tools/perf/scripts/python/export-to-postgresql.py | |
parent | e48b92f9e140ff632ad426c0a94e3630a61e45d8 (diff) |
perf ftrace: Use process/session specific trace settings
Executing 'perf ftrace' commands 'ftrace', 'profile' and 'latency' leave
tracing disabled as can seen in this output:
# echo 1 > /sys/kernel/debug/tracing/tracing_on
# cat /sys/kernel/debug/tracing/tracing_on
1
# perf ftrace trace --graph-opts depth=5 sleep 0.1 > /dev/null
# cat /sys/kernel/debug/tracing/tracing_on
0
#
The 'tracing_on' file is not restored to its value before the command.
To fix that this patch uses the .../tracing/instances/XXX subdirectory
feature.
Each 'perf ftrace' invocation creates its own session/process
specific subdirectory and does not change the global state
in the .../tracing directory itself.
Use rmdir(../tracing/instances/dir) to stop process/session specific
tracing and delete all process/session specific setings.
Reported-by: Alexander Egorenkov <egorenar@linux.ibm.com>
Suggested-by: Arnaldo Carvalho de Melo <acme@kernel.org>
Signed-off-by: Thomas Richter <tmricht@linux.ibm.com>
Cc: Alexander Gordeev <agordeev@linux.ibm.com>
Cc: Heiko Carstens <hca@linux.ibm.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Sumanth Korikkar <sumanthk@linux.ibm.com>
Cc: Vasily Gorbik <gor@linux.ibm.com>
Link: https://lore.kernel.org/r/20250520093726.2009696-1-tmricht@linux.ibm.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/scripts/python/export-to-postgresql.py')
0 files changed, 0 insertions, 0 deletions