blob: bedc5caceec7065c5260d5c0476f30489dff64f6 [file] [log] [blame]
Greg Kroah-Hartmanb2441312017-11-01 15:07:57 +01001# SPDX-License-Identifier: GPL-2.0
Ingo Molnarb53dde92008-05-12 21:20:51 +02002
3# Do not instrument the tracer itself:
4
Masahiro Yamada15d57612020-07-07 18:21:16 +09005ccflags-remove-$(CONFIG_FUNCTION_TRACER) += $(CC_FLAGS_FTRACE)
6
Steven Rostedt606576c2008-10-06 19:06:12 -04007ifdef CONFIG_FUNCTION_TRACER
Steven Rostedtd05cdb22008-05-12 21:20:54 +02008
Marco Elverf5d23132020-02-14 22:10:35 +01009# Avoid recursion due to instrumentation.
10KCSAN_SANITIZE := n
11
Steven Rostedt47239c42012-07-20 11:13:07 -040012ifdef CONFIG_FTRACE_SELFTEST
Steven Rostedtd05cdb22008-05-12 21:20:54 +020013# selftest needs instrumentation
Heiko Carstensc0a80c02015-01-09 13:06:33 +010014CFLAGS_trace_selftest_dynamic.o = $(CC_FLAGS_FTRACE)
Steven Rostedtd05cdb22008-05-12 21:20:54 +020015obj-y += trace_selftest_dynamic.o
Ingo Molnarb53dde92008-05-12 21:20:51 +020016endif
Steven Rostedt47239c42012-07-20 11:13:07 -040017endif
Ingo Molnarb53dde92008-05-12 21:20:51 +020018
Francis Deslauriersd8999262018-07-30 19:20:42 +090019ifdef CONFIG_FTRACE_STARTUP_TEST
20CFLAGS_trace_kprobe_selftest.o = $(CC_FLAGS_FTRACE)
21obj-$(CONFIG_KPROBE_EVENTS) += trace_kprobe_selftest.o
22endif
23
Steven Rostedt52f232c2008-11-12 00:14:40 -050024# If unlikely tracing is enabled, do not trace these files
Steven Rostedt2ed84ee2008-11-12 15:24:24 -050025ifdef CONFIG_TRACING_BRANCHES
26KBUILD_CFLAGS += -DDISABLE_BRANCH_PROFILING
Steven Rostedt52f232c2008-11-12 00:14:40 -050027endif
28
Masami Hiramatsu6b7dca42018-08-21 16:27:58 +090029# for GCOV coverage profiling
30ifdef CONFIG_GCOV_PROFILE_FTRACE
31GCOV_PROFILE := y
32endif
33
Alan Maguireac5a72e2020-07-13 12:52:33 +010034CFLAGS_bpf_trace.o := -I$(src)
35
Steven Rostedt (Red Hat)81dc9f02014-05-29 22:49:07 -040036CFLAGS_trace_benchmark.o := -I$(src)
Jiri Olsa1d0e78e2011-08-11 16:25:54 +020037CFLAGS_trace_events_filter.o := -I$(src)
38
Josh Triplettea632e92012-09-02 19:45:14 -070039obj-$(CONFIG_TRACE_CLOCK) += trace_clock.o
Ingo Molnar56449f42009-04-14 11:24:36 +020040
Steven Rostedt606576c2008-10-06 19:06:12 -040041obj-$(CONFIG_FUNCTION_TRACER) += libftrace.o
Steven Rostedt7a8e76a2008-09-29 23:02:38 -040042obj-$(CONFIG_RING_BUFFER) += ring_buffer.o
Steven Rostedt5092dbc2009-05-05 22:47:18 -040043obj-$(CONFIG_RING_BUFFER_BENCHMARK) += ring_buffer_benchmark.o
Arnaldo Carvalho de Melo16444a82008-05-12 21:20:42 +020044
Steven Rostedtbc0c38d2008-05-12 21:20:42 +020045obj-$(CONFIG_TRACING) += trace.o
Steven Rostedtf0868d12008-12-23 23:24:12 -050046obj-$(CONFIG_TRACING) += trace_output.o
Steven Rostedt (Red Hat)12306272014-06-20 13:38:54 -040047obj-$(CONFIG_TRACING) += trace_seq.o
Frederic Weisbeckerdbd0b4b2008-12-28 20:44:51 -080048obj-$(CONFIG_TRACING) += trace_stat.o
Frederic Weisbecker769b0442009-03-06 17:21:49 +010049obj-$(CONFIG_TRACING) += trace_printk.o
Steven Rostedt (VMware)6954e412021-09-23 21:03:49 -040050obj-$(CONFIG_TRACING) += pid_list.o
Tom Zanussi08d43a52015-12-10 12:50:50 -060051obj-$(CONFIG_TRACING_MAP) += tracing_map.o
Joel Fernandes (Google)f96e8572018-07-12 14:36:11 -070052obj-$(CONFIG_PREEMPTIRQ_DELAY_TEST) += preemptirq_delay_test.o
Tom Zanussi9fe41ef2020-01-29 12:59:28 -060053obj-$(CONFIG_SYNTH_EVENT_GEN_TEST) += synth_event_gen_test.o
Tom Zanussi64836242020-01-29 12:59:31 -060054obj-$(CONFIG_KPROBE_EVENT_GEN_TEST) += kprobe_event_gen_test.o
Steven Rostedt35e8e302008-05-12 21:20:42 +020055obj-$(CONFIG_CONTEXT_SWITCH_TRACER) += trace_sched_switch.o
Steven Rostedt606576c2008-10-06 19:06:12 -040056obj-$(CONFIG_FUNCTION_TRACER) += trace_functions.o
Joel Fernandes (Google)c3bc8fd2018-07-30 15:24:23 -070057obj-$(CONFIG_PREEMPTIRQ_TRACEPOINTS) += trace_preemptirq.o
Steven Rostedt81d68a92008-05-12 21:20:42 +020058obj-$(CONFIG_IRQSOFF_TRACER) += trace_irqsoff.o
Steven Rostedt6cd8a4b2008-05-12 21:20:42 +020059obj-$(CONFIG_PREEMPT_TRACER) += trace_irqsoff.o
Steven Rostedt352ad252008-05-12 21:20:42 +020060obj-$(CONFIG_SCHED_TRACER) += trace_sched_wakeup.o
Steven Rostedt (Red Hat)e7c15cd2016-06-23 12:45:36 -040061obj-$(CONFIG_HWLAT_TRACER) += trace_hwlat.o
Daniel Bristot de Oliveirabce29ac2021-06-22 16:42:27 +020062obj-$(CONFIG_OSNOISE_TRACER) += trace_osnoise.o
Steven Noonanfb1b6d82008-09-19 03:06:43 -070063obj-$(CONFIG_NOP_TRACER) += trace_nop.o
Steven Rostedte5a81b62008-08-27 23:31:01 -040064obj-$(CONFIG_STACK_TRACER) += trace_stack.o
Pekka Paalanenf984b512008-05-12 21:20:57 +020065obj-$(CONFIG_MMIOTRACE) += trace_mmiotrace.o
Frederic Weisbeckerfb526072008-11-25 21:07:04 +010066obj-$(CONFIG_FUNCTION_GRAPH_TRACER) += trace_functions_graph.o
Steven Rostedt94b80ff2008-11-12 16:18:45 -050067obj-$(CONFIG_TRACE_BRANCH_PROFILING) += trace_branch.o
Li Zefan55782132009-06-09 13:43:05 +080068obj-$(CONFIG_BLK_DEV_IO_TRACE) += blktrace.o
Steven Rostedt (VMware)d864a3c2018-11-12 15:21:22 -050069obj-$(CONFIG_FUNCTION_GRAPH_TRACER) += fgraph.o
Li Zefan55782132009-06-09 13:43:05 +080070ifeq ($(CONFIG_BLOCK),y)
71obj-$(CONFIG_EVENT_TRACING) += blktrace.o
72endif
Tom Zanussi5f77a882009-04-08 03:14:01 -050073obj-$(CONFIG_EVENT_TRACING) += trace_events.o
Tom Zanussi5f77a882009-04-08 03:14:01 -050074obj-$(CONFIG_EVENT_TRACING) += trace_export.o
Frederic Weisbeckeree08c6e2009-03-07 05:52:59 +010075obj-$(CONFIG_FTRACE_SYSCALLS) += trace_syscalls.o
Li Zefan07b139c2009-12-21 14:27:35 +080076ifeq ($(CONFIG_PERF_EVENTS),y)
Frederic Weisbecker97d5a222010-03-05 05:35:37 +010077obj-$(CONFIG_EVENT_TRACING) += trace_event_perf.o
Li Zefan07b139c2009-12-21 14:27:35 +080078endif
Tom Zanussi5f77a882009-04-08 03:14:01 -050079obj-$(CONFIG_EVENT_TRACING) += trace_events_filter.o
Tom Zanussi85f2b082013-10-24 08:59:24 -050080obj-$(CONFIG_EVENT_TRACING) += trace_events_trigger.o
Tzvetomir Stoyanov (VMware)7491e2c2021-08-19 11:26:06 -040081obj-$(CONFIG_PROBE_EVENTS) += trace_eprobe.o
Cong Wang6c3edaf2019-11-29 20:52:18 -080082obj-$(CONFIG_TRACE_EVENT_INJECT) += trace_events_inject.o
Tom Zanussi726721a2020-05-28 14:32:37 -050083obj-$(CONFIG_SYNTH_EVENTS) += trace_events_synth.o
Tom Zanussi7ef224d2016-03-03 12:54:42 -060084obj-$(CONFIG_HIST_TRIGGERS) += trace_events_hist.o
Ingo Molnare1abf2c2015-04-02 15:51:39 +020085obj-$(CONFIG_BPF_EVENTS) += bpf_trace.o
Anton Blanchard6b0b7552017-02-16 17:00:50 +110086obj-$(CONFIG_KPROBE_EVENTS) += trace_kprobe.o
Alexander Potapenko9c0dee52021-02-25 17:19:44 -080087obj-$(CONFIG_TRACEPOINTS) += error_report-traces.o
Mathieu Desnoyers870915e2010-10-28 11:31:17 -040088obj-$(CONFIG_TRACEPOINTS) += power-traces.o
Rafael J. Wysocki798bc6d2014-12-13 02:23:30 +010089ifeq ($(CONFIG_PM),y)
Ming Lei53b615c2011-09-27 22:53:27 +020090obj-$(CONFIG_TRACEPOINTS) += rpm-traces.o
Ming Lei2a5306c2011-09-29 22:07:23 +020091endif
Jason Wessel955b61e2010-08-05 09:22:23 -050092ifeq ($(CONFIG_TRACING),y)
93obj-$(CONFIG_KGDB_KDB) += trace_kdb.o
94endif
Masami Hiramatsu5448d442018-11-05 18:02:08 +090095obj-$(CONFIG_DYNAMIC_EVENTS) += trace_dynevent.o
Srikar Dronamraju8ab83f52012-04-09 14:41:44 +053096obj-$(CONFIG_PROBE_EVENTS) += trace_probe.o
Anton Blanchard6b0b7552017-02-16 17:00:50 +110097obj-$(CONFIG_UPROBE_EVENTS) += trace_uprobe.o
Masami Hiramatsu9c5b9d32020-01-11 01:06:17 +090098obj-$(CONFIG_BOOTTIME_TRACING) += trace_boot.o
Steven Rostedt (VMware)773c1672020-11-05 21:32:46 -050099obj-$(CONFIG_FTRACE_RECORD_RECURSION) += trace_recursion_record.o
Steven Rostedtbc0c38d2008-05-12 21:20:42 +0200100
Steven Rostedt (Red Hat)81dc9f02014-05-29 22:49:07 -0400101obj-$(CONFIG_TRACEPOINT_BENCHMARK) += trace_benchmark.o
102
Arnaldo Carvalho de Melo16444a82008-05-12 21:20:42 +0200103libftrace-y := ftrace.o