From fd61d626b30489911bfb88d464b5632042d279b3 Mon Sep 17 00:00:00 2001 From: Min He Date: Thu, 14 Feb 2019 08:57:21 +0000 Subject: [PATCH] Makefile: adding profiling option in Makefile 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 --- hypervisor/Makefile | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/hypervisor/Makefile b/hypervisor/Makefile index 879028c0f..ae00eb934 100644 --- a/hypervisor/Makefile +++ b/hypervisor/Makefile @@ -32,6 +32,8 @@ ARCH_ASFLAGS := ARCH_ARFLAGS := ARCH_LDFLAGS := +PROFILING ?= 1 + .PHONY: default default: all @@ -239,7 +241,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))