1b53dde9dSIngo Molnar 2377ccbb4SSteven Rostedt# We are fully aware of the dangers of __builtin_return_address() 3377ccbb4SSteven RostedtFRAME_CFLAGS := $(call cc-disable-warning,frame-address) 4377ccbb4SSteven RostedtKBUILD_CFLAGS += $(FRAME_CFLAGS) 5377ccbb4SSteven Rostedt 6b53dde9dSIngo Molnar# Do not instrument the tracer itself: 7b53dde9dSIngo Molnar 8606576ceSSteven Rostedtifdef CONFIG_FUNCTION_TRACER 9b53dde9dSIngo MolnarORIG_CFLAGS := $(KBUILD_CFLAGS) 10c0a80c0cSHeiko CarstensKBUILD_CFLAGS = $(subst $(CC_FLAGS_FTRACE),,$(ORIG_CFLAGS)) 11d05cdb25SSteven Rostedt 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 1952f232cbSSteven Rostedt# If unlikely tracing is enabled, do not trace these files 202ed84eebSSteven Rostedtifdef CONFIG_TRACING_BRANCHES 212ed84eebSSteven RostedtKBUILD_CFLAGS += -DDISABLE_BRANCH_PROFILING 2252f232cbSSteven Rostedtendif 2352f232cbSSteven Rostedt 2481dc9f0eSSteven Rostedt (Red Hat)CFLAGS_trace_benchmark.o := -I$(src) 251d0e78e3SJiri OlsaCFLAGS_trace_events_filter.o := -I$(src) 261d0e78e3SJiri Olsa 27ea632e9fSJosh Triplettobj-$(CONFIG_TRACE_CLOCK) += trace_clock.o 2856449f43SIngo Molnar 29606576ceSSteven Rostedtobj-$(CONFIG_FUNCTION_TRACER) += libftrace.o 307a8e76a3SSteven Rostedtobj-$(CONFIG_RING_BUFFER) += ring_buffer.o 315092dbc9SSteven Rostedtobj-$(CONFIG_RING_BUFFER_BENCHMARK) += ring_buffer_benchmark.o 3216444a8aSArnaldo Carvalho de Melo 33bc0c38d1SSteven Rostedtobj-$(CONFIG_TRACING) += trace.o 34f0868d1eSSteven Rostedtobj-$(CONFIG_TRACING) += trace_output.o 3512306276SSteven Rostedt (Red Hat)obj-$(CONFIG_TRACING) += trace_seq.o 36dbd0b4b3SFrederic Weisbeckerobj-$(CONFIG_TRACING) += trace_stat.o 37769b0441SFrederic Weisbeckerobj-$(CONFIG_TRACING) += trace_printk.o 3808d43a5fSTom Zanussiobj-$(CONFIG_TRACING_MAP) += tracing_map.o 3935e8e302SSteven Rostedtobj-$(CONFIG_CONTEXT_SWITCH_TRACER) += trace_sched_switch.o 40606576ceSSteven Rostedtobj-$(CONFIG_FUNCTION_TRACER) += trace_functions.o 4181d68a96SSteven Rostedtobj-$(CONFIG_IRQSOFF_TRACER) += trace_irqsoff.o 426cd8a4bbSSteven Rostedtobj-$(CONFIG_PREEMPT_TRACER) += trace_irqsoff.o 43352ad25aSSteven Rostedtobj-$(CONFIG_SCHED_TRACER) += trace_sched_wakeup.o 44*e7c15cd8SSteven Rostedt (Red Hat)obj-$(CONFIG_HWLAT_TRACER) += trace_hwlat.o 45fb1b6d8bSSteven Noonanobj-$(CONFIG_NOP_TRACER) += trace_nop.o 46e5a81b62SSteven Rostedtobj-$(CONFIG_STACK_TRACER) += trace_stack.o 47f984b51eSPekka Paalanenobj-$(CONFIG_MMIOTRACE) += trace_mmiotrace.o 48fb52607aSFrederic Weisbeckerobj-$(CONFIG_FUNCTION_GRAPH_TRACER) += trace_functions_graph.o 4994b80ffdSSteven Rostedtobj-$(CONFIG_TRACE_BRANCH_PROFILING) += trace_branch.o 502db270a8SFrederic Weisbeckerobj-$(CONFIG_BLK_DEV_IO_TRACE) += blktrace.o 5155782138SLi Zefanifeq ($(CONFIG_BLOCK),y) 5255782138SLi Zefanobj-$(CONFIG_EVENT_TRACING) += blktrace.o 5355782138SLi Zefanendif 545f77a88bSTom Zanussiobj-$(CONFIG_EVENT_TRACING) += trace_events.o 555f77a88bSTom Zanussiobj-$(CONFIG_EVENT_TRACING) += trace_export.o 56ee08c6ecSFrederic Weisbeckerobj-$(CONFIG_FTRACE_SYSCALLS) += trace_syscalls.o 5707b139c8SLi Zefanifeq ($(CONFIG_PERF_EVENTS),y) 5897d5a220SFrederic Weisbeckerobj-$(CONFIG_EVENT_TRACING) += trace_event_perf.o 5907b139c8SLi Zefanendif 605f77a88bSTom Zanussiobj-$(CONFIG_EVENT_TRACING) += trace_events_filter.o 6185f2b082STom Zanussiobj-$(CONFIG_EVENT_TRACING) += trace_events_trigger.o 627ef224d1STom Zanussiobj-$(CONFIG_HIST_TRIGGERS) += trace_events_hist.o 63e1abf2ccSIngo Molnarobj-$(CONFIG_BPF_EVENTS) += bpf_trace.o 6477b44d1bSMasami Hiramatsuobj-$(CONFIG_KPROBE_EVENT) += trace_kprobe.o 65870915e0SMathieu Desnoyersobj-$(CONFIG_TRACEPOINTS) += power-traces.o 66798bc6d8SRafael J. Wysockiifeq ($(CONFIG_PM),y) 6753b615ccSMing Leiobj-$(CONFIG_TRACEPOINTS) += rpm-traces.o 682a5306ccSMing Leiendif 69955b61e5SJason Wesselifeq ($(CONFIG_TRACING),y) 70955b61e5SJason Wesselobj-$(CONFIG_KGDB_KDB) += trace_kdb.o 71955b61e5SJason Wesselendif 728ab83f56SSrikar Dronamrajuobj-$(CONFIG_PROBE_EVENTS) += trace_probe.o 73f3f096cfSSrikar Dronamrajuobj-$(CONFIG_UPROBE_EVENT) += trace_uprobe.o 74bc0c38d1SSteven Rostedt 7581dc9f0eSSteven Rostedt (Red Hat)obj-$(CONFIG_TRACEPOINT_BENCHMARK) += trace_benchmark.o 7681dc9f0eSSteven Rostedt (Red Hat) 7716444a8aSArnaldo Carvalho de Melolibftrace-y := ftrace.o 78