From patchwork Mon Oct 14 18:35:52 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Mohamad Gebai X-Patchwork-Id: 283375 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id E12302C032E for ; Tue, 15 Oct 2013 05:38:19 +1100 (EST) Received: from localhost ([::1]:38303 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VVn21-0003ZD-Q0 for incoming@patchwork.ozlabs.org; Mon, 14 Oct 2013 14:38:17 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:48205) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VVn07-00015H-Me for qemu-devel@nongnu.org; Mon, 14 Oct 2013 14:36:24 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VVn02-0001G5-Gq for qemu-devel@nongnu.org; Mon, 14 Oct 2013 14:36:19 -0400 Received: from mail-ie0-x234.google.com ([2607:f8b0:4001:c03::234]:54043) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VVn02-0001Fd-Bs for qemu-devel@nongnu.org; Mon, 14 Oct 2013 14:36:14 -0400 Received: by mail-ie0-f180.google.com with SMTP id e14so8643186iej.11 for ; Mon, 14 Oct 2013 11:36:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=K2WcbbGqEE2ltm33tJ4legWzw3iJLbdwyddKqHxMOB8=; b=I4k/+cHmM+e2oROLASGlKFJqsgSd0LI20pK6Gh7FRLNgIqFjY+OYua24kUO4xkt9OA 59IwUt8wzqUNJWxhT7nqPgFb+ZABCVcTycLoy/BT7nNMGCrpWaqJPx9M/2AbCGlRRIg5 3jvmamadI78Wh4/A0MMQG9ggIEpj1V1fnKDsfAyHHN0uE1AQv6xnlaf/ilzqxFoijXw+ thcY3eTbg5OSAEkEMlB/g2K+u/Su9/EOlqQmqRgU5xvB8m457+QwzyzGZ13Nj98lGi0o WRt3qFiKtblFOoaF0ncJsxtybmrJswurWeBTdQUjfPOXUwOtldB/fCEBIl8A7dAD7QU0 PcvQ== X-Received: by 10.42.128.207 with SMTP id n15mr21175663ics.7.1381775773777; Mon, 14 Oct 2013 11:36:13 -0700 (PDT) Received: from mogeb-Inspiron-7520.polymtl.ca (Sansfil-Public-Lassonde-222-77.polymtl.ca. [132.207.222.77]) by mx.google.com with ESMTPSA id cl4sm22005279igc.1.2013.10.14.11.36.12 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 14 Oct 2013 11:36:13 -0700 (PDT) From: Mohamad Gebai To: qemu-devel@nongnu.org Date: Mon, 14 Oct 2013 14:35:52 -0400 Message-Id: <1381775755-8421-4-git-send-email-mohamad.gebai@polymtl.ca> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1381775755-8421-1-git-send-email-mohamad.gebai@polymtl.ca> References: <1381775755-8421-1-git-send-email-mohamad.gebai@polymtl.ca> X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2607:f8b0:4001:c03::234 Cc: Mohamad Gebai , alex.bennee@linaro.org Subject: [Qemu-devel] [RFC PATCH v3 3/5] Adapt Makefiles to the new LTTng ust interface. X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Add generation of new files for LTTng ust. Signed-off-by: Mohamad Gebai Reviewed-by: Alex Bennée --- Makefile | 5 +++++ trace/Makefile.objs | 29 +++++++++++++++++++++++++++-- 2 files changed, 32 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 60fb87e..0c797c5 100644 --- a/Makefile +++ b/Makefile @@ -50,6 +50,11 @@ GENERATED_HEADERS += trace/generated-tracers-dtrace.h endif GENERATED_SOURCES += trace/generated-tracers.c +ifeq ($(TRACE_BACKEND),ust) +GENERATED_HEADERS += trace/generated-ust-provider.h +GENERATED_SOURCES += trace/generated-ust.c +endif + # Don't try to regenerate Makefile or configure # We don't generate any of them Makefile: ; diff --git a/trace/Makefile.objs b/trace/Makefile.objs index 3b88e49..00880b3 100644 --- a/trace/Makefile.objs +++ b/trace/Makefile.objs @@ -1,9 +1,33 @@ # -*- mode: makefile -*- ###################################################################### +# Auto-generated event descriptions for LTTng ust code + +ifeq ($(TRACE_BACKEND),ust) +$(obj)/generated-ust-provider.h: $(obj)/generated-ust-provider.h-timestamp +$(obj)/generated-ust-provider.h-timestamp: $(SRC_PATH)/trace-events + $(call quiet-command,$(TRACETOOL) \ + --format=ust-events-h \ + --backend=events \ + < $< > $@," GEN $(patsubst %-timestamp,%,$@)") + @cmp -s $@ $(patsubst %-timestamp,%,$@) || cp $@ $(patsubst %-timestamp,%,$@) + +$(obj)/generated-ust.c: $(obj)/generated-ust.c-timestamp $(BUILD_DIR)/config-host.mak +$(obj)/generated-ust.c-timestamp: $(SRC_PATH)/trace-events + $(call quiet-command,$(TRACETOOL) \ + --format=ust-events-c \ + --backend=events \ + < $< > $@," GEN $(patsubst %-timestamp,%,$@)") + @cmp -s $@ $(patsubst %-timestamp,%,$@) || cp $@ $(patsubst %-timestamp,%,$@) + +ust_provider=$(obj)/generated-ust-provider.h +ust=$(obj)/generated-ust.c +endif + +###################################################################### # Auto-generated event descriptions -$(obj)/generated-events.h: $(obj)/generated-events.h-timestamp +$(obj)/generated-events.h: $(obj)/generated-events.h-timestamp $(ust_provider) $(obj)/generated-events.h-timestamp: $(SRC_PATH)/trace-events $(call quiet-command,$(TRACETOOL) \ --format=events-h \ @@ -11,7 +35,7 @@ $(obj)/generated-events.h-timestamp: $(SRC_PATH)/trace-events < $< > $@," GEN $(patsubst %-timestamp,%,$@)") @cmp -s $@ $(patsubst %-timestamp,%,$@) || cp $@ $(patsubst %-timestamp,%,$@) -$(obj)/generated-events.c: $(obj)/generated-events.c-timestamp $(BUILD_DIR)/config-host.mak +$(obj)/generated-events.c: $(obj)/generated-events.c-timestamp $(BUILD_DIR)/config-host.mak $(ust) $(obj)/generated-events.c-timestamp: $(SRC_PATH)/trace-events $(call quiet-command,$(TRACETOOL) \ --format=events-c \ @@ -77,5 +101,6 @@ util-obj-$(CONFIG_TRACE_DEFAULT) += default.o util-obj-$(CONFIG_TRACE_SIMPLE) += simple.o util-obj-$(CONFIG_TRACE_STDERR) += stderr.o util-obj-$(CONFIG_TRACE_FTRACE) += ftrace.o +util-obj-$(CONFIG_TRACE_UST) += generated-ust.o util-obj-y += control.o util-obj-y += generated-tracers.o