The "trace-cmd reset" command is supposed to set the ftrace state to default. However, some ftrace configurations are not reseted: synthetic events and error_log file. The command is extended to clean these. Two new tracefs APIs were also implemented, to check if given ftrace file / directory exists: bool tracefs_file_exist(struct tracefs_instance *instance, char *name); bool tracefs_dir_exist(struct tracefs_instance *instance, char *name); [ v2 changes: - Removed these patches from the "SQL-like syntax for ftrace histograms configuration" patch set, as they are not directly related to it. v3 changes: - Remove the warning in case there are no configured synthetic events. v4 chanegs: - Implemented new tracefs APIs to check if given ftrace file / directory exists. Use the new APIs to check if synthetic_events and error_log files exist, before accessing them. ] Tzvetomir Stoyanov (VMware) (4): trace-cmd: Add new tracefs APIs for checking if a ftrace file / directory exists trace-cmd: Unit tests for new libtracefs APIs trace-cmd: Clear synthetic events on reset subcommand trace-cmd: Clear error log on reset subcommand include/tracefs/tracefs.h | 3 ++ lib/tracefs/tracefs-instance.c | 49 ++++++++++++++++++++++++++- tracecmd/trace-record.c | 61 ++++++++++++++++++++++++++++++++++ utest/tracefs-utest.c | 16 +++++++++ 4 files changed, 128 insertions(+), 1 deletion(-) -- 2.24.1