twx-linux/kernel/trace
pengdonglin f83ac7544f function_graph: Enable funcgraph-args and funcgraph-retaddr to work simultaneously
Currently, the funcgraph-args and funcgraph-retaddr features are
mutually exclusive. This patch resolves this limitation by allowing
funcgraph-retaddr to have an args array.

To verify the change, use perf to trace vfs_write with both options
enabled:

Before:
 # perf ftrace -G vfs_write --graph-opts args,retaddr
   ......
   down_read() { /* <-n_tty_write+0xa3/0x540 */
     __cond_resched(); /* <-down_read+0x12/0x160 */
     preempt_count_add(); /* <-down_read+0x3b/0x160 */
     preempt_count_sub(); /* <-down_read+0x8b/0x160 */
   }

After:
 # perf ftrace -G vfs_write --graph-opts args,retaddr
   ......
   down_read(sem=0xffff8880100bea78) { /* <-n_tty_write+0xa3/0x540 */
     __cond_resched(); /* <-down_read+0x12/0x160 */
     preempt_count_add(val=1); /* <-down_read+0x3b/0x160 */
     preempt_count_sub(val=1); /* <-down_read+0x8b/0x160 */
   }

Cc: Steven Rostedt (Google) <rostedt@goodmis.org>
Cc: Sven Schnelle <svens@linux.ibm.com>
Cc: Masami Hiramatsu <mhiramat@kernel.org>
Cc: Xiaoqin Zhang <zhangxiaoqin@xiaomi.com>
Link: https://patch.msgid.link/20251125093425.2563849-1-dolinux.peng@gmail.com
Signed-off-by: pengdonglin <pengdonglin@xiaomi.com>
Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>
2025-11-26 15:13:30 -05:00
..
rv rv: Make rtapp/pagefault monitor depends on CONFIG_MMU 2025-10-20 12:47:40 +02:00
blktrace.c tracing: Allow tracer to add more than 32 options 2025-11-04 21:44:00 +09:00
bpf_trace.c file->f_path constification 2025-10-03 16:32:36 -07:00
bpf_trace.h
error_report-traces.c
fgraph.c tracing: Have function graph tracer option sleep-time be per instance 2025-11-14 14:30:55 -05:00
fprobe.c tracing: fprobe: Fix to remove recorded module addresses from filter 2025-09-24 23:18:26 +09:00
ftrace_internal.h
ftrace.c ftrace: Avoid redundant initialization in register_ftrace_direct 2025-11-26 15:13:28 -05:00
Kconfig ftrace: Allow tracing of some of the tracing code 2025-11-26 15:13:30 -05:00
kprobe_event_gen_test.c
Makefile ftrace: Allow tracing of some of the tracing code 2025-11-26 15:13:30 -05:00
pid_list.c trace/pid_list: optimize pid_list->lock contention 2025-11-13 15:15:54 -05:00
pid_list.h trace/pid_list: optimize pid_list->lock contention 2025-11-13 15:15:54 -05:00
power-traces.c PM: cpufreq: powernv/tracing: Move powernv_throttle trace event 2025-07-21 16:40:56 -04:00
preemptirq_delay_test.c kernel: trace: preemptirq_delay_test: use offstack cpu mask 2025-07-08 18:17:38 -04:00
rethook.c
ring_buffer_benchmark.c
ring_buffer.c ring buffer: Propagate __rb_map_vma return value to caller 2025-10-08 21:48:58 -04:00
rpm-traces.c
synth_event_gen_test.c
trace_benchmark.c
trace_benchmark.h
trace_boot.c
trace_branch.c tracing: branch: Use trace_tracing_is_on_cpu() instead of "disabled" field 2025-05-09 15:19:10 -04:00
trace_btf.c
trace_btf.h
trace_clock.c
trace_dynevent.c tracing: Report wrong dynamic event command 2025-11-10 19:26:14 -05:00
trace_dynevent.h tracing: probes: Fix a possible race in trace_probe_log APIs 2025-05-13 22:23:34 +09:00
trace_entries.h function_graph: Enable funcgraph-args and funcgraph-retaddr to work simultaneously 2025-11-26 15:13:30 -05:00
trace_eprobe.c tracing: Merge struct event_trigger_ops into struct event_command 2025-11-26 15:13:29 -05:00
trace_event_perf.c
trace_events_filter_test.h
trace_events_filter.c tracing changes for 6.17 2025-08-01 10:29:36 -07:00
trace_events_hist.c tracing: Merge struct event_trigger_ops into struct event_command 2025-11-26 15:13:29 -05:00
trace_events_inject.c
trace_events_synth.c tracing: Allow tracer to add more than 32 options 2025-11-04 21:44:00 +09:00
trace_events_trigger.c tracing: Use strim() in trigger_process_regex() instead of skip_spaces() 2025-11-26 15:13:30 -05:00
trace_events_user.c tracing updates for v6.18: 2025-10-05 09:43:36 -07:00
trace_events.c tracing: Allow tracer to add more than 32 options 2025-11-04 21:44:00 +09:00
trace_export.c
trace_fprobe.c tracing: Allow tracer to add more than 32 options 2025-11-04 21:44:00 +09:00
trace_functions_graph.c function_graph: Enable funcgraph-args and funcgraph-retaddr to work simultaneously 2025-11-26 15:13:30 -05:00
trace_functions.c tracing: Have function tracer define options per instance 2025-11-12 09:59:54 -05:00
trace_hwlat.c tracing: Replace opencoded cpumask_next_wrap() in move_to_next_cpu() 2025-07-08 18:17:29 -04:00
trace_irqsoff.c tracing: Allow tracer to add more than 32 options 2025-11-04 21:44:00 +09:00
trace_kdb.c tracing: Allow tracer to add more than 32 options 2025-11-04 21:44:00 +09:00
trace_kprobe_selftest.c
trace_kprobe_selftest.h
trace_kprobe.c tracing: Allow tracer to add more than 32 options 2025-11-04 21:44:00 +09:00
trace_mmiotrace.c tracing/mmiotrace: Remove reference to unused per CPU data pointer 2025-05-08 09:36:09 -04:00
trace_nop.c
trace_osnoise.c tracing clean up and fixes for v6.18: 2025-10-09 12:18:22 -07:00
trace_output.c Merge branch 'topic/func-profiler-offset' of git://git.kernel.org/pub/scm/linux/kernel/git/mhiramat/linux into trace/trace/core 2025-11-04 10:12:32 -05:00
trace_output.h tracing: Allow tracer to add more than 32 options 2025-11-04 21:44:00 +09:00
trace_preemptirq.c
trace_printk.c
trace_probe_kernel.h
trace_probe_tmpl.h
trace_probe.c Probes updates for v6.17: 2025-07-30 15:38:01 -07:00
trace_probe.h tracing: Fix race condition in kprobe initialization causing NULL pointer dereference 2025-10-02 08:05:01 +09:00
trace_recursion_record.c
trace_sched_switch.c tracing: Ensure optimized hashing works 2025-09-30 17:27:58 -04:00
trace_sched_wakeup.c tracing: Allow tracer to add more than 32 options 2025-11-04 21:44:00 +09:00
trace_selftest_dynamic.c
trace_selftest.c
trace_seq.c
trace_stack.c tracing updates for v6.16: 2025-05-29 21:04:36 -07:00
trace_stat.c
trace_stat.h
trace_synth.h
trace_syscalls.c tracing: Hide __NR_utimensat and _NR_mq_timedsend when not defined 2025-11-10 14:23:53 -05:00
trace_uprobe.c tracing: Fix race condition in kprobe initialization causing NULL pointer dereference 2025-10-02 08:05:01 +09:00
trace.c tracing: Add boot-time backup of persistent ring buffer 2025-11-26 15:13:30 -05:00
trace.h function_graph: Enable funcgraph-args and funcgraph-retaddr to work simultaneously 2025-11-26 15:13:30 -05:00
tracing_map.c tracing: Use vmalloc_array() to improve code 2025-09-23 09:31:58 -04:00
tracing_map.h