1b2441318SGreg Kroah-Hartman# SPDX-License-Identifier: GPL-2.0 2b53dde9dSIngo Molnar 3b53dde9dSIngo Molnar# Do not instrument the tracer itself: 4b53dde9dSIngo Molnar 515d5761aSMasahiro Yamadaccflags-remove-$(CONFIG_FUNCTION_TRACER) += $(CC_FLAGS_FTRACE) 615d5761aSMasahiro Yamada 7606576ceSSteven Rostedtifdef CONFIG_FUNCTION_TRACER 8d05cdb25SSteven Rostedt 9f5d2313bSMarco Elver# Avoid recursion due to instrumentation. 10f5d2313bSMarco ElverKCSAN_SANITIZE := n 11f5d2313bSMarco Elver 1247239c4dSSteven Rostedtifdef CONFIG_FTRACE_SELFTEST 13d05cdb25SSteven Rostedt# selftest needs instrumentation 14c0a80c0cSHeiko CarstensCFLAGS_trace_selftest_dynamic.o = $(CC_FLAGS_FTRACE) 15d05cdb25SSteven Rostedtobj-y += trace_selftest_dynamic.o 16b53dde9dSIngo Molnarendif 1747239c4dSSteven Rostedtendif 18b53dde9dSIngo Molnar 19d899926fSFrancis Deslauriersifdef CONFIG_FTRACE_STARTUP_TEST 20d899926fSFrancis DeslauriersCFLAGS_trace_kprobe_selftest.o = $(CC_FLAGS_FTRACE) 21d899926fSFrancis Deslauriersobj-$(CONFIG_KPROBE_EVENTS) += trace_kprobe_selftest.o 22d899926fSFrancis Deslauriersendif 23d899926fSFrancis Deslauriers 2452f232cbSSteven Rostedt# If unlikely tracing is enabled, do not trace these files 252ed84eebSSteven Rostedtifdef CONFIG_TRACING_BRANCHES 262ed84eebSSteven RostedtKBUILD_CFLAGS += -DDISABLE_BRANCH_PROFILING 2752f232cbSSteven Rostedtendif 2852f232cbSSteven Rostedt 296b7dca40SMasami Hiramatsu# for GCOV coverage profiling 306b7dca40SMasami Hiramatsuifdef CONFIG_GCOV_PROFILE_FTRACE 316b7dca40SMasami HiramatsuGCOV_PROFILE := y 326b7dca40SMasami Hiramatsuendif 336b7dca40SMasami Hiramatsu 34bb5eb8f3SCongyu Liu# Functions in this file could be invoked from early interrupt 35bb5eb8f3SCongyu Liu# code and produce random code coverage. 36bb5eb8f3SCongyu LiuKCOV_INSTRUMENT_trace_preemptirq.o := n 37bb5eb8f3SCongyu Liu 38ac5a72eaSAlan MaguireCFLAGS_bpf_trace.o := -I$(src) 39ac5a72eaSAlan Maguire 4081dc9f0eSSteven Rostedt (Red Hat)CFLAGS_trace_benchmark.o := -I$(src) 411d0e78e3SJiri OlsaCFLAGS_trace_events_filter.o := -I$(src) 421d0e78e3SJiri Olsa 43ea632e9fSJosh Triplettobj-$(CONFIG_TRACE_CLOCK) += trace_clock.o 4456449f43SIngo Molnar 45606576ceSSteven Rostedtobj-$(CONFIG_FUNCTION_TRACER) += libftrace.o 467a8e76a3SSteven Rostedtobj-$(CONFIG_RING_BUFFER) += ring_buffer.o 475092dbc9SSteven Rostedtobj-$(CONFIG_RING_BUFFER_BENCHMARK) += ring_buffer_benchmark.o 4816444a8aSArnaldo Carvalho de Melo 49bc0c38d1SSteven Rostedtobj-$(CONFIG_TRACING) += trace.o 50f0868d1eSSteven Rostedtobj-$(CONFIG_TRACING) += trace_output.o 5112306276SSteven Rostedt (Red Hat)obj-$(CONFIG_TRACING) += trace_seq.o 52dbd0b4b3SFrederic Weisbeckerobj-$(CONFIG_TRACING) += trace_stat.o 53769b0441SFrederic Weisbeckerobj-$(CONFIG_TRACING) += trace_printk.o 546954e415SSteven Rostedt (VMware)obj-$(CONFIG_TRACING) += pid_list.o 5508d43a5fSTom Zanussiobj-$(CONFIG_TRACING_MAP) += tracing_map.o 56f96e8577SJoel Fernandes (Google)obj-$(CONFIG_PREEMPTIRQ_DELAY_TEST) += preemptirq_delay_test.o 579fe41efaSTom Zanussiobj-$(CONFIG_SYNTH_EVENT_GEN_TEST) += synth_event_gen_test.o 5864836248STom Zanussiobj-$(CONFIG_KPROBE_EVENT_GEN_TEST) += kprobe_event_gen_test.o 5935e8e302SSteven Rostedtobj-$(CONFIG_CONTEXT_SWITCH_TRACER) += trace_sched_switch.o 60606576ceSSteven Rostedtobj-$(CONFIG_FUNCTION_TRACER) += trace_functions.o 61c3bc8fd6SJoel Fernandes (Google)obj-$(CONFIG_PREEMPTIRQ_TRACEPOINTS) += trace_preemptirq.o 6281d68a96SSteven Rostedtobj-$(CONFIG_IRQSOFF_TRACER) += trace_irqsoff.o 636cd8a4bbSSteven Rostedtobj-$(CONFIG_PREEMPT_TRACER) += trace_irqsoff.o 64352ad25aSSteven Rostedtobj-$(CONFIG_SCHED_TRACER) += trace_sched_wakeup.o 65e7c15cd8SSteven Rostedt (Red Hat)obj-$(CONFIG_HWLAT_TRACER) += trace_hwlat.o 66bce29ac9SDaniel Bristot de Oliveiraobj-$(CONFIG_OSNOISE_TRACER) += trace_osnoise.o 67fb1b6d8bSSteven Noonanobj-$(CONFIG_NOP_TRACER) += trace_nop.o 68e5a81b62SSteven Rostedtobj-$(CONFIG_STACK_TRACER) += trace_stack.o 69f984b51eSPekka Paalanenobj-$(CONFIG_MMIOTRACE) += trace_mmiotrace.o 70fb52607aSFrederic Weisbeckerobj-$(CONFIG_FUNCTION_GRAPH_TRACER) += trace_functions_graph.o 7194b80ffdSSteven Rostedtobj-$(CONFIG_TRACE_BRANCH_PROFILING) += trace_branch.o 722db270a8SFrederic Weisbeckerobj-$(CONFIG_BLK_DEV_IO_TRACE) += blktrace.o 73d864a3caSSteven Rostedt (VMware)obj-$(CONFIG_FUNCTION_GRAPH_TRACER) += fgraph.o 7455782138SLi Zefanifeq ($(CONFIG_BLOCK),y) 7555782138SLi Zefanobj-$(CONFIG_EVENT_TRACING) += blktrace.o 7655782138SLi Zefanendif 775f77a88bSTom Zanussiobj-$(CONFIG_EVENT_TRACING) += trace_events.o 785f77a88bSTom Zanussiobj-$(CONFIG_EVENT_TRACING) += trace_export.o 79ee08c6ecSFrederic Weisbeckerobj-$(CONFIG_FTRACE_SYSCALLS) += trace_syscalls.o 8007b139c8SLi Zefanifeq ($(CONFIG_PERF_EVENTS),y) 8197d5a220SFrederic Weisbeckerobj-$(CONFIG_EVENT_TRACING) += trace_event_perf.o 8207b139c8SLi Zefanendif 835f77a88bSTom Zanussiobj-$(CONFIG_EVENT_TRACING) += trace_events_filter.o 8485f2b082STom Zanussiobj-$(CONFIG_EVENT_TRACING) += trace_events_trigger.o 857491e2c4STzvetomir Stoyanov (VMware)obj-$(CONFIG_PROBE_EVENTS) += trace_eprobe.o 866c3edaf9SCong Wangobj-$(CONFIG_TRACE_EVENT_INJECT) += trace_events_inject.o 87726721a5STom Zanussiobj-$(CONFIG_SYNTH_EVENTS) += trace_events_synth.o 887ef224d1STom Zanussiobj-$(CONFIG_HIST_TRIGGERS) += trace_events_hist.o 897f5a08c7SBeau Belgraveobj-$(CONFIG_USER_EVENTS) += trace_events_user.o 90e1abf2ccSIngo Molnarobj-$(CONFIG_BPF_EVENTS) += bpf_trace.o 916b0b7551SAnton Blanchardobj-$(CONFIG_KPROBE_EVENTS) += trace_kprobe.o 929c0dee54SAlexander Potapenkoobj-$(CONFIG_TRACEPOINTS) += error_report-traces.o 93870915e0SMathieu Desnoyersobj-$(CONFIG_TRACEPOINTS) += power-traces.o 94798bc6d8SRafael J. Wysockiifeq ($(CONFIG_PM),y) 9553b615ccSMing Leiobj-$(CONFIG_TRACEPOINTS) += rpm-traces.o 962a5306ccSMing Leiendif 97955b61e5SJason Wesselifeq ($(CONFIG_TRACING),y) 98955b61e5SJason Wesselobj-$(CONFIG_KGDB_KDB) += trace_kdb.o 99955b61e5SJason Wesselendif 1005448d44cSMasami Hiramatsuobj-$(CONFIG_DYNAMIC_EVENTS) += trace_dynevent.o 1018ab83f56SSrikar Dronamrajuobj-$(CONFIG_PROBE_EVENTS) += trace_probe.o 102*ebeed8d4SMasami Hiramatsu (Google)obj-$(CONFIG_PROBE_EVENTS_BTF_ARGS) += trace_btf.o 1036b0b7551SAnton Blanchardobj-$(CONFIG_UPROBE_EVENTS) += trace_uprobe.o 1049c5b9d3dSMasami Hiramatsuobj-$(CONFIG_BOOTTIME_TRACING) += trace_boot.o 105773c1670SSteven Rostedt (VMware)obj-$(CONFIG_FTRACE_RECORD_RECURSION) += trace_recursion_record.o 106cad9931fSMasami Hiramatsuobj-$(CONFIG_FPROBE) += fprobe.o 10754ecbe6fSMasami Hiramatsuobj-$(CONFIG_RETHOOK) += rethook.o 108334e5519SMasami Hiramatsu (Google)obj-$(CONFIG_FPROBE_EVENTS) += trace_fprobe.o 109bc0c38d1SSteven Rostedt 11081dc9f0eSSteven Rostedt (Red Hat)obj-$(CONFIG_TRACEPOINT_BENCHMARK) += trace_benchmark.o 111102227b9SDaniel Bristot de Oliveiraobj-$(CONFIG_RV) += rv/ 11281dc9f0eSSteven Rostedt (Red Hat) 11316444a8aSArnaldo Carvalho de Melolibftrace-y := ftrace.o 114