@@ -464,7 +464,7 @@ static int graph_trace_init(struct trace_array *tr)
464
464
else
465
465
tr -> gops -> retfunc = trace_graph_return ;
466
466
467
- /* Make gops functions are visible before we start tracing */
467
+ /* Make gops functions visible before we start tracing */
468
468
smp_mb ();
469
469
470
470
ret = register_ftrace_graph (tr -> gops );
@@ -475,6 +475,28 @@ static int graph_trace_init(struct trace_array *tr)
475
475
return 0 ;
476
476
}
477
477
478
+ static int ftrace_graph_trace_args (struct trace_array * tr , int set )
479
+ {
480
+ trace_func_graph_ent_t entry ;
481
+
482
+ if (set )
483
+ entry = trace_graph_entry_args ;
484
+ else
485
+ entry = trace_graph_entry ;
486
+
487
+ /* See if there's any changes */
488
+ if (tr -> gops -> entryfunc == entry )
489
+ return 0 ;
490
+
491
+ unregister_ftrace_graph (tr -> gops );
492
+
493
+ tr -> gops -> entryfunc = entry ;
494
+
495
+ /* Make gops functions visible before we start tracing */
496
+ smp_mb ();
497
+ return register_ftrace_graph (tr -> gops );
498
+ }
499
+
478
500
static void graph_trace_reset (struct trace_array * tr )
479
501
{
480
502
tracing_stop_cmdline_record ();
@@ -1607,6 +1629,9 @@ func_graph_set_flag(struct trace_array *tr, u32 old_flags, u32 bit, int set)
1607
1629
if (bit == TRACE_GRAPH_GRAPH_TIME )
1608
1630
ftrace_graph_graph_time_control (set );
1609
1631
1632
+ if (bit == TRACE_GRAPH_ARGS )
1633
+ return ftrace_graph_trace_args (tr , set );
1634
+
1610
1635
return 0 ;
1611
1636
}
1612
1637
0 commit comments