Patchwork [v7,03/13] trace: [make] replace 'ifeq' with values in CONFIG_TRACE_*

login
register
mail settings
Submitter =?utf-8?Q?Llu=C3=ADs?=
Date Aug. 25, 2011, 7:17 p.m.
Message ID <20110825191750.1413.79427.stgit@ginnungagap.bsc.es>
Download mbox | patch
Permalink /patch/111651/
State New
Headers show

Comments

=?utf-8?Q?Llu=C3=ADs?= - Aug. 25, 2011, 7:17 p.m.
Signed-off-by: Lluís Vilanova <vilanova@ac.upc.edu>
---
 Makefile.objs |   12 +++++-------
 1 files changed, 5 insertions(+), 7 deletions(-)
Stefan Hajnoczi - Aug. 31, 2011, 12:15 p.m.
On Thu, Aug 25, 2011 at 8:17 PM, Lluís <xscript@gmx.net> wrote:
> Signed-off-by: Lluís Vilanova <vilanova@ac.upc.edu>
> ---
>  Makefile.objs |   12 +++++-------
>  1 files changed, 5 insertions(+), 7 deletions(-)
>
> diff --git a/Makefile.objs b/Makefile.objs
> index 44d7238..aaf6542 100644
> --- a/Makefile.objs
> +++ b/Makefile.objs
> @@ -374,16 +374,14 @@ endif
>
>  simpletrace.o: simpletrace.c $(GENERATED_HEADERS)
>
> -ifeq ($(TRACE_BACKEND),dtrace)
> -trace-obj-y = trace-dtrace.o
> -else
> +trace-obj-$(CONFIG_TRACE_SYSTEMTAP) += trace-dtrace.o
> +ifneq ($(TRACE_BACKEND),dtrace)

ifeq ($(TRACE_BACKEND),dtrace) is not equivalent to ifeq
($(CONFIG_TRACE_SYSTEMTAP),y).

There are 3 cases here:
1. The backend is not DTrace-like (e.g. stderr, simple, ust).
2. The backend is SystemTap (i.e. Fedora and Red Hat builds).
3. The backend is DTrace-like (i.e. Illumos real DTrace)

For most of the build 2 & 3 should be treated the same.  The only case
where we care about SystemTap specifically is when building .stp
files.

Therefore we need to introduce a CONFIG_TRACE_DTRACE in ./configure
and use that instead of CONFIG_TRACE_SYSTEMTAP here.  If we were to
use CONFIG_TRACE_SYSTEMTAP here then Illumos host builds will not be
able to use real DTrace.

Stefan

Patch

diff --git a/Makefile.objs b/Makefile.objs
index 44d7238..aaf6542 100644
--- a/Makefile.objs
+++ b/Makefile.objs
@@ -374,16 +374,14 @@  endif
 
 simpletrace.o: simpletrace.c $(GENERATED_HEADERS)
 
-ifeq ($(TRACE_BACKEND),dtrace)
-trace-obj-y = trace-dtrace.o
-else
+trace-obj-$(CONFIG_TRACE_SYSTEMTAP) += trace-dtrace.o
+ifneq ($(TRACE_BACKEND),dtrace)
 trace-obj-y = trace.o
-ifeq ($(TRACE_BACKEND),simple)
-trace-obj-y += simpletrace.o
-trace-obj-y += qemu-timer-common.o
-endif
 endif
 
+trace-obj-$(CONFIG_TRACE_SIMPLE) += simpletrace.o
+trace-obj-$(CONFIG_TRACE_SIMPLE) += qemu-timer-common.o
+
 ######################################################################
 # smartcard