[PATCH 2/2] Makefile: adding profiling option in Makefile
Min He
min.he at intel.com
Fri Feb 15 01:42:04 UTC 2019
This patch added a option to control profiling on/off, by default,
profiling is on, so that VTune can be used to capture perf data from
SOS.
When running: make PROFILING=0, it will disable profiling and pmu will
be pass-thru and perf tools can be run directly inside UOS.
Signed-off-by: Min He <min.he at intel.com>
---
hypervisor/Makefile | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/hypervisor/Makefile b/hypervisor/Makefile
index 4fbd75b9..823ca7a6 100644
--- a/hypervisor/Makefile
+++ b/hypervisor/Makefile
@@ -32,6 +32,8 @@ ARCH_ASFLAGS :=
ARCH_ARFLAGS :=
ARCH_LDFLAGS :=
+PROFILING ?= 1
+
.PHONY: default
default: all
@@ -266,7 +268,10 @@ endif
C_OBJS := $(patsubst %.c,$(HV_OBJDIR)/%.o,$(C_SRCS))
ifneq ($(CONFIG_RELEASE),y)
-CFLAGS += -DHV_DEBUG -DPROFILING_ON -fno-omit-frame-pointer
+CFLAGS += -DHV_DEBUG -fno-omit-frame-pointer
+ifeq ($(PROFILING), 1)
+CFLAGS += -DPROFILING_ON
+endif
endif
S_OBJS := $(patsubst %.S,$(HV_OBJDIR)/%.o,$(S_SRCS))
--
2.17.0
More information about the intel-gvt-dev
mailing list