@@ -3793,6 +3793,14 @@ static void clear_filters(void)
clear_instance_filters(instance);
}
+static void reset_clock(void)
+{
+ struct buffer_instance *instance;
+
+ for_all_instances(instance)
+ write_instance_file(instance, "trace_clock", "local", "clock");
+}
+
static void clear_triggers(void)
{
struct buffer_instance *instance;
@@ -4494,6 +4502,8 @@ void trace_reset(int argc, char **argv)
set_buffer_size();
clear_filters();
clear_triggers();
+ /* set clock to "local" */
+ reset_clock();
tracecmd_remove_instances();
clear_func_filters();
/* restore tracing_on to 1 */
The "trace-cmd reset" command should restore ftrace to its default state. This patch sets "tracing/trace_clock" to its default value "local", when the "trace-cmd reset" command is executed. Signed-off-by: Tzvetomir Stoyanov <tstoyanov@vmware.com> --- tracecmd/trace-record.c | 10 ++++++++++ 1 file changed, 10 insertions(+)