Ingo Molnar | b53dde9 | 2008-05-12 21:20:51 +0200 | [diff] [blame] | 1 | |
Steven Rostedt | 377ccbb | 2016-07-28 22:30:43 -0400 | [diff] [blame] | 2 | # We are fully aware of the dangers of __builtin_return_address() |
| 3 | FRAME_CFLAGS := $(call cc-disable-warning,frame-address) |
| 4 | KBUILD_CFLAGS += $(FRAME_CFLAGS) |
| 5 | |
Ingo Molnar | b53dde9 | 2008-05-12 21:20:51 +0200 | [diff] [blame] | 6 | # Do not instrument the tracer itself: |
| 7 | |
Steven Rostedt | 606576c | 2008-10-06 19:06:12 -0400 | [diff] [blame] | 8 | ifdef CONFIG_FUNCTION_TRACER |
Ingo Molnar | b53dde9 | 2008-05-12 21:20:51 +0200 | [diff] [blame] | 9 | ORIG_CFLAGS := $(KBUILD_CFLAGS) |
Heiko Carstens | c0a80c0 | 2015-01-09 13:06:33 +0100 | [diff] [blame] | 10 | KBUILD_CFLAGS = $(subst $(CC_FLAGS_FTRACE),,$(ORIG_CFLAGS)) |
Steven Rostedt | d05cdb2 | 2008-05-12 21:20:54 +0200 | [diff] [blame] | 11 | |
Steven Rostedt | 47239c4 | 2012-07-20 11:13:07 -0400 | [diff] [blame] | 12 | ifdef CONFIG_FTRACE_SELFTEST |
Steven Rostedt | d05cdb2 | 2008-05-12 21:20:54 +0200 | [diff] [blame] | 13 | # selftest needs instrumentation |
Heiko Carstens | c0a80c0 | 2015-01-09 13:06:33 +0100 | [diff] [blame] | 14 | CFLAGS_trace_selftest_dynamic.o = $(CC_FLAGS_FTRACE) |
Steven Rostedt | d05cdb2 | 2008-05-12 21:20:54 +0200 | [diff] [blame] | 15 | obj-y += trace_selftest_dynamic.o |
Ingo Molnar | b53dde9 | 2008-05-12 21:20:51 +0200 | [diff] [blame] | 16 | endif |
Steven Rostedt | 47239c4 | 2012-07-20 11:13:07 -0400 | [diff] [blame] | 17 | endif |
Ingo Molnar | b53dde9 | 2008-05-12 21:20:51 +0200 | [diff] [blame] | 18 | |
Steven Rostedt | 52f232c | 2008-11-12 00:14:40 -0500 | [diff] [blame] | 19 | # If unlikely tracing is enabled, do not trace these files |
Steven Rostedt | 2ed84ee | 2008-11-12 15:24:24 -0500 | [diff] [blame] | 20 | ifdef CONFIG_TRACING_BRANCHES |
| 21 | KBUILD_CFLAGS += -DDISABLE_BRANCH_PROFILING |
Steven Rostedt | 52f232c | 2008-11-12 00:14:40 -0500 | [diff] [blame] | 22 | endif |
| 23 | |
Steven Rostedt (Red Hat) | 81dc9f0 | 2014-05-29 22:49:07 -0400 | [diff] [blame] | 24 | CFLAGS_trace_benchmark.o := -I$(src) |
Jiri Olsa | 1d0e78e | 2011-08-11 16:25:54 +0200 | [diff] [blame] | 25 | CFLAGS_trace_events_filter.o := -I$(src) |
| 26 | |
Josh Triplett | ea632e9 | 2012-09-02 19:45:14 -0700 | [diff] [blame] | 27 | obj-$(CONFIG_TRACE_CLOCK) += trace_clock.o |
Ingo Molnar | 56449f4 | 2009-04-14 11:24:36 +0200 | [diff] [blame] | 28 | |
Steven Rostedt | 606576c | 2008-10-06 19:06:12 -0400 | [diff] [blame] | 29 | obj-$(CONFIG_FUNCTION_TRACER) += libftrace.o |
Steven Rostedt | 7a8e76a | 2008-09-29 23:02:38 -0400 | [diff] [blame] | 30 | obj-$(CONFIG_RING_BUFFER) += ring_buffer.o |
Steven Rostedt | 5092dbc | 2009-05-05 22:47:18 -0400 | [diff] [blame] | 31 | obj-$(CONFIG_RING_BUFFER_BENCHMARK) += ring_buffer_benchmark.o |
Arnaldo Carvalho de Melo | 16444a8 | 2008-05-12 21:20:42 +0200 | [diff] [blame] | 32 | |
Steven Rostedt | bc0c38d | 2008-05-12 21:20:42 +0200 | [diff] [blame] | 33 | obj-$(CONFIG_TRACING) += trace.o |
Steven Rostedt | f0868d1 | 2008-12-23 23:24:12 -0500 | [diff] [blame] | 34 | obj-$(CONFIG_TRACING) += trace_output.o |
Steven Rostedt (Red Hat) | 1230627 | 2014-06-20 13:38:54 -0400 | [diff] [blame] | 35 | obj-$(CONFIG_TRACING) += trace_seq.o |
Frederic Weisbecker | dbd0b4b | 2008-12-28 20:44:51 -0800 | [diff] [blame] | 36 | obj-$(CONFIG_TRACING) += trace_stat.o |
Frederic Weisbecker | 769b044 | 2009-03-06 17:21:49 +0100 | [diff] [blame] | 37 | obj-$(CONFIG_TRACING) += trace_printk.o |
Tom Zanussi | 08d43a5 | 2015-12-10 12:50:50 -0600 | [diff] [blame] | 38 | obj-$(CONFIG_TRACING_MAP) += tracing_map.o |
Steven Rostedt | 35e8e30 | 2008-05-12 21:20:42 +0200 | [diff] [blame] | 39 | obj-$(CONFIG_CONTEXT_SWITCH_TRACER) += trace_sched_switch.o |
Steven Rostedt | 606576c | 2008-10-06 19:06:12 -0400 | [diff] [blame] | 40 | obj-$(CONFIG_FUNCTION_TRACER) += trace_functions.o |
Steven Rostedt | 81d68a9 | 2008-05-12 21:20:42 +0200 | [diff] [blame] | 41 | obj-$(CONFIG_IRQSOFF_TRACER) += trace_irqsoff.o |
Steven Rostedt | 6cd8a4b | 2008-05-12 21:20:42 +0200 | [diff] [blame] | 42 | obj-$(CONFIG_PREEMPT_TRACER) += trace_irqsoff.o |
Steven Rostedt | 352ad25 | 2008-05-12 21:20:42 +0200 | [diff] [blame] | 43 | obj-$(CONFIG_SCHED_TRACER) += trace_sched_wakeup.o |
Steven Noonan | fb1b6d8 | 2008-09-19 03:06:43 -0700 | [diff] [blame] | 44 | obj-$(CONFIG_NOP_TRACER) += trace_nop.o |
Steven Rostedt | e5a81b6 | 2008-08-27 23:31:01 -0400 | [diff] [blame] | 45 | obj-$(CONFIG_STACK_TRACER) += trace_stack.o |
Pekka Paalanen | f984b51 | 2008-05-12 21:20:57 +0200 | [diff] [blame] | 46 | obj-$(CONFIG_MMIOTRACE) += trace_mmiotrace.o |
Frederic Weisbecker | fb52607 | 2008-11-25 21:07:04 +0100 | [diff] [blame] | 47 | obj-$(CONFIG_FUNCTION_GRAPH_TRACER) += trace_functions_graph.o |
Steven Rostedt | 94b80ff | 2008-11-12 16:18:45 -0500 | [diff] [blame] | 48 | obj-$(CONFIG_TRACE_BRANCH_PROFILING) += trace_branch.o |
Li Zefan | 5578213 | 2009-06-09 13:43:05 +0800 | [diff] [blame] | 49 | obj-$(CONFIG_BLK_DEV_IO_TRACE) += blktrace.o |
| 50 | ifeq ($(CONFIG_BLOCK),y) |
| 51 | obj-$(CONFIG_EVENT_TRACING) += blktrace.o |
| 52 | endif |
Tom Zanussi | 5f77a88 | 2009-04-08 03:14:01 -0500 | [diff] [blame] | 53 | obj-$(CONFIG_EVENT_TRACING) += trace_events.o |
Tom Zanussi | 5f77a88 | 2009-04-08 03:14:01 -0500 | [diff] [blame] | 54 | obj-$(CONFIG_EVENT_TRACING) += trace_export.o |
Frederic Weisbecker | ee08c6e | 2009-03-07 05:52:59 +0100 | [diff] [blame] | 55 | obj-$(CONFIG_FTRACE_SYSCALLS) += trace_syscalls.o |
Li Zefan | 07b139c | 2009-12-21 14:27:35 +0800 | [diff] [blame] | 56 | ifeq ($(CONFIG_PERF_EVENTS),y) |
Frederic Weisbecker | 97d5a22 | 2010-03-05 05:35:37 +0100 | [diff] [blame] | 57 | obj-$(CONFIG_EVENT_TRACING) += trace_event_perf.o |
Li Zefan | 07b139c | 2009-12-21 14:27:35 +0800 | [diff] [blame] | 58 | endif |
Tom Zanussi | 5f77a88 | 2009-04-08 03:14:01 -0500 | [diff] [blame] | 59 | obj-$(CONFIG_EVENT_TRACING) += trace_events_filter.o |
Tom Zanussi | 85f2b08 | 2013-10-24 08:59:24 -0500 | [diff] [blame] | 60 | obj-$(CONFIG_EVENT_TRACING) += trace_events_trigger.o |
Tom Zanussi | 7ef224d | 2016-03-03 12:54:42 -0600 | [diff] [blame] | 61 | obj-$(CONFIG_HIST_TRIGGERS) += trace_events_hist.o |
Ingo Molnar | e1abf2c | 2015-04-02 15:51:39 +0200 | [diff] [blame] | 62 | obj-$(CONFIG_BPF_EVENTS) += bpf_trace.o |
Masami Hiramatsu | 77b44d1 | 2009-11-03 19:12:47 -0500 | [diff] [blame] | 63 | obj-$(CONFIG_KPROBE_EVENT) += trace_kprobe.o |
Mathieu Desnoyers | 870915e | 2010-10-28 11:31:17 -0400 | [diff] [blame] | 64 | obj-$(CONFIG_TRACEPOINTS) += power-traces.o |
Rafael J. Wysocki | 798bc6d | 2014-12-13 02:23:30 +0100 | [diff] [blame] | 65 | ifeq ($(CONFIG_PM),y) |
Ming Lei | 53b615c | 2011-09-27 22:53:27 +0200 | [diff] [blame] | 66 | obj-$(CONFIG_TRACEPOINTS) += rpm-traces.o |
Ming Lei | 2a5306c | 2011-09-29 22:07:23 +0200 | [diff] [blame] | 67 | endif |
Jason Wessel | 955b61e | 2010-08-05 09:22:23 -0500 | [diff] [blame] | 68 | ifeq ($(CONFIG_TRACING),y) |
| 69 | obj-$(CONFIG_KGDB_KDB) += trace_kdb.o |
| 70 | endif |
Srikar Dronamraju | 8ab83f5 | 2012-04-09 14:41:44 +0530 | [diff] [blame] | 71 | obj-$(CONFIG_PROBE_EVENTS) += trace_probe.o |
Srikar Dronamraju | f3f096c | 2012-04-11 16:00:43 +0530 | [diff] [blame] | 72 | obj-$(CONFIG_UPROBE_EVENT) += trace_uprobe.o |
Steven Rostedt | bc0c38d | 2008-05-12 21:20:42 +0200 | [diff] [blame] | 73 | |
Steven Rostedt (Red Hat) | 81dc9f0 | 2014-05-29 22:49:07 -0400 | [diff] [blame] | 74 | obj-$(CONFIG_TRACEPOINT_BENCHMARK) += trace_benchmark.o |
| 75 | |
Arnaldo Carvalho de Melo | 16444a8 | 2008-05-12 21:20:42 +0200 | [diff] [blame] | 76 | libftrace-y := ftrace.o |