From 3acc0fe25d9772b5c44ca569f4e91a65803a9fa7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C3=ABl=20Lemaire?= Date: Sat, 17 Aug 2013 15:11:21 +0200 Subject: [PATCH] Removed profiling from debug build --- Makefile | 21 ++++++++++----------- src/common_post.mk | 4 ++-- 2 files changed, 12 insertions(+), 13 deletions(-) diff --git a/Makefile b/Makefile index 54281c6..fd33cde 100644 --- a/Makefile +++ b/Makefile @@ -39,19 +39,18 @@ tests: all LD_LIBRARY_PATH=${BUILDPATH} CK_DEFAULT_TIMEOUT=30 ${BUILDPATH}/paysages-tests run_cli: all - LD_LIBRARY_PATH=${BUILDPATH} ${BUILDPATH}/paysages-cli + LD_LIBRARY_PATH=${BUILDPATH} ${RUNNER} ${BUILDPATH}/paysages-cli -run_qt: all - LD_LIBRARY_PATH=${BUILDPATH} ${BUILDPATH}/paysages-qt +run: all + LD_LIBRARY_PATH=${BUILDPATH} ${RUNNER} ${BUILDPATH}/paysages-qt -profile: - sudo opcontrol --setup --no-vmlinux --event=CPU_CLK_UNHALTED:3000000:0:1:1 --buffer-size=65536 --callgraph=5 --separate=none - sudo opcontrol --reset - sudo opcontrol --start - LD_LIBRARY_PATH=${BUILDPATH} ${BUILDPATH}/paysages-qt || true - sudo opcontrol --shutdown - opannotate --source --output-dir=annotated ${BUILDPATH}/libpaysages.so --base-dirs=. --search-dirs=lib_paysages - opreport -l ${BUILDPATH}/libpaysages.so -c -g | less +profile: debug + LD_LIBRARY_PATH=build/debug perf record -g fp ./build/debug/paysages-qt + perf report -g + +profile_cli: debug + LD_LIBRARY_PATH=build/debug perf record -g fp ./build/debug/paysages-cli + perf report -g install:release mkdir -p ${DESTDIR}/usr/bin diff --git a/src/common_post.mk b/src/common_post.mk index 28b4197..14bc9d6 100644 --- a/src/common_post.mk +++ b/src/common_post.mk @@ -1,8 +1,8 @@ OBJECTS = ${SOURCES:%.c=${OBJPATH}/%.o} ifeq (${BUILDMODE},debug) - CC_FLAGS += -g -pg - CC_LDFLAGS += -g -pg + CC_FLAGS += -g + CC_LDFLAGS += -g endif ifeq (${BUILDMODE},release) CC_FLAGS += -O3 -DNDEBUG -Wno-unused-variable -Wno-unused-but-set-variable