# SPDX-License-Identifier: GPL-2.0 # Do not instrument the tracer itself: ifdef [31mCONFIG_FUNCTION_TRACER[0m ORIG_CFLAGS := $(KBUILD_CFLAGS) KBUILD_CFLAGS = $(subst $(CC_FLAGS_FTRACE),,$(ORIG_CFLAGS)) ifdef [31mCONFIG_FTRACE_SELFTEST[0m # selftest needs instrumentation CFLAGS_trace_selftest_dynamic.o = $(CC_FLAGS_FTRACE) obj-y += trace_selftest_dynamic.o endif endif ifdef [31mCONFIG_FTRACE_STARTUP_TEST[0m CFLAGS_trace_kprobe_selftest.o = $(CC_FLAGS_FTRACE) obj-$([31mCONFIG_KPROBE_EVENTS[0m) += trace_kprobe_selftest.o endif # If unlikely tracing is enabled, do not trace these files ifdef [31mCONFIG_TRACING_BRANCHES[0m KBUILD_CFLAGS += -DDISABLE_BRANCH_PROFILING endif # for GCOV coverage profiling ifdef [31mCONFIG_GCOV_PROFILE_FTRACE[0m GCOV_PROFILE := y endif CFLAGS_trace_benchmark.o := -I$(src) CFLAGS_trace_events_filter.o := -I$(src) obj-$([31mCONFIG_TRACE_CLOCK[0m) += trace_clock.o obj-$([31mCONFIG_FUNCTION_TRACER[0m) += libftrace.o obj-$([31mCONFIG_RING_BUFFER[0m) += ring_buffer.o obj-$([31mCONFIG_RING_BUFFER_BENCHMARK[0m) += ring_buffer_benchmark.o obj-$([31mCONFIG_TRACING[0m) += trace.o obj-$([31mCONFIG_TRACING[0m) += trace_output.o obj-$([31mCONFIG_TRACING[0m) += trace_seq.o obj-$([31mCONFIG_TRACING[0m) += trace_stat.o obj-$([31mCONFIG_TRACING[0m) += trace_printk.o obj-$([31mCONFIG_TRACING_MAP[0m) += tracing_map.o obj-$([31mCONFIG_PREEMPTIRQ_DELAY_TEST[0m) += preemptirq_delay_test.o obj-$([31mCONFIG_CONTEXT_SWITCH_TRACER[0m) += trace_sched_switch.o obj-$([31mCONFIG_FUNCTION_TRACER[0m) += trace_functions.o obj-$([31mCONFIG_PREEMPTIRQ_TRACEPOINTS[0m) += trace_preemptirq.o obj-$([31mCONFIG_IRQSOFF_TRACER[0m) += trace_irqsoff.o obj-$([31mCONFIG_PREEMPT_TRACER[0m) += trace_irqsoff.o obj-$([31mCONFIG_SCHED_TRACER[0m) += trace_sched_wakeup.o obj-$([31mCONFIG_HWLAT_TRACER[0m) += trace_hwlat.o obj-$([31mCONFIG_NOP_TRACER[0m) += trace_nop.o obj-$([31mCONFIG_STACK_TRACER[0m) += trace_stack.o obj-$([31mCONFIG_MMIOTRACE[0m) += trace_mmiotrace.o obj-$([31mCONFIG_FUNCTION_GRAPH_TRACER[0m) += trace_functions_graph.o obj-$([31mCONFIG_TRACE_BRANCH_PROFILING[0m) += trace_branch.o obj-$([31mCONFIG_BLK_DEV_IO_TRACE[0m) += blktrace.o obj-$([31mCONFIG_FUNCTION_GRAPH_TRACER[0m) += fgraph.o ifeq ($([31mCONFIG_BLOCK[0m),y) obj-$([31mCONFIG_EVENT_TRACING[0m) += blktrace.o endif obj-$([31mCONFIG_EVENT_TRACING[0m) += trace_events.o obj-$([31mCONFIG_EVENT_TRACING[0m) += trace_export.o obj-$([31mCONFIG_FTRACE_SYSCALLS[0m) += trace_syscalls.o ifeq ($([31mCONFIG_PERF_EVENTS[0m),y) obj-$([31mCONFIG_EVENT_TRACING[0m) += trace_event_perf.o endif obj-$([31mCONFIG_EVENT_TRACING[0m) += trace_events_filter.o obj-$([31mCONFIG_EVENT_TRACING[0m) += trace_events_trigger.o obj-$([31mCONFIG_HIST_TRIGGERS[0m) += trace_events_hist.o obj-$([31mCONFIG_BPF_EVENTS[0m) += bpf_trace.o obj-$([31mCONFIG_KPROBE_EVENTS[0m) += trace_kprobe.o obj-$([31mCONFIG_TRACEPOINTS[0m) += power-traces.o ifeq ($([31mCONFIG_PM[0m),y) obj-$([31mCONFIG_TRACEPOINTS[0m) += rpm-traces.o endif ifeq ($([31mCONFIG_TRACING[0m),y) obj-$([31mCONFIG_KGDB_KDB[0m) += trace_kdb.o endif obj-$([31mCONFIG_DYNAMIC_EVENTS[0m) += trace_dynevent.o obj-$([31mCONFIG_PROBE_EVENTS[0m) += trace_probe.o obj-$([31mCONFIG_UPROBE_EVENTS[0m) += trace_uprobe.o obj-$([31mCONFIG_TRACEPOINT_BENCHMARK[0m) += trace_benchmark.o libftrace-y := ftrace.o |