Clean up using global_dirty_limit wrapper for writeback probe
[deliverable/lttng-modules.git] / probes / Makefile
CommitLineData
6d61b34d
MD
1#
2# Makefile for the LTT probes.
df4b4094 3# Only build from the package top-level directory. Never use with make directly.
6d61b34d
MD
4
5ifneq ($(KERNELRELEASE),)
6ifneq ($(CONFIG_TRACEPOINTS),)
7
8ccflags-y += -I$(PWD)/probes
40652b65 9obj-m += lttng-types.o
6d61b34d 10
cd4bd11f 11obj-m += lttng-probe-lttng.o
6db3d13b 12obj-m += lttng-probe-sched.o
0d1d4002 13obj-m += lttng-probe-irq.o
e54456f5 14obj-m += lttng-probe-timer.o
b283666f
PW
15obj-m += lttng-probe-kmem.o
16obj-m += lttng-probe-module.o
17obj-m += lttng-probe-power.o
8c468a9b 18
c337ddc2
MD
19obj-m += lttng-probe-statedump.o
20
056f5922
MD
21ifneq ($(CONFIG_KVM),)
22obj-m += lttng-probe-kvm.o
23endif
24
3a523f5b
MD
25obj-m += $(shell \
26 if [ $(VERSION) -ge 3 \
7c68b363 27 -o \( $(VERSION) -eq 2 -a $(PATCHLEVEL) -ge 6 -a $(SUBLEVEL) -ge 33 \) ] ; then \
3a523f5b
MD
28 echo "lttng-probe-signal.o" ; fi;)
29
c9604bd3
MD
30ifneq ($(CONFIG_BLOCK),)
31ifneq ($(CONFIG_EVENT_TRACING),) # need blk_cmd_buf_len
7c68b363 32obj-m += lttng-probe-block.o
c9604bd3
MD
33endif
34endif
35
b283666f 36ifneq ($(CONFIG_NET),)
b283666f
PW
37obj-m += lttng-probe-napi.o
38obj-m += lttng-probe-skb.o
7c68b363
AG
39obj-m += $(shell \
40 if [ $(VERSION) -ge 3 \
41 -o \( $(VERSION) -eq 2 -a $(PATCHLEVEL) -ge 6 -a $(SUBLEVEL) -ge 37 \) ] ; then \
42 echo "lttng-probe-net.o" ; fi;)
b283666f
PW
43obj-m += $(shell \
44 if [ $(VERSION) -ge 3 -a $(PATCHLEVEL) -ge 1 ] ; then \
45 echo "lttng-probe-sock.o" ; fi;)
46obj-m += $(shell \
47 if [ $(VERSION) -ge 3 -a $(PATCHLEVEL) -ge 1 ] ; then \
48 echo "lttng-probe-udp.o" ; fi;)
49endif
50
51ifneq ($(CONFIG_SND_SOC),)
52obj-m += $(shell \
53 if [ $(VERSION) -ge 3 \
54 -o \( $(VERSION) -eq 2 -a $(PATCHLEVEL) -ge 6 -a $(SUBLEVEL) -ge 38 \) ] ; then \
55 echo "lttng-probe-asoc.o" ; fi;)
56endif
57
58ifneq ($(CONFIG_EXT3_FS),)
7c68b363
AG
59ext3_dep = $(srctree)/fs/ext3/*.h
60ext3_dep_check = $(wildcard $(ext3_dep))
61ext3 = $(shell \
b283666f 62 if [ $(VERSION) -ge 3 -a $(PATCHLEVEL) -ge 1 ] ; then \
7c68b363
AG
63 if [ $(VERSION) -ge 3 -a $(PATCHLEVEL) -ge 4 -a \
64 -z "$(ext3_dep_check)" ] ; then \
65 echo "warn" ; \
66 exit ; \
67 fi; \
68 echo "lttng-probe-ext3.o" ; \
69 fi;)
70ifeq ($(ext3),warn)
71$(warning Files $(ext3_dep) not found. Probe "ext3" is disabled. Use full kernel source tree to enable it.)
72ext3 =
73endif
74obj-m += $(ext3)
b283666f
PW
75endif
76
77ifneq ($(CONFIG_GPIOLIB),)
78obj-m += $(shell \
79 if [ $(VERSION) -ge 3 ] ; then \
80 echo "lttng-probe-gpio.o" ; fi;)
81endif
82
83ifneq ($(CONFIG_JBD2),)
84obj-m += lttng-probe-jbd2.o
85endif
86
87ifneq ($(CONFIG_JBD),)
88obj-m += $(shell \
89 if [ $(VERSION) -ge 3 -a $(PATCHLEVEL) -ge 1 ] ; then \
90 echo "lttng-probe-jbd.o" ; fi;)
91endif
92
93ifneq ($(CONFIG_REGULATOR),)
94obj-m += $(shell \
95 if [ $(VERSION) -ge 3 \
96 -o \( $(VERSION) -eq 2 -a $(PATCHLEVEL) -ge 6 -a $(SUBLEVEL) -ge 38 \) ] ; then \
97 echo "lttng-probe-regulator.o" ; fi;)
98endif
99
100ifneq ($(CONFIG_SCSI),)
101obj-m += $(shell \
7c68b363
AG
102 if [ $(VERSION) -ge 3 \
103 -o \( $(VERSION) -eq 2 -a $(PATCHLEVEL) -ge 6 -a $(SUBLEVEL) -ge 35 \) ] ; then \
b283666f
PW
104 echo "lttng-probe-scsi.o" ; fi;)
105endif
106
107vmscan = $(shell \
7c68b363
AG
108 if [ $(VERSION) -ge 3 \
109 -o \( $(VERSION) -eq 2 -a $(PATCHLEVEL) -ge 6 -a $(SUBLEVEL) -ge 36 \) ] ; then \
b283666f
PW
110 echo "lttng-probe-vmscan.o" ; fi;)
111ifneq ($(CONFIG_SWAP),)
112 obj-m += $(vmscan)
113else
114ifneq ($(CONFIG_CGROUP_MEM_RES_CTLR),)
115 obj-m += $(vmscan)
116endif
117endif
118
7c68b363
AG
119# lock probe does not work, so disabling it for now
120#ifneq ($(CONFIG_LOCKDEP),)
121#obj-m += lttng-probe-lock.o
122#endif
123
b87700e3
AG
124ifneq ($(CONFIG_BTRFS_FS),)
125btrfs_dep = $(srctree)/fs/btrfs/*.h
126btrfs = $(shell \
127 if [ $(VERSION) -ge 3 \
128 -o \( $(VERSION) -eq 2 -a $(PATCHLEVEL) -ge 6 -a $(SUBLEVEL) -ge 39 \) ] ; then \
129 echo "lttng-probe-btrfs.o" ; fi;)
130ifneq ($(btrfs),)
131ifeq ($(wildcard $(btrfs_dep)),)
132$(warning Files $(btrfs_dep) not found. Probe "btrfs" is disabled. Use full kernel source tree to enable it.)
133btrfs =
134endif
135endif
136obj-m += $(btrfs)
137endif
138
139obj-m += $(shell \
140 if [ $(VERSION) -ge 3 \
141 -o \( $(VERSION) -eq 2 -a $(PATCHLEVEL) -ge 6 -a $(SUBLEVEL) -ge 38 \) ] ; then \
142 echo "lttng-probe-compaction.o" ; fi;)
143
144ifneq ($(CONFIG_EXT4_FS),)
145ext4_dep = $(srctree)/fs/ext4/*.h
146ext4 = lttng-probe-ext4.o
147ifeq ($(wildcard $(ext4_dep)),)
148$(warning Files $(ext4_dep) not found. Probe "ext4" is disabled. Use full kernel source tree to enable it.)
149ext4 =
150endif
151obj-m += $(ext4)
152endif
153
154obj-m += $(shell \
155 if [ $(VERSION) -ge 3 -a $(PATCHLEVEL) -ge 4 ] ; then \
156 echo "lttng-probe-printk.o" ; fi;)
157ifneq ($(CONFIG_FRAME_WARN),0)
158CFLAGS_lttng-probe-printk.o += -Wframe-larger-than=2200
159endif
160
161obj-m += $(shell \
162 if [ \( $(VERSION) -eq 3 -a $(PATCHLEVEL) -ge 6 \) \
163 -o \( $(VERSION) -eq 3 -a $(PATCHLEVEL) -eq 5 -a $(SUBLEVEL) -ge 2 \) \
164 -o \( $(VERSION) -eq 3 -a $(PATCHLEVEL) -eq 4 -a $(SUBLEVEL) -ge 9 \) \
165 -o \( $(VERSION) -eq 3 -a $(PATCHLEVEL) -eq 0 -a $(SUBLEVEL) -ge 41 \) ] ; then \
166 echo "lttng-probe-random.o" ; fi;)
167
168obj-m += $(shell \
169 if [ $(VERSION) -ge 3 -a $(PATCHLEVEL) -ge 2 ] ; then \
170 echo "lttng-probe-rcu.o" ; fi;)
171
172ifneq ($(CONFIG_REGMAP),)
173obj-m += $(shell \
174 if [ $(VERSION) -ge 3 -a $(PATCHLEVEL) -ge 2 ] ; then \
175 echo "lttng-probe-regmap.o" ; fi;)
176endif
177
178ifneq ($(CONFIG_PM_RUNTIME),)
179obj-m += $(shell \
180 if [ $(VERSION) -ge 3 -a $(PATCHLEVEL) -ge 2 ] ; then \
181 echo "lttng-probe-rpm.o" ; fi;)
182endif
183
184ifneq ($(CONFIG_SUNRPC),)
185obj-m += $(shell \
186 if [ $(VERSION) -ge 3 -a $(PATCHLEVEL) -ge 4 ] ; then \
187 echo "lttng-probe-sunrpc.o" ; fi;)
188endif
189
190obj-m += lttng-probe-workqueue.o
191
42d9070d 192ifneq ($(CONFIG_KALLSYMS_ALL),)
b87700e3
AG
193obj-m += $(shell \
194 if [ $(VERSION) -ge 3 \
195 -o \( $(VERSION) -eq 2 -a $(PATCHLEVEL) -ge 6 -a $(SUBLEVEL) -ge 36 \) ] ; then \
196 echo "lttng-probe-writeback.o" ; fi;)
42d9070d 197endif
b87700e3 198
b283666f 199
acd614cc 200ifneq ($(CONFIG_KPROBES),)
d6d808f3 201obj-m += lttng-kprobes.o
acd614cc 202endif
d6d808f3 203
7371f44c
MD
204
205ifneq ($(CONFIG_KRETPROBES),)
206obj-m += lttng-kretprobes.o
207endif
208
e0a7a7c4
MD
209ifneq ($(CONFIG_DYNAMIC_FTRACE),)
210obj-m += lttng-ftrace.o
211endif
212
6d61b34d
MD
213endif
214
215else
216 KERNELDIR ?= /lib/modules/$(shell uname -r)/build
217 PWD := $(shell pwd)
218 CFLAGS = $(EXTCFLAGS)
219
220default:
221 $(MAKE) -C $(KERNELDIR) M=$(PWD) modules
222
223modules_install:
224 $(MAKE) -C $(KERNELDIR) M=$(PWD) modules_install
225 /sbin/depmod -a
226
227clean:
228 $(MAKE) -C $(KERNELDIR) M=$(PWD) clean
229
230endif
This page took 0.040948 seconds and 5 git commands to generate.