[icinga-checkins] icinga.org: icinga-core/test/cgis: enable profiling with gprof compiler flags

git at icinga.org git at icinga.org
Wed Aug 1 03:00:11 CEST 2012


Module: icinga-core
Branch: test/cgis
Commit: 172c686b5778c36542c42294202e688fbd27ea11
URL:    https://git.icinga.org/?p=icinga-core.git;a=commit;h=172c686b5778c36542c42294202e688fbd27ea11

Author: Michael Friedrich <michael.friedrich at univie.ac.at>
Date:   Fri Jul 20 17:22:57 2012 +0200

enable profiling with gprof compiler flags

---

 .gitignore       |    1 +
 base/Makefile.in |    2 +-
 cgi/Makefile.in  |    3 +++
 lib/Makefile.in  |    2 +-
 4 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/.gitignore b/.gitignore
index 4b41221..1406eec 100644
--- a/.gitignore
+++ b/.gitignore
@@ -25,3 +25,4 @@ tags
 .libs/
 *.la
 *.lo
+*.gcno
diff --git a/base/Makefile.in b/base/Makefile.in
index 5c4cc55..2fd19d8 100644
--- a/base/Makefile.in
+++ b/base/Makefile.in
@@ -14,7 +14,7 @@ CFLAGS=@CFLAGS@ @DEFS@ -DNSCORE
 
 # Compiler flags for use with gprof
 # when running prof, make sure to remove drop_privilegues when running!
-#CFLAGS=@CFLAGS@ -pg @DEFS@ -DNSCORE
+CFLAGS += -pg -ftest-coverage
 
 # Compiler flags for use with Valgrind
 #CFLAGS=-O0 -g -DHAVE_CONFIG_H -DNSCORE
diff --git a/cgi/Makefile.in b/cgi/Makefile.in
index acd0c29..5b61592 100644
--- a/cgi/Makefile.in
+++ b/cgi/Makefile.in
@@ -29,6 +29,9 @@ CP=@CP@
 CC=@CC@
 CFLAGS=@CFLAGS@ @DEFS@ -DNSCGI
 
+# for profiling
+CFLAGS += -pg -ftest-coverage
+
 # Compiler flags for optimization (overrides default)
 #CFLAGS=-O3 -Wall -Wshadow -Wpointer-arith -Wcast-qual -Wcast-align -Wstrict-prototypes -Wmissing-prototypes -Wnested-externs -DHAVE_CONFIG_H -DNSCGI
 
diff --git a/lib/Makefile.in b/lib/Makefile.in
index fd64ceb..b165684 100644
--- a/lib/Makefile.in
+++ b/lib/Makefile.in
@@ -2,7 +2,7 @@ CC = gcc
 COV_CFLAGS = -O0 -ftest-coverage -fprofile-arcs -pg
 LDFLAGS = $(COV_CFLAGS)
 CFLAGS = -Wall @CFLAGS@ @DEFS@
-#PROFILE_CFLAGS = -pg -ftest-coverage
+PROFILE_CFLAGS = -pg -ftest-coverage
 ALL_CFLAGS = $(CFLAGS) $(PROFILE_CFLAGS)
 LIBNAME = libicinga.a
 





More information about the icinga-checkins mailing list