@@ -47,6 +47,7 @@ struct perf_ftrace {
47
47
int func_irq_info ;
48
48
int graph_nosleep_time ;
49
49
int graph_noirqs ;
50
+ int graph_verbose ;
50
51
};
51
52
52
53
struct filter_entry {
@@ -210,6 +211,9 @@ static void reset_tracing_options(struct perf_ftrace *ftrace __maybe_unused)
210
211
write_tracing_option_file ("func_stack_trace" , "0" );
211
212
write_tracing_option_file ("sleep-time" , "1" );
212
213
write_tracing_option_file ("funcgraph-irqs" , "1" );
214
+ write_tracing_option_file ("funcgraph-proc" , "0" );
215
+ write_tracing_option_file ("funcgraph-abstime" , "0" );
216
+ write_tracing_option_file ("latency-format" , "0" );
213
217
write_tracing_option_file ("irq-info" , "0" );
214
218
}
215
219
@@ -425,6 +429,23 @@ static int set_tracing_funcgraph_irqs(struct perf_ftrace *ftrace)
425
429
return 0 ;
426
430
}
427
431
432
+ static int set_tracing_funcgraph_verbose (struct perf_ftrace * ftrace )
433
+ {
434
+ if (!ftrace -> graph_verbose )
435
+ return 0 ;
436
+
437
+ if (write_tracing_option_file ("funcgraph-proc" , "1" ) < 0 )
438
+ return -1 ;
439
+
440
+ if (write_tracing_option_file ("funcgraph-abstime" , "1" ) < 0 )
441
+ return -1 ;
442
+
443
+ if (write_tracing_option_file ("latency-format" , "1" ) < 0 )
444
+ return -1 ;
445
+
446
+ return 0 ;
447
+ }
448
+
428
449
static int __cmd_ftrace (struct perf_ftrace * ftrace , int argc , const char * * argv )
429
450
{
430
451
char * trace_file ;
@@ -519,6 +540,11 @@ static int __cmd_ftrace(struct perf_ftrace *ftrace, int argc, const char **argv)
519
540
goto out_reset ;
520
541
}
521
542
543
+ if (set_tracing_funcgraph_verbose (ftrace ) < 0 ) {
544
+ pr_err ("failed to set tracing option funcgraph-proc/funcgraph-abstime\n" );
545
+ goto out_reset ;
546
+ }
547
+
522
548
if (write_tracing_file ("current_tracer" , ftrace -> tracer ) < 0 ) {
523
549
pr_err ("failed to set current_tracer to %s\n" , ftrace -> tracer );
524
550
goto out_reset ;
@@ -700,6 +726,7 @@ static int parse_graph_tracer_opts(const struct option *opt,
700
726
struct sublevel_option graph_tracer_opts [] = {
701
727
{ .name = "nosleep-time" , .value_ptr = & ftrace -> graph_nosleep_time },
702
728
{ .name = "noirqs" , .value_ptr = & ftrace -> graph_noirqs },
729
+ { .name = "verbose" , .value_ptr = & ftrace -> graph_verbose },
703
730
{ .name = NULL , }
704
731
};
705
732
@@ -771,7 +798,7 @@ int cmd_ftrace(int argc, const char **argv)
771
798
OPT_INTEGER ('D' , "graph-depth" , & ftrace .graph_depth ,
772
799
"Max depth for function graph tracer" ),
773
800
OPT_CALLBACK (0 , "graph-opts" , & ftrace , "options" ,
774
- "graph tracer options, available options: nosleep-time,noirqs" ,
801
+ "graph tracer options, available options: nosleep-time,noirqs,verbose " ,
775
802
parse_graph_tracer_opts ),
776
803
OPT_CALLBACK ('m' , "buffer-size" , & ftrace .percpu_buffer_size , "size" ,
777
804
"size of per cpu buffer" , parse_buffer_size ),
0 commit comments