diff options
author | lixialiu <lixialiu@138bc75d-0d04-0410-961f-82ee72b054a4> | 2008-08-15 18:26:53 +0000 |
---|---|---|
committer | lixialiu <lixialiu@138bc75d-0d04-0410-961f-82ee72b054a4> | 2008-08-15 18:26:53 +0000 |
commit | 21eaaf01b77d1b55bc3a689a665bcfe4b7b7a4ae (patch) | |
tree | 910b561a06edcf161d179f7d5f1a503142c71270 /libstdc++-v3/testsuite/Makefile.am | |
parent | df61432e374b997ae649d7efd14aaf3e866d0b52 (diff) | |
download | gcc-21eaaf01b77d1b55bc3a689a665bcfe4b7b7a4ae.tar.gz |
This patch has implemented an tool to advise programmers to use
standard c++ library efficiently. The patch includes instrumentation
in standard c++ library, profiling runtime library and wrapper of
profile mode. The patch also includes modification in GCC driver to
turn on tool with option -fprofile-stdlib. Current version contains four
diagnostics: HASHTABLE_TOO_SMALL, HASHTABLE_TOO_LARGE,
VECTOR_TOO_SMALL and VECTOR_TOO_LARGE.
The details can be referred to the design document of profile mode in manual.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/profile-stdlib@139134 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libstdc++-v3/testsuite/Makefile.am')
-rw-r--r-- | libstdc++-v3/testsuite/Makefile.am | 25 |
1 files changed, 23 insertions, 2 deletions
diff --git a/libstdc++-v3/testsuite/Makefile.am b/libstdc++-v3/testsuite/Makefile.am index 407d7c95f91..2b7e9e51a07 100644 --- a/libstdc++-v3/testsuite/Makefile.am +++ b/libstdc++-v3/testsuite/Makefile.am @@ -121,6 +121,14 @@ libgomp_flags=-B${glibcxx_builddir}/../libgomp \ atomic_flags=$(ATOMIC_FLAGS) parallel_flags="unix/-D_GLIBCXX_PARALLEL/-fopenmp" +# Runs the testsuite in profile mode. +libprofc++_dir = ${glibcxx_builddir}/libprofc++ +libprofc++_flags = -B${glibcxx_builddir}/libprofc++ \ + -I${glibcxx_builddir}/libprofc++ \ + -L${glibcxx_builddir}/libprofc++/.libs + +profile_flags = "unix/-fprofile-stdlib" + check-parallel: site.exp -@(if test ! -d $${libgomp_dir}; then \ echo "Testing parallel mode failed as libgomp not present."; \ @@ -139,8 +147,21 @@ check-performance-parallel: testsuite_files_performance ${performance_script} CXXFLAGS="-D_GLIBCXX_PARALLEL -fopenmp $(atomic_flags) $(libgomp_flags)"; export CXXFLAGS; \ ${check_performance_script} ${glibcxx_srcdir} ${glibcxx_builddir}) +check-profile: site.exp + -@(if test ! -d $${libprofc++_dir}; then \ + echo "Testing profiling mode failed as libprofc++ not present."; \ + exit 1; \ + fi; \ + outputdir=profile; export outputdir; \ + if test ! -d $${outputdir}; then \ + mkdir $${outputdir}; \ + fi; \ + srcdir=`$(am__cd) $(srcdir) && pwd`; export srcdir; \ + EXPECT=$(EXPECT); export EXPECT; \ + $(MAKE) CXXFLAGS="$(atomic_flags) $(libprofc++_flags)" RUNTESTFLAGS="$(RUNTESTFLAGS) conformance.exp --outdir $${outputdir} --objdir $${outputdir} --target_board=$(profile_flags)" check-DEJAGNU; ) + .PHONY: baseline_symbols new-abi-baseline \ - check-abi check-compile check-performance check-parallel + check-abi check-compile check-performance check-parallel check-profile # By adding these files here, automake will remove them for 'make clean' CLEANFILES = *.txt *.tst *.exe core* filebuf_* tmp* ostream_* *.log *.sum \ @@ -149,4 +170,4 @@ CLEANFILES = *.txt *.tst *.exe core* filebuf_* tmp* ostream_* *.log *.sum \ # To remove directories. clean-local: - rm -rf parallel + rm -rf parallel profile |