@@ -45,6 +45,7 @@ struct perf_ftrace {
45
45
bool inherit ;
46
46
int func_stack_trace ;
47
47
int graph_nosleep_time ;
48
+ int graph_noirqs ;
48
49
};
49
50
50
51
struct filter_entry {
@@ -207,6 +208,7 @@ static void reset_tracing_options(struct perf_ftrace *ftrace __maybe_unused)
207
208
write_tracing_option_file ("function-fork" , "0" );
208
209
write_tracing_option_file ("func_stack_trace" , "0" );
209
210
write_tracing_option_file ("sleep-time" , "1" );
211
+ write_tracing_option_file ("funcgraph-irqs" , "1" );
210
212
}
211
213
212
214
static int reset_tracing_files (struct perf_ftrace * ftrace __maybe_unused )
@@ -399,6 +401,17 @@ static int set_tracing_sleep_time(struct perf_ftrace *ftrace)
399
401
return 0 ;
400
402
}
401
403
404
+ static int set_tracing_funcgraph_irqs (struct perf_ftrace * ftrace )
405
+ {
406
+ if (!ftrace -> graph_noirqs )
407
+ return 0 ;
408
+
409
+ if (write_tracing_option_file ("funcgraph-irqs" , "0" ) < 0 )
410
+ return -1 ;
411
+
412
+ return 0 ;
413
+ }
414
+
402
415
static int __cmd_ftrace (struct perf_ftrace * ftrace , int argc , const char * * argv )
403
416
{
404
417
char * trace_file ;
@@ -483,6 +496,11 @@ static int __cmd_ftrace(struct perf_ftrace *ftrace, int argc, const char **argv)
483
496
goto out_reset ;
484
497
}
485
498
499
+ if (set_tracing_funcgraph_irqs (ftrace ) < 0 ) {
500
+ pr_err ("failed to set tracing option funcgraph-irqs\n" );
501
+ goto out_reset ;
502
+ }
503
+
486
504
if (write_tracing_file ("current_tracer" , ftrace -> tracer ) < 0 ) {
487
505
pr_err ("failed to set current_tracer to %s\n" , ftrace -> tracer );
488
506
goto out_reset ;
@@ -662,6 +680,7 @@ static int parse_graph_tracer_opts(const struct option *opt,
662
680
struct perf_ftrace * ftrace = (struct perf_ftrace * ) opt -> value ;
663
681
struct sublevel_option graph_tracer_opts [] = {
664
682
{ .name = "nosleep-time" , .value_ptr = & ftrace -> graph_nosleep_time },
683
+ { .name = "noirqs" , .value_ptr = & ftrace -> graph_noirqs },
665
684
{ .name = NULL , }
666
685
};
667
686
@@ -733,7 +752,7 @@ int cmd_ftrace(int argc, const char **argv)
733
752
OPT_INTEGER ('D' , "graph-depth" , & ftrace .graph_depth ,
734
753
"Max depth for function graph tracer" ),
735
754
OPT_CALLBACK (0 , "graph-opts" , & ftrace , "options" ,
736
- "graph tracer options, available options: nosleep-time" ,
755
+ "graph tracer options, available options: nosleep-time,noirqs " ,
737
756
parse_graph_tracer_opts ),
738
757
OPT_CALLBACK ('m' , "buffer-size" , & ftrace .percpu_buffer_size , "size" ,
739
758
"size of per cpu buffer" , parse_buffer_size ),
0 commit comments