Changeset 3537dd7
- Timestamp:
- Aug 3, 2018, 9:02:32 AM (6 years ago)
- Branches:
- ADT, aaron-thesis, arm-eh, ast-experimental, cleanup-dtors, deferred_resn, demangler, enum, forall-pointer-decay, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, no_list, persistent-indexer, pthread-emulation, qualifiedEnum
- Children:
- ac3362c
- Parents:
- 04e367c (diff), f7ac09d (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)
links above to see all the changes relative to each parent. - Files:
-
- 4 added
- 29 edited
Legend:
- Unmodified
- Added
- Removed
-
.gitignore
r04e367c r3537dd7 29 29 30 30 # src executables, for lib and bin 31 src/driver/ cc131 src/driver/as 32 32 src/driver/cfa 33 33 src/driver/cfa-cpp 34 src/driver/cc1 34 35 35 36 src/prelude/bootloader.c -
Jenkins/FullBuild
r04e367c r3537dd7 87 87 88 88 if(result.result != 'SUCCESS') { 89 sh("wget -q -O - ${result.absoluteUrl}/consoleText")89 sh("wget -q -O - http://localhost:8084/jenkins/job/Cforall/job/master/${result.number}/consoleText") 90 90 error(result.result) 91 91 } -
Jenkinsfile
r04e367c r3537dd7 22 22 do_sendemail = true 23 23 24 builddir = pwd tmp: true 25 srcdir = pwd tmp: false 26 24 27 currentBuild.result = "SUCCESS" 25 28 … … 32 35 prepare_build() 33 36 37 clean() 38 34 39 checkout() 35 40 … … 41 46 42 47 benchmark() 43 44 clean()45 48 46 49 build_doc() … … 67 70 finally { 68 71 //Send email with final results if this is not a full build 69 if( do_sendemail && !bIsSandbox) {72 if( do_sendemail ) { 70 73 echo 'Notifying users of result' 71 email(currentBuild.result, log_needed )74 email(currentBuild.result, log_needed, bIsSandbox) 72 75 } 73 76 … … 155 158 do_sendemail = ! (pSilent == 'true') 156 159 160 collect_git_info() 161 162 def full = do_alltests ? " (Full)" : "" 163 currentBuild.description = "${compiler.cc_name}:${arch_name}${full}" 164 157 165 echo """Compiler : ${compiler.cc_name} (${compiler.cpp_cc}/${compiler.cfa_cc}) 158 166 Architecture : ${arch_name} … … 164 172 Silent : ${ pSilent.toString() } 165 173 """ 166 167 collect_git_info()168 174 } 169 175 … … 241 247 // Main compilation routines 242 248 //=========================================================================================================== 249 def clean() { 250 build_stage('Cleanup') { 251 // clean the build by wipping the build directory 252 dir(builddir) { 253 deleteDir() 254 } 255 256 //Clean all temporary files to make sure no artifacts of the previous build remain 257 sh 'git clean -fdqx' 258 259 //Reset the git repo so no local changes persist 260 sh 'git reset --hard' 261 } 262 } 263 243 264 //Compilation script is done here but environnement set-up and error handling is done in main loop 244 265 def checkout() { … … 246 267 //checkout the source code and clean the repo 247 268 checkout scm 248 249 //Clean all temporary files to make sure no artifacts of the previous build remain250 sh 'git clean -fdqx'251 252 //Reset the git repo so no local changes persist253 sh 'git reset --hard'254 269 } 255 270 } … … 257 272 def build() { 258 273 build_stage('Build') { 259 260 def install_dir = pwd tmp: true261 262 274 // Build outside of the src tree to ease cleaning 263 sh "mkdir -p build" 264 dir ('build') { 275 dir (builddir) { 265 276 //Configure the conpilation (Output is not relevant) 266 277 //Use the current directory as the installation target so nothing escapes the sandbox 267 278 //Also specify the compiler by hand 268 sh " ../configure CXX=${compiler.cpp_cc} ${architecture} --with-backend-compiler=${compiler.cfa_cc} --prefix=${install_dir} --enable-silent-rules --quiet"279 sh "${srcdir}/configure CXX=${compiler.cpp_cc} ${architecture} --with-backend-compiler=${compiler.cfa_cc} --enable-silent-rules --quiet" 269 280 270 281 //Compile the project … … 277 288 build_stage('Test') { 278 289 279 //Run the tests from the tests directory 280 if ( do_alltests ) { 281 sh 'make -C build/src/tests all-tests debug=yes --no-print-directory' 282 sh 'make -C build/src/tests all-tests debug=no --no-print-directory' 283 } 284 else { 285 sh 'make -C build/src/tests --no-print-directory' 290 dir (builddir) { 291 //Run the tests from the tests directory 292 if ( do_alltests ) { 293 sh 'make --no-print-directory -C src/tests all-tests debug=yes' 294 sh 'make --no-print-directory -C src/tests all-tests debug=no ' 295 } 296 else { 297 sh 'make --no-print-directory -C src/tests' 298 } 286 299 } 287 300 } … … 293 306 if( !do_benchmark ) return 294 307 295 //Append bench results 296 sh 'make -C build/src/benchmark --no-print-directory jenkins githash=' + gitRefNewValue + ' arch=' + arch_name + ' | tee bench.json' 297 } 298 } 299 300 def clean() { 301 build_stage('Cleanup') { 302 // clean the build by wipping the build directory 303 sh 'rm -rf build' 308 dir (builddir) { 309 //Append bench results 310 sh "make --no-print-directory -C src/benchmark jenkins githash=${gitRefNewValue} arch=${arch_name} | tee ${srcdir}/bench.json" 311 } 304 312 } 305 313 } … … 334 342 //=========================================================================================================== 335 343 //Standard build email notification 336 def email(String status, boolean log ) {344 def email(String status, boolean log, boolean bIsSandbox) { 337 345 //Since tokenizer doesn't work, figure stuff out from the environnement variables and command line 338 346 //Configurations for email format … … 377 385 def email_to = "cforall@lists.uwaterloo.ca" 378 386 379 //send email notification 380 emailext body: email_body, subject: email_subject, to: email_to, attachLog: log 381 } 387 if( !bIsSandbox ) { 388 //send email notification 389 emailext body: email_body, subject: email_subject, to: email_to, attachLog: log 390 } else { 391 echo "Would send email to: ${email_to}" 392 echo "With title: ${email_subject}" 393 echo "Content: \n${email_body}" 394 } 395 } -
Makefile.in
r04e367c r3537dd7 250 250 AWK = @AWK@ 251 251 BACKEND_CC = @BACKEND_CC@ # C compiler used to compile Cforall programs, versus C++ compiler used to build cfa command 252 BUILD_IN_TREE_FLAGS = @BUILD_IN_TREE_FLAGS@ 253 BUILD_IN_TREE_FLAGS_NOLIB = @BUILD_IN_TREE_FLAGS_NOLIB@ 252 254 CC = @CC@ 253 255 CCAS = @CCAS@ … … 255 257 CCASFLAGS = @CCASFLAGS@ 256 258 CCDEPMODE = @CCDEPMODE@ 259 CFACC = @CFACC@ 260 CFACPP = @CFACPP@ 257 261 CFA_BACKEND_CC = @CFA_BACKEND_CC@ 258 262 CFA_BINDIR = @CFA_BINDIR@ … … 271 275 DEFS = @DEFS@ 272 276 DEPDIR = @DEPDIR@ 277 DRIVER_DIR = @DRIVER_DIR@ 273 278 ECHO_C = @ECHO_C@ 274 279 ECHO_N = @ECHO_N@ -
configure
r04e367c r3537dd7 674 674 build_cpu 675 675 build 676 BUILD_IN_TREE_FLAGS 677 BUILD_IN_TREE_FLAGS_NOLIB 678 CFACPP 679 CFACC 680 DRIVER_DIR 676 681 CFA_LIBDIR 677 682 CFA_BINDIR … … 3375 3380 3376 3381 3382 # Create variables for commonly used targets 3383 DRIVER_DIR='$(top_builddir)/src/driver' 3384 CFACC=${DRIVER_DIR}/cfa 3385 CFACPP=${DRIVER_DIR}/cfa-cpp 3386 3387 3388 3389 3390 # Flag variables needed to build in tree 3391 LIBCFA_SRC='$(top_srcdir)/src/libcfa' 3392 LIBCFA_BUILD='$(top_builddir)/src/libcfa' 3393 BUILD_IN_TREE_FLAGS_NOLIB="-XCFA -t -B${DRIVER_DIR}" 3394 BUILD_IN_TREE_FLAGS="${BUILD_IN_TREE_FLAGS_NOLIB} -L${LIBCFA_BUILD} -I${LIBCFA_SRC} -I${LIBCFA_SRC}/containers -I${LIBCFA_SRC}/concurrency -I${LIBCFA_SRC}/stdhdr" 3395 3396 3397 3377 3398 # Make sure we can run config.sub. 3378 3399 $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 || -
configure.ac
r04e367c r3537dd7 170 170 AC_DEFINE_UNQUOTED(CFA_LIBDIR, "${cfa_libdir}", [Location of cc1 and cfa-cpp commands.]) 171 171 AC_SUBST(CFA_LIBDIR, ${cfa_libdir}) 172 173 # Create variables for commonly used targets 174 DRIVER_DIR='$(top_builddir)/src/driver' 175 CFACC=${DRIVER_DIR}/cfa 176 CFACPP=${DRIVER_DIR}/cfa-cpp 177 AC_SUBST(DRIVER_DIR) 178 AC_SUBST(CFACC) 179 AC_SUBST(CFACPP) 180 181 # Flag variables needed to build in tree 182 LIBCFA_SRC='$(top_srcdir)/src/libcfa' 183 LIBCFA_BUILD='$(top_builddir)/src/libcfa' 184 BUILD_IN_TREE_FLAGS_NOLIB="-XCFA -t -B${DRIVER_DIR}" 185 BUILD_IN_TREE_FLAGS="${BUILD_IN_TREE_FLAGS_NOLIB} -L${LIBCFA_BUILD} -I${LIBCFA_SRC} -I${LIBCFA_SRC}/containers -I${LIBCFA_SRC}/concurrency -I${LIBCFA_SRC}/stdhdr" 186 AC_SUBST(BUILD_IN_TREE_FLAGS_NOLIB) 187 AC_SUBST(BUILD_IN_TREE_FLAGS) 172 188 173 189 AC_CANONICAL_BUILD -
doc/papers/general/Paper.tex
r04e367c r3537dd7 203 203 The C programming language is a foundational technology for modern computing with millions of lines of code implementing everything from hobby projects to commercial operating-systems. 204 204 This installation base and the programmers producing it represent a massive software-engineering investment spanning decades and likely to continue for decades more. 205 Nevertheless, C, first standardized almost forty years ago, lacks many features that make programming in more modern languages safer and more productive.205 Nevertheless, C, first standardized almost thirty years ago, lacks many features that make programming in more modern languages safer and more productive. 206 206 207 207 The goal of the \CFA project (pronounced ``C-for-all'') is to create an extension of C that provides modern safety and productivity features while still ensuring strong backwards compatibility with C and its programmers. -
doc/user/user.tex
r04e367c r3537dd7 11 11 %% Created On : Wed Apr 6 14:53:29 2016 12 12 %% Last Modified By : Peter A. Buhr 13 %% Last Modified On : Mon Jul 9 10:49:52201814 %% Update Count : 336 113 %% Last Modified On : Thu Jul 26 17:29:05 2018 14 %% Update Count : 3366 15 15 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 16 16 … … 5967 5967 void * memalign( size_t align, size_t size );§\indexc{memalign}§ 5968 5968 int posix_memalign( void ** ptr, size_t align, size_t size );§\indexc{posix_memalign}§ 5969 }5970 5971 // §\CFA§ safe equivalents, i.e., implicit size specification5972 forall( dtype T | sized(T) ) T * malloc( void );5973 forall( dtype T | sized(T) ) T * calloc( size_t dim );5974 forall( dtype T | sized(T) ) T * realloc( T * ptr, size_t size );5975 forall( dtype T | sized(T) ) T * memalign( size_t align );5976 forall( dtype T | sized(T) ) T * aligned_alloc( size_t align );5977 forall( dtype T | sized(T) ) int posix_memalign( T ** ptr, size_t align );5978 5979 // §\CFA§ safe general allocation, fill, resize, array5980 forall( dtype T | sized(T) ) T * alloc( void );§\indexc{alloc}§5981 forall( dtype T | sized(T) ) T * alloc( char fill );5982 forall( dtype T | sized(T) ) T * alloc( size_t dim );5983 forall( dtype T | sized(T) ) T * alloc( size_t dim, char fill );5984 forall( dtype T | sized(T) ) T * alloc( T ptr[], size_t dim );5985 forall( dtype T | sized(T) ) T * alloc( T ptr[], size_t dim, char fill );5986 5987 // §\CFA§ safe general allocation, align, fill, array5988 forall( dtype T | sized(T) ) T * align_alloc( size_t align );5989 forall( dtype T | sized(T) ) T * align_alloc( size_t align, char fill );5990 forall( dtype T | sized(T) ) T * align_alloc( size_t align, size_t dim );5991 forall( dtype T | sized(T) ) T * align_alloc( size_t align, size_t dim, char fill );5992 5969 5993 5970 // C unsafe initialization/copy 5994 extern "C" {5995 5971 void * memset( void * dest, int c, size_t size ); 5996 5972 void * memcpy( void * dest, const void * src, size_t size ); 5997 5973 } 5998 5974 5975 forall( dtype T | sized(T) ) { 5976 // §\CFA§ safe equivalents, i.e., implicit size specification 5977 T * malloc( void ); 5978 T * calloc( size_t dim ); 5979 T * realloc( T * ptr, size_t size ); 5980 T * memalign( size_t align ); 5981 T * aligned_alloc( size_t align ); 5982 int posix_memalign( T ** ptr, size_t align ); 5983 5984 // §\CFA§ safe general allocation, fill, resize, array 5985 T * alloc( void );§\indexc{alloc}§ 5986 T * alloc( char fill ); 5987 T * alloc( size_t dim ); 5988 T * alloc( size_t dim, char fill ); 5989 T * alloc( T ptr[], size_t dim ); 5990 T * alloc( T ptr[], size_t dim, char fill ); 5991 5992 // §\CFA§ safe general allocation, align, fill, array 5993 T * align_alloc( size_t align ); 5994 T * align_alloc( size_t align, char fill ); 5995 T * align_alloc( size_t align, size_t dim ); 5996 T * align_alloc( size_t align, size_t dim, char fill ); 5997 5999 5998 // §\CFA§ safe initialization/copy, i.e., implicit size specification 6000 forall( dtype T | sized(T) )T * memset( T * dest, char c );§\indexc{memset}§6001 forall( dtype T | sized(T) )T * memcpy( T * dest, const T * src );§\indexc{memcpy}§5999 T * memset( T * dest, char c );§\indexc{memset}§ 6000 T * memcpy( T * dest, const T * src );§\indexc{memcpy}§ 6002 6001 6003 6002 // §\CFA§ safe initialization/copy array 6004 forall( dtype T | sized(T) ) T * memset( T dest[], size_t dim, char c ); 6005 forall( dtype T | sized(T) ) T * memcpy( T dest[], const T src[], size_t dim ); 6003 T * amemset( T dest[], char c, size_t dim ); 6004 T * amemcpy( T dest[], const T src[], size_t dim ); 6005 } 6006 6006 6007 6007 // §\CFA§ allocation/deallocation and constructor/destructor … … 6063 6063 forall( otype T | { int ?<?( T, T ); } ) 6064 6064 void qsort( const T * arr, size_t dim );§\indexc{qsort}§ 6065 6066 forall( otype E | { int ?<?( E, E ); } ) { 6067 E * bsearch( E key, const E * vals, size_t dim );§\indexc{bsearch}§ §\C{// location}§ 6068 size_t bsearch( E key, const E * vals, size_t dim );§\C{// position}§ 6069 E * bsearchl( E key, const E * vals, size_t dim );§\indexc{bsearchl}§ 6070 size_t bsearchl( E key, const E * vals, size_t dim ); 6071 E * bsearchu( E key, const E * vals, size_t dim );§\indexc{bsearchu}§ 6072 size_t bsearchu( E key, const E * vals, size_t dim ); 6073 } 6074 6075 forall( otype K, otype E | { int ?<?( K, K ); K getKey( const E & ); } ) { 6076 E * bsearch( K key, const E * vals, size_t dim ); 6077 size_t bsearch( K key, const E * vals, size_t dim ); 6078 E * bsearchl( K key, const E * vals, size_t dim ); 6079 size_t bsearchl( K key, const E * vals, size_t dim ); 6080 E * bsearchu( K key, const E * vals, size_t dim ); 6081 size_t bsearchu( K key, const E * vals, size_t dim ); 6082 } 6083 6084 forall( otype E | { int ?<?( E, E ); } ) { 6085 void qsort( E * vals, size_t dim );§\indexc{qsort}§ 6086 } 6065 6087 \end{cfa} 6066 6088 -
src/Makefile.am
r04e367c r3537dd7 42 42 43 43 # put into lib for now 44 cfa_cpplibdir = $ {CFA_LIBDIR}44 cfa_cpplibdir = $(CFA_LIBDIR) 45 45 cfa_cpplib_PROGRAMS = driver/cfa-cpp 46 driver_cfa_cpp_SOURCES = $ {SRC}46 driver_cfa_cpp_SOURCES = $(SRC) 47 47 driver_cfa_cpp_LDADD = -ldl # yywrap 48 driver_cfa_cpp_CXXFLAGS = -Wno-deprecated -Wall -Wextra -DDEBUG_ALL -I./Parser -I$ {abs_top_srcdir}/src/Parser -I${abs_top_srcdir}/src/include -DYY_NO_INPUT -O2 -g -std=c++1448 driver_cfa_cpp_CXXFLAGS = -Wno-deprecated -Wall -Wextra -DDEBUG_ALL -I./Parser -I$(srcdir)/Parser -I$(srcdir)/include -DYY_NO_INPUT -O2 -g -std=c++14 49 49 driver_cfa_cpp_LDFLAGS = -Xlinker -export-dynamic 50 50 -
src/Makefile.in
r04e367c r3537dd7 372 372 AWK = @AWK@ 373 373 BACKEND_CC = @BACKEND_CC@ 374 BUILD_IN_TREE_FLAGS = @BUILD_IN_TREE_FLAGS@ 375 BUILD_IN_TREE_FLAGS_NOLIB = @BUILD_IN_TREE_FLAGS_NOLIB@ 374 376 CC = @CC@ 375 377 CCAS = @CCAS@ … … 377 379 CCASFLAGS = @CCASFLAGS@ 378 380 CCDEPMODE = @CCDEPMODE@ 381 CFACC = @CFACC@ 382 CFACPP = @CFACPP@ 379 383 CFA_BACKEND_CC = @CFA_BACKEND_CC@ 380 384 CFA_BINDIR = @CFA_BINDIR@ … … 393 397 DEFS = @DEFS@ 394 398 DEPDIR = @DEPDIR@ 399 DRIVER_DIR = @DRIVER_DIR@ 395 400 ECHO_C = @ECHO_C@ 396 401 ECHO_N = @ECHO_N@ … … 544 549 545 550 # put into lib for now 546 cfa_cpplibdir = $ {CFA_LIBDIR}547 driver_cfa_cpp_SOURCES = $ {SRC}551 cfa_cpplibdir = $(CFA_LIBDIR) 552 driver_cfa_cpp_SOURCES = $(SRC) 548 553 driver_cfa_cpp_LDADD = -ldl # yywrap 549 driver_cfa_cpp_CXXFLAGS = -Wno-deprecated -Wall -Wextra -DDEBUG_ALL -I./Parser -I$ {abs_top_srcdir}/src/Parser -I${abs_top_srcdir}/src/include -DYY_NO_INPUT -O2 -g -std=c++14554 driver_cfa_cpp_CXXFLAGS = -Wno-deprecated -Wall -Wextra -DDEBUG_ALL -I./Parser -I$(srcdir)/Parser -I$(srcdir)/include -DYY_NO_INPUT -O2 -g -std=c++14 550 555 driver_cfa_cpp_LDFLAGS = -Xlinker -export-dynamic 551 556 all: $(BUILT_SOURCES) -
src/benchmark/Makefile.am
r04e367c r3537dd7 18 18 CFLAGS = 19 19 AM_CFLAGS = \ 20 -XCFA \21 -t \22 -B${abs_top_builddir}/src/driver \23 20 -g \ 24 21 -O2 \ … … 27 24 -quiet \ 28 25 -I$(srcdir) \ 29 -L${abs_top_builddir}/src/libcfa \ 30 -I${abs_top_srcdir}/src/libcfa \ 31 -I${abs_top_srcdir}/src/libcfa/containers \ 32 -I${abs_top_srcdir}/src/libcfa/concurrency \ 33 -I${abs_top_srcdir}/src/libcfa/stdhdr 34 35 CC = ${top_builddir}/src/driver/cfa 26 @BUILD_IN_TREE_FLAGS@ 27 28 CC = @CFACC@ 36 29 TOOLSDIR = ${abs_top_srcdir}/tools/ 37 30 REPEAT = ${TOOLSDIR}repeat -
src/benchmark/Makefile.in
r04e367c r3537dd7 135 135 AWK = @AWK@ 136 136 BACKEND_CC = @BACKEND_CC@ 137 CC = ${top_builddir}/src/driver/cfa 137 BUILD_IN_TREE_FLAGS = @BUILD_IN_TREE_FLAGS@ 138 BUILD_IN_TREE_FLAGS_NOLIB = @BUILD_IN_TREE_FLAGS_NOLIB@ 139 CC = @CFACC@ 138 140 CCAS = @CCAS@ 139 141 CCASDEPMODE = @CCASDEPMODE@ 140 142 CCASFLAGS = @CCASFLAGS@ 141 143 CCDEPMODE = @CCDEPMODE@ 144 CFACC = @CFACC@ 145 CFACPP = @CFACPP@ 142 146 CFA_BACKEND_CC = @CFA_BACKEND_CC@ 143 147 CFA_BINDIR = @CFA_BINDIR@ … … 158 162 DEFS = @DEFS@ 159 163 DEPDIR = @DEPDIR@ 164 DRIVER_DIR = @DRIVER_DIR@ 160 165 ECHO_C = @ECHO_C@ 161 166 ECHO_N = @ECHO_N@ … … 248 253 top_srcdir = @top_srcdir@ 249 254 AM_CFLAGS = \ 250 -XCFA \251 -t \252 -B${abs_top_builddir}/src/driver \253 255 -g \ 254 256 -O2 \ … … 257 259 -quiet \ 258 260 -I$(srcdir) \ 259 -L${abs_top_builddir}/src/libcfa \ 260 -I${abs_top_srcdir}/src/libcfa \ 261 -I${abs_top_srcdir}/src/libcfa/containers \ 262 -I${abs_top_srcdir}/src/libcfa/concurrency \ 263 -I${abs_top_srcdir}/src/libcfa/stdhdr 261 @BUILD_IN_TREE_FLAGS@ 264 262 265 263 TOOLSDIR = ${abs_top_srcdir}/tools/ -
src/driver/Makefile.am
r04e367c r3537dd7 11 11 ## Created On : Sun May 31 08:49:31 2015 12 12 ## Last Modified By : Peter A. Buhr 13 ## Last Modified On : Mon Apr 30 17:44:17201814 ## Update Count : 1 113 ## Last Modified On : Thu Aug 2 12:18:25 2018 14 ## Update Count : 14 15 15 ############################################################################### 16 16 … … 48 48 cc1_SOURCES = cc1.cc 49 49 50 aslibdir = ${CFA_LIBDIR} 51 aslib_PROGRAMS = as 52 as_SOURCES = as.cc 53 50 54 MAINTAINERCLEANFILES = $(CFA_BINDIR)/$(CFA_NAME) @CFA_PREFIX@/lib/${cc1lib_PROGRAMS} -
src/driver/Makefile.in
r04e367c r3537dd7 97 97 noinst_PROGRAMS = cfa$(EXEEXT) 98 98 cc1lib_PROGRAMS = cc1$(EXEEXT) 99 aslib_PROGRAMS = as$(EXEEXT) 99 100 subdir = src/driver 100 101 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 … … 107 108 CONFIG_CLEAN_FILES = 108 109 CONFIG_CLEAN_VPATH_FILES = 109 am__installdirs = "$(DESTDIR)$(cc1libdir)" 110 PROGRAMS = $(cc1lib_PROGRAMS) $(noinst_PROGRAMS) 110 am__installdirs = "$(DESTDIR)$(aslibdir)" "$(DESTDIR)$(cc1libdir)" 111 PROGRAMS = $(aslib_PROGRAMS) $(cc1lib_PROGRAMS) $(noinst_PROGRAMS) 112 am_as_OBJECTS = as.$(OBJEXT) 113 as_OBJECTS = $(am_as_OBJECTS) 114 as_LDADD = $(LDADD) 111 115 am_cc1_OBJECTS = cc1.$(OBJEXT) 112 116 cc1_OBJECTS = $(am_cc1_OBJECTS) … … 144 148 am__v_CXXLD_0 = @echo " CXXLD " $@; 145 149 am__v_CXXLD_1 = 146 SOURCES = $( cc1_SOURCES) $(cfa_SOURCES)147 DIST_SOURCES = $( cc1_SOURCES) $(cfa_SOURCES)150 SOURCES = $(as_SOURCES) $(cc1_SOURCES) $(cfa_SOURCES) 151 DIST_SOURCES = $(as_SOURCES) $(cc1_SOURCES) $(cfa_SOURCES) 148 152 am__can_run_installinfo = \ 149 153 case $$AM_UPDATE_INFO_DIR in \ … … 181 185 AWK = @AWK@ 182 186 BACKEND_CC = @BACKEND_CC@ 187 BUILD_IN_TREE_FLAGS = @BUILD_IN_TREE_FLAGS@ 188 BUILD_IN_TREE_FLAGS_NOLIB = @BUILD_IN_TREE_FLAGS_NOLIB@ 183 189 CC = @CC@ 184 190 CCAS = @CCAS@ … … 186 192 CCASFLAGS = @CCASFLAGS@ 187 193 CCDEPMODE = @CCDEPMODE@ 194 CFACC = @CFACC@ 195 CFACPP = @CFACPP@ 188 196 CFA_BACKEND_CC = @CFA_BACKEND_CC@ 189 197 CFA_BINDIR = @CFA_BINDIR@ … … 202 210 DEFS = @DEFS@ 203 211 DEPDIR = @DEPDIR@ 212 DRIVER_DIR = @DRIVER_DIR@ 204 213 ECHO_C = @ECHO_C@ 205 214 ECHO_N = @ECHO_N@ … … 300 309 cc1libdir = ${CFA_LIBDIR} 301 310 cc1_SOURCES = cc1.cc 311 aslibdir = ${CFA_LIBDIR} 312 as_SOURCES = as.cc 302 313 MAINTAINERCLEANFILES = $(CFA_BINDIR)/$(CFA_NAME) @CFA_PREFIX@/lib/${cc1lib_PROGRAMS} 303 314 all: all-am … … 334 345 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh 335 346 $(am__aclocal_m4_deps): 347 install-aslibPROGRAMS: $(aslib_PROGRAMS) 348 @$(NORMAL_INSTALL) 349 @list='$(aslib_PROGRAMS)'; test -n "$(aslibdir)" || list=; \ 350 if test -n "$$list"; then \ 351 echo " $(MKDIR_P) '$(DESTDIR)$(aslibdir)'"; \ 352 $(MKDIR_P) "$(DESTDIR)$(aslibdir)" || exit 1; \ 353 fi; \ 354 for p in $$list; do echo "$$p $$p"; done | \ 355 sed 's/$(EXEEXT)$$//' | \ 356 while read p p1; do if test -f $$p \ 357 ; then echo "$$p"; echo "$$p"; else :; fi; \ 358 done | \ 359 sed -e 'p;s,.*/,,;n;h' \ 360 -e 's|.*|.|' \ 361 -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \ 362 sed 'N;N;N;s,\n, ,g' | \ 363 $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \ 364 { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ 365 if ($$2 == $$4) files[d] = files[d] " " $$1; \ 366 else { print "f", $$3 "/" $$4, $$1; } } \ 367 END { for (d in files) print "f", d, files[d] }' | \ 368 while read type dir files; do \ 369 if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ 370 test -z "$$files" || { \ 371 echo " $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(aslibdir)$$dir'"; \ 372 $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(aslibdir)$$dir" || exit $$?; \ 373 } \ 374 ; done 375 376 uninstall-aslibPROGRAMS: 377 @$(NORMAL_UNINSTALL) 378 @list='$(aslib_PROGRAMS)'; test -n "$(aslibdir)" || list=; \ 379 files=`for p in $$list; do echo "$$p"; done | \ 380 sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \ 381 -e 's/$$/$(EXEEXT)/' \ 382 `; \ 383 test -n "$$list" || exit 0; \ 384 echo " ( cd '$(DESTDIR)$(aslibdir)' && rm -f" $$files ")"; \ 385 cd "$(DESTDIR)$(aslibdir)" && rm -f $$files 386 387 clean-aslibPROGRAMS: 388 -test -z "$(aslib_PROGRAMS)" || rm -f $(aslib_PROGRAMS) 336 389 install-cc1libPROGRAMS: $(cc1lib_PROGRAMS) 337 390 @$(NORMAL_INSTALL) … … 380 433 -test -z "$(noinst_PROGRAMS)" || rm -f $(noinst_PROGRAMS) 381 434 435 as$(EXEEXT): $(as_OBJECTS) $(as_DEPENDENCIES) $(EXTRA_as_DEPENDENCIES) 436 @rm -f as$(EXEEXT) 437 $(AM_V_CXXLD)$(CXXLINK) $(as_OBJECTS) $(as_LDADD) $(LIBS) 438 382 439 cc1$(EXEEXT): $(cc1_OBJECTS) $(cc1_DEPENDENCIES) $(EXTRA_cc1_DEPENDENCIES) 383 440 @rm -f cc1$(EXEEXT) … … 394 451 -rm -f *.tab.c 395 452 453 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/as.Po@am__quote@ 396 454 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cc1.Po@am__quote@ 397 455 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cfa.Po@am__quote@ … … 499 557 all-am: Makefile $(PROGRAMS) 500 558 installdirs: 501 for dir in "$(DESTDIR)$( cc1libdir)"; do \559 for dir in "$(DESTDIR)$(aslibdir)" "$(DESTDIR)$(cc1libdir)"; do \ 502 560 test -z "$$dir" || $(MKDIR_P) "$$dir"; \ 503 561 done … … 535 593 clean: clean-am 536 594 537 clean-am: clean- cc1libPROGRAMS clean-generic clean-noinstPROGRAMS\538 mostlyclean-am595 clean-am: clean-aslibPROGRAMS clean-cc1libPROGRAMS clean-generic \ 596 clean-noinstPROGRAMS mostlyclean-am 539 597 540 598 distclean: distclean-am … … 556 614 info-am: 557 615 558 install-data-am: install- cc1libPROGRAMS616 install-data-am: install-aslibPROGRAMS install-cc1libPROGRAMS 559 617 560 618 install-dvi: install-dvi-am … … 602 660 ps-am: 603 661 604 uninstall-am: uninstall- cc1libPROGRAMS662 uninstall-am: uninstall-aslibPROGRAMS uninstall-cc1libPROGRAMS 605 663 @$(NORMAL_INSTALL) 606 664 $(MAKE) $(AM_MAKEFLAGS) uninstall-hook … … 608 666 609 667 .PHONY: CTAGS GTAGS TAGS all all-am check check-am clean \ 610 clean-cc1libPROGRAMS clean-generic clean-noinstPROGRAMS \ 611 cscopelist-am ctags ctags-am distclean distclean-compile \ 612 distclean-generic distclean-tags distdir dvi dvi-am html \ 613 html-am info info-am install install-am install-cc1libPROGRAMS \ 614 install-data install-data-am install-dvi install-dvi-am \ 615 install-exec install-exec-am install-exec-hook install-html \ 616 install-html-am install-info install-info-am install-man \ 617 install-pdf install-pdf-am install-ps install-ps-am \ 618 install-strip installcheck installcheck-am installdirs \ 619 maintainer-clean maintainer-clean-generic mostlyclean \ 620 mostlyclean-compile mostlyclean-generic pdf pdf-am ps ps-am \ 621 tags tags-am uninstall uninstall-am uninstall-cc1libPROGRAMS \ 668 clean-aslibPROGRAMS clean-cc1libPROGRAMS clean-generic \ 669 clean-noinstPROGRAMS cscopelist-am ctags ctags-am distclean \ 670 distclean-compile distclean-generic distclean-tags distdir dvi \ 671 dvi-am html html-am info info-am install install-am \ 672 install-aslibPROGRAMS install-cc1libPROGRAMS install-data \ 673 install-data-am install-dvi install-dvi-am install-exec \ 674 install-exec-am install-exec-hook install-html install-html-am \ 675 install-info install-info-am install-man install-pdf \ 676 install-pdf-am install-ps install-ps-am install-strip \ 677 installcheck installcheck-am installdirs maintainer-clean \ 678 maintainer-clean-generic mostlyclean mostlyclean-compile \ 679 mostlyclean-generic pdf pdf-am ps ps-am tags tags-am uninstall \ 680 uninstall-am uninstall-aslibPROGRAMS uninstall-cc1libPROGRAMS \ 622 681 uninstall-hook 623 682 -
src/examples/Makefile.am
r04e367c r3537dd7 25 25 avl_test_SOURCES = avltree/avl_test.c avltree/avl0.c avltree/avl1.c avltree/avl2.c avltree/avl3.c avltree/avl4.c avltree/avl-private.c 26 26 27 Bench : Bench.c27 Bench$(EXEEXT) : Bench.c 28 28 @for ccflags in "-debug" "-nodebug"; do \ 29 29 echo ${CC} ${AM_CFLAGS} ${CFLAGS} $${ccflags} -lrt Bench.c;\ -
src/examples/Makefile.in
r04e367c r3537dd7 189 189 AWK = @AWK@ 190 190 BACKEND_CC = @BACKEND_CC@ 191 BUILD_IN_TREE_FLAGS = @BUILD_IN_TREE_FLAGS@ 192 BUILD_IN_TREE_FLAGS_NOLIB = @BUILD_IN_TREE_FLAGS_NOLIB@ 191 193 CC = @CFA_BINDIR@/@CFA_NAME@ 192 194 CCAS = @CCAS@ … … 194 196 CCASFLAGS = @CCASFLAGS@ 195 197 CCDEPMODE = @CCDEPMODE@ 198 CFACC = @CFACC@ 199 CFACPP = @CFACPP@ 196 200 CFA_BACKEND_CC = @CFA_BACKEND_CC@ 197 201 CFA_BINDIR = @CFA_BINDIR@ … … 212 216 DEFS = @DEFS@ 213 217 DEPDIR = @DEPDIR@ 218 DRIVER_DIR = @DRIVER_DIR@ 214 219 ECHO_C = @ECHO_C@ 215 220 ECHO_N = @ECHO_N@ … … 615 620 616 621 617 Bench : Bench.c622 Bench$(EXEEXT) : Bench.c 618 623 @for ccflags in "-debug" "-nodebug"; do \ 619 624 echo ${CC} ${AM_CFLAGS} ${CFLAGS} $${ccflags} -lrt Bench.c;\ -
src/libcfa/Makefile.am
r04e367c r3537dd7 43 43 #use -no-include-stdhdr to prevent rebuild cycles 44 44 #The built sources must not depend on the installed headers 45 CFLAGS = -quiet -no-include-stdhdr -I${abs_top_srcdir}/src/libcfa/stdhdr -XCFA -t -B${abs_top_builddir}/src/driver${EXTRA_FLAGS}46 CC = ${abs_top_builddir}/src/driver/cfa45 CFLAGS = -quiet -no-include-stdhdr @BUILD_IN_TREE_FLAGS@ ${EXTRA_FLAGS} 46 CC = @CFACC@ 47 47 48 48 headers = fstream iostream iterator limits rational time stdlib common \ … … 92 92 ${AM_V_CC}@BACKEND_CC@ -DHAVE_CONFIG_H -I. -I../.. -D__CFA_DEBUG__ -O0 ${EXTRA_FLAGS} -c -o $@ $< 93 93 94 ${libobjs} : ${abs_top_srcdir}/src/driver/cfa-cpp${cfalib_DATA} # add dependency to cfa-cpp so all libraries are rebuilt with new translator94 ${libobjs} : @CFACPP@ ${cfalib_DATA} # add dependency to cfa-cpp so all libraries are rebuilt with new translator 95 95 96 96 libcfa_a_SOURCES = ${libsrc} -
src/libcfa/Makefile.in
r04e367c r3537dd7 303 303 AWK = @AWK@ 304 304 BACKEND_CC = @BACKEND_CC@ 305 CC = ${abs_top_builddir}/src/driver/cfa 305 BUILD_IN_TREE_FLAGS = @BUILD_IN_TREE_FLAGS@ 306 BUILD_IN_TREE_FLAGS_NOLIB = @BUILD_IN_TREE_FLAGS_NOLIB@ 307 CC = @CFACC@ 306 308 CCAS = @CCAS@ 307 309 CCASDEPMODE = @CCASDEPMODE@ 308 310 CCASFLAGS = @CCASFLAGS@ 309 311 CCDEPMODE = @CCDEPMODE@ 312 CFACC = @CFACC@ 313 CFACPP = @CFACPP@ 310 314 CFA_BACKEND_CC = @CFA_BACKEND_CC@ 311 315 CFA_BINDIR = @CFA_BINDIR@ … … 319 323 #use -no-include-stdhdr to prevent rebuild cycles 320 324 #The built sources must not depend on the installed headers 321 CFLAGS = -quiet -no-include-stdhdr -I${abs_top_srcdir}/src/libcfa/stdhdr -XCFA -t -B${abs_top_builddir}/src/driver${EXTRA_FLAGS}325 CFLAGS = -quiet -no-include-stdhdr @BUILD_IN_TREE_FLAGS@ ${EXTRA_FLAGS} 322 326 CPP = @CPP@ 323 327 CPPFLAGS = @CPPFLAGS@ … … 328 332 DEFS = @DEFS@ 329 333 DEPDIR = @DEPDIR@ 334 DRIVER_DIR = @DRIVER_DIR@ 330 335 ECHO_C = @ECHO_C@ 331 336 ECHO_N = @ECHO_N@ … … 1704 1709 ${AM_V_CC}@BACKEND_CC@ -DHAVE_CONFIG_H -I. -I../.. -D__CFA_DEBUG__ -O0 ${EXTRA_FLAGS} -c -o $@ $< 1705 1710 1706 ${libobjs} : ${abs_top_srcdir}/src/driver/cfa-cpp${cfalib_DATA} # add dependency to cfa-cpp so all libraries are rebuilt with new translator1711 ${libobjs} : @CFACPP@ ${cfalib_DATA} # add dependency to cfa-cpp so all libraries are rebuilt with new translator 1707 1712 1708 1713 maintainer-clean-local: -
src/libcfa/heap.c
r04e367c r3537dd7 10 10 // Created On : Tue Dec 19 21:58:35 2017 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : T hu Jul 26 22:28:23201813 // Update Count : 4 4912 // Last Modified On : Tue Jul 31 18:08:50 2018 13 // Update Count : 470 14 14 // 15 15 … … 94 94 95 95 96 // static _Bool prtHeapTerm = false; 97 98 // inline _Bool prtHeapTerm() { 99 // return prtHeapTerm; 100 // } // prtHeapTerm 101 102 // _Bool prtHeapTermOn() { 103 // _Bool temp = traceHeap; 104 // traceHeap = true; 96 static _Bool checkFree = false; 97 98 inline _Bool checkFree() { 99 return checkFree; 100 } // checkFree 101 102 _Bool checkFreeOn() { 103 _Bool temp = checkFree; 104 checkFree = true; 105 return temp; 106 } // checkFreeOn 107 108 _Bool checkFreeOff() { 109 _Bool temp = checkFree; 110 checkFree = false; 111 return temp; 112 } // checkFreeOff 113 114 115 // static _Bool traceHeapTerm = false; 116 117 // inline _Bool traceHeapTerm() { 118 // return traceHeapTerm; 119 // } // traceHeapTerm 120 121 // _Bool traceHeapTermOn() { 122 // _Bool temp = traceHeapTerm; 123 // traceHeapTerm = true; 105 124 // return temp; 106 // } // prtHeapTermOn107 108 // _Bool prtHeapTermOff() {109 // _Bool temp = traceHeap ;110 // traceHeap = false;125 // } // traceHeapTermOn 126 127 // _Bool traceHeapTermOff() { 128 // _Bool temp = traceHeapTerm; 129 // traceHeapTerm = false; 111 130 // return temp; 112 // } // prtHeapTermOff131 // } // traceHeapTermOff 113 132 114 133 … … 139 158 } // extern "C" 140 159 #endif // __CFA_DEBUG__ 141 142 143 // statically allocated variables => zero filled.144 145 static size_t pageSize; // architecture pagesize146 static size_t heapExpand; // sbrk advance147 static size_t mmapStart; // cross over point for mmap148 static unsigned int maxBucketsUsed; // maximum number of buckets in use149 static unsigned int bucketSizes[NoBucketSizes] = { // different bucket sizes150 16, 32, 48, 64,151 80, 96, 112, 128, 144, 160, 192, 224,152 256, 320, 384, 448, 512, 640, 768, 896,153 1024, 1536, 2048, 2560, 3072, 3584, 4096, 6144,154 8192, 9216, 10240, 11264, 12288, 13312, 14336, 15360,155 16384, 18432, 20480, 22528, 24576, 26624, 28672, 30720,156 32768, 36864, 40960, 45056, 49152, 53248, 57344, 61440,157 65536, 73728, 81920, 90112, 98304, 106496, 114688, 122880,158 131072, 147456, 163840, 180224, 196608, 212992, 229376, 245760,159 262144, 294912, 327680, 360448, 393216, 425984, 458752, 491520,160 524288, 655360, 786432, 917504, 1048576, 1179648, 1310720, 1441792,161 1572864, 1703936, 1835008, 1966080, 2097152, 2621440, 3145728, 3670016,162 4194304163 };164 #ifdef FASTLOOKUP165 static unsigned char lookup[LookupSizes]; // O(1) lookup for small sizes166 #endif // FASTLOOKUP167 static int mmapFd = -1; // fake or actual fd for anonymous file168 160 169 161 … … 240 232 }; // HeapManager 241 233 234 static inline size_t getKey( const HeapManager.FreeHeader & freeheader ) { return freeheader.blockSize; } 235 // statically allocated variables => zero filled. 236 237 238 static size_t pageSize; // architecture pagesize 239 static size_t heapExpand; // sbrk advance 240 static size_t mmapStart; // cross over point for mmap 241 static unsigned int maxBucketsUsed; // maximum number of buckets in use 242 243 // Powers of 2 are common allocation sizes, so make powers of 2 generate the minimum required size. 244 static unsigned int bucketSizes[NoBucketSizes] @= { // different bucket sizes 245 16, 32, 48, 64, 246 64 + sizeof(HeapManager.Storage), 96, 112, 128, 128 + sizeof(HeapManager.Storage), 160, 192, 224, 247 256 + sizeof(HeapManager.Storage), 320, 384, 448, 512 + sizeof(HeapManager.Storage), 640, 768, 896, 248 1_024 + sizeof(HeapManager.Storage), 1_536, 2_048 + sizeof(HeapManager.Storage), 2_560, 3_072, 3_584, 4_096 + sizeof(HeapManager.Storage), 6_144, 249 8_192 + sizeof(HeapManager.Storage), 9_216, 10_240, 11_264, 12_288, 13_312, 14_336, 15_360, 250 16_384 + sizeof(HeapManager.Storage), 18_432, 20_480, 22_528, 24_576, 26_624, 28_672, 30_720, 251 32_768 + sizeof(HeapManager.Storage), 36_864, 40_960, 45_056, 49_152, 53_248, 57_344, 61_440, 252 65_536 + sizeof(HeapManager.Storage), 73_728, 81_920, 90_112, 98_304, 106_496, 114_688, 122_880, 253 131_072 + sizeof(HeapManager.Storage), 147_456, 163_840, 180_224, 196_608, 212_992, 229_376, 245_760, 254 262_144 + sizeof(HeapManager.Storage), 294_912, 327_680, 360_448, 393_216, 425_984, 458_752, 491_520, 255 524_288 + sizeof(HeapManager.Storage), 655_360, 786_432, 917_504, 1_048_576 + sizeof(HeapManager.Storage), 1_179_648, 1_310_720, 1_441_792, 256 1_572_864, 1_703_936, 1_835_008, 1_966_080, 2_097_152 + sizeof(HeapManager.Storage), 2_621_440, 3_145_728, 3_670_016, 257 4_194_304 + sizeof(HeapManager.Storage) 258 }; 259 #ifdef FASTLOOKUP 260 static unsigned char lookup[LookupSizes]; // O(1) lookup for small sizes 261 #endif // FASTLOOKUP 262 static int mmapFd = -1; // fake or actual fd for anonymous file 263 264 265 #ifdef __CFA_DEBUG__ 266 static _Bool heapBoot = 0; // detect recursion during boot 267 #endif // __CFA_DEBUG__ 268 static HeapManager heapManager __attribute__(( aligned (128) )) @= {}; // size of cache line to prevent false sharing 269 242 270 243 271 static inline _Bool setMmapStart( size_t value ) { … … 281 309 static void ^?{}( HeapManager & ) { 282 310 #ifdef __STATISTICS__ 283 // if ( prtHeapTerm() ) {311 // if ( traceHeapTerm() ) { 284 312 // printStats(); 285 // checkFree( heapManager, true );313 // if ( checkfree() ) checkFree( heapManager, true ); 286 314 // } // if 287 315 #endif // __STATISTICS__ 288 316 } // ~HeapManager 289 317 290 291 #ifdef __CFA_DEBUG__292 static _Bool heapBoot = 0; // detect recursion during boot293 #endif // __CFA_DEBUG__294 static HeapManager heapManager __attribute__(( aligned (128) )) @= {}; // size of cache line to prevent false sharing295 318 296 319 static void memory_startup( void ) __attribute__(( constructor( STARTUP_PRIORITY_MEMORY ) )); … … 312 335 ^heapManager{}; 313 336 } // memory_shutdown 314 315 static inline size_t getKey( const HeapManager.FreeHeader & freeheader ) { return freeheader.blockSize; }316 337 317 338 … … 342 363 static void printStats() { 343 364 char helpText[512]; 344 int len = snprintf( helpText, 512,345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 365 __cfaabi_dbg_bits_print_buffer( helpText, 512, 366 "\nHeap statistics:\n" 367 " malloc: calls %u / storage %llu\n" 368 " calloc: calls %u / storage %llu\n" 369 " memalign: calls %u / storage %llu\n" 370 " cmemalign: calls %u / storage %llu\n" 371 " realloc: calls %u / storage %llu\n" 372 " free: calls %u / storage %llu\n" 373 " mmap: calls %u / storage %llu\n" 374 " munmap: calls %u / storage %llu\n" 375 " sbrk: calls %u / storage %llu\n", 376 malloc_calls, malloc_storage, 377 calloc_calls, calloc_storage, 378 memalign_calls, memalign_storage, 379 cmemalign_calls, cmemalign_storage, 380 realloc_calls, realloc_storage, 381 free_calls, free_storage, 382 mmap_calls, mmap_storage, 383 munmap_calls, munmap_storage, 384 sbrk_calls, sbrk_storage 364 385 ); 365 write( statfd, helpText, len );366 386 } // printStats 367 387 … … 637 657 638 658 639 size_t checkFree( HeapManager & manager , _Bool prt) with ( manager ) {659 size_t checkFree( HeapManager & manager ) with ( manager ) { 640 660 size_t total = 0; 641 661 #ifdef __STATISTICS__ 642 662 __cfaabi_dbg_bits_acquire(); 643 if ( prt )__cfaabi_dbg_bits_print_nolock( "\nBin lists (bin size : free blocks on list)\n" );663 __cfaabi_dbg_bits_print_nolock( "\nBin lists (bin size : free blocks on list)\n" ); 644 664 #endif // __STATISTICS__ 645 665 for ( unsigned int i = 0; i < maxBucketsUsed; i += 1 ) { … … 659 679 } // for 660 680 #ifdef __STATISTICS__ 661 if ( prt )__cfaabi_dbg_bits_print_nolock( "%7zu, %-7u ", size, N );681 __cfaabi_dbg_bits_print_nolock( "%7zu, %-7u ", size, N ); 662 682 if ( (i + 1) % 8 == 0 ) __cfaabi_dbg_bits_print_nolock( "\n" ); 663 683 #endif // __STATISTICS__ 664 684 } // for 665 685 #ifdef __STATISTICS__ 666 if ( prt )__cfaabi_dbg_bits_print_nolock( "\ntotal free blocks:%zu\n", total );686 __cfaabi_dbg_bits_print_nolock( "\ntotal free blocks:%zu\n", total ); 667 687 __cfaabi_dbg_bits_release(); 668 688 #endif // __STATISTICS__ … … 922 942 #ifdef __STATISTICS__ 923 943 printStats(); 924 checkFree( heapManager, true);944 if ( checkFree() ) checkFree( heapManager ); 925 945 #endif // __STATISTICS__ 926 946 } // malloc_stats -
src/libcfa/stdhdr/malloc.h
r04e367c r3537dd7 10 10 // Created On : Thu Jul 20 15:58:16 2017 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Mon Jul 23 18:20:32201813 // Update Count : 812 // Last Modified On : Tue Jul 31 10:01:10 2018 13 // Update Count : 9 14 14 // 15 15 … … 17 17 size_t default_mmap_start(); // CFA extras 18 18 size_t default_heap_expansion(); 19 20 _Bool traceHeap(); 21 _Bool traceHeapOn(); 22 _Bool traceHeapOff(); 23 24 _Bool traceHeapTerm(); 25 _Bool traceHeapTermOn(); 26 _Bool traceHeapTermOff(); 27 28 _Bool checkFree(); 29 _Bool checkFreeOn(); 30 _Bool checkFreeOff(); 31 19 32 extern "C" { 20 33 size_t malloc_alignment( void * ); -
src/prelude/Makefile.am
r04e367c r3537dd7 23 23 noinst_DATA = ../libcfa/libcfa-prelude.c 24 24 25 CC = ${abs_top_builddir}/src/driver/cfa25 CC = @CFACC@ 26 26 27 27 $(DEPDIR) : … … 58 58 include $(DEPDIR)/builtins.Po 59 59 60 ../libcfa/libcfa-prelude.c : prelude.cf extras.cf gcc-builtins.cf builtins.cf ${abs_top_builddir}/src/driver/cfa-cpp61 ${AM_V_GEN} ${abs_top_builddir}/src/driver/cfa-cpp-l prelude.cf $@ # use src/cfa-cpp as not in lib until after install60 ../libcfa/libcfa-prelude.c : prelude.cf extras.cf gcc-builtins.cf builtins.cf @CFACPP@ 61 ${AM_V_GEN}@CFACPP@ -l prelude.cf $@ # use src/cfa-cpp as not in lib until after install 62 62 63 bootloader.c : ${srcdir}/bootloader.cf prelude.cf extras.cf gcc-builtins.cf builtins.cf ${abs_top_builddir}/src/driver/cfa-cpp64 ${AM_V_GEN} ${abs_top_builddir}/src/driver/cfa-cpp-tpm ${srcdir}/bootloader.cf $@ # use src/cfa-cpp as not in lib until after install63 bootloader.c : ${srcdir}/bootloader.cf prelude.cf extras.cf gcc-builtins.cf builtins.cf @CFACPP@ 64 ${AM_V_GEN}@CFACPP@ -tpm ${srcdir}/bootloader.cf $@ # use src/cfa-cpp as not in lib until after install 65 65 66 66 maintainer-clean-local : -
src/prelude/Makefile.in
r04e367c r3537dd7 162 162 AWK = @AWK@ 163 163 BACKEND_CC = @BACKEND_CC@ 164 CC = ${abs_top_builddir}/src/driver/cfa 164 BUILD_IN_TREE_FLAGS = @BUILD_IN_TREE_FLAGS@ 165 BUILD_IN_TREE_FLAGS_NOLIB = @BUILD_IN_TREE_FLAGS_NOLIB@ 166 CC = @CFACC@ 165 167 CCAS = @CCAS@ 166 168 CCASDEPMODE = @CCASDEPMODE@ 167 169 CCASFLAGS = @CCASFLAGS@ 168 170 CCDEPMODE = @CCDEPMODE@ 171 CFACC = @CFACC@ 172 CFACPP = @CFACPP@ 169 173 CFA_BACKEND_CC = @CFA_BACKEND_CC@ 170 174 CFA_BINDIR = @CFA_BINDIR@ … … 183 187 DEFS = @DEFS@ 184 188 DEPDIR = @DEPDIR@ 189 DRIVER_DIR = @DRIVER_DIR@ 185 190 ECHO_C = @ECHO_C@ 186 191 ECHO_N = @ECHO_N@ … … 526 531 include $(DEPDIR)/builtins.Po 527 532 528 ../libcfa/libcfa-prelude.c : prelude.cf extras.cf gcc-builtins.cf builtins.cf ${abs_top_builddir}/src/driver/cfa-cpp529 ${AM_V_GEN} ${abs_top_builddir}/src/driver/cfa-cpp-l prelude.cf $@ # use src/cfa-cpp as not in lib until after install530 531 bootloader.c : ${srcdir}/bootloader.cf prelude.cf extras.cf gcc-builtins.cf builtins.cf ${abs_top_builddir}/src/driver/cfa-cpp532 ${AM_V_GEN} ${abs_top_builddir}/src/driver/cfa-cpp-tpm ${srcdir}/bootloader.cf $@ # use src/cfa-cpp as not in lib until after install533 ../libcfa/libcfa-prelude.c : prelude.cf extras.cf gcc-builtins.cf builtins.cf @CFACPP@ 534 ${AM_V_GEN}@CFACPP@ -l prelude.cf $@ # use src/cfa-cpp as not in lib until after install 535 536 bootloader.c : ${srcdir}/bootloader.cf prelude.cf extras.cf gcc-builtins.cf builtins.cf @CFACPP@ 537 ${AM_V_GEN}@CFACPP@ -tpm ${srcdir}/bootloader.cf $@ # use src/cfa-cpp as not in lib until after install 533 538 534 539 maintainer-clean-local : -
src/tests/Makefile.am
r04e367c r3537dd7 30 30 # applies to both programs 31 31 AM_CFLAGS = $(if $(test), 2> $(test), ) \ 32 -XCFA \33 -t \34 -B${abs_top_builddir}/src/driver \35 32 -g \ 36 33 -Wall \ 37 34 -Wno-unused-function \ 38 35 -quiet @CFA_FLAGS@ \ 39 -I. \40 36 -DIN_DIR="${srcdir}/.in/" \ 41 -L${abs_top_builddir}/src/libcfa \ 42 -I${abs_top_srcdir}/src/libcfa \ 43 -I${abs_top_srcdir}/src/libcfa/containers \ 44 -I${abs_top_srcdir}/src/libcfa/concurrency \ 45 -I${abs_top_srcdir}/src/libcfa/stdhdr 37 @BUILD_IN_TREE_FLAGS@ 46 38 47 39 if !BUILD_DEBUG … … 55 47 endif 56 48 57 CC = ${abs_top_builddir}/src/driver/cfa49 CC = @CFACC@ 58 50 59 51 .PHONY : list … … 93 85 # implicit rule so not all test require a rule 94 86 % : %.c $(CC) 95 echo $(headers_deps)96 87 $(COMPILE) $(abspath ${<}) -o ${@} 97 88 -
src/tests/Makefile.in
r04e367c r3537dd7 181 181 AWK = @AWK@ 182 182 BACKEND_CC = @BACKEND_CC@ 183 CC = ${abs_top_builddir}/src/driver/cfa 183 BUILD_IN_TREE_FLAGS = @BUILD_IN_TREE_FLAGS@ 184 BUILD_IN_TREE_FLAGS_NOLIB = @BUILD_IN_TREE_FLAGS_NOLIB@ 185 CC = @CFACC@ 184 186 CCAS = @CCAS@ 185 187 CCASDEPMODE = @CCASDEPMODE@ 186 188 CCASFLAGS = @CCASFLAGS@ 187 189 CCDEPMODE = @CCDEPMODE@ 190 CFACC = @CFACC@ 191 CFACPP = @CFACPP@ 188 192 CFA_BACKEND_CC = @CFA_BACKEND_CC@ 189 193 CFA_BINDIR = @CFA_BINDIR@ … … 202 206 DEFS = @DEFS@ 203 207 DEPDIR = @DEPDIR@ 208 DRIVER_DIR = @DRIVER_DIR@ 204 209 ECHO_C = @ECHO_C@ 205 210 ECHO_N = @ECHO_N@ … … 298 303 299 304 # applies to both programs 300 AM_CFLAGS = $(if $(test), 2> $(test), ) -XCFA -t \ 301 -B${abs_top_builddir}/src/driver -g -Wall -Wno-unused-function \ 302 -quiet @CFA_FLAGS@ -I. -DIN_DIR="${srcdir}/.in/" \ 303 -L${abs_top_builddir}/src/libcfa \ 304 -I${abs_top_srcdir}/src/libcfa \ 305 -I${abs_top_srcdir}/src/libcfa/containers \ 306 -I${abs_top_srcdir}/src/libcfa/concurrency \ 307 -I${abs_top_srcdir}/src/libcfa/stdhdr $(am__append_1) \ 308 $(am__append_2) $(am__append_3) 305 AM_CFLAGS = $(if $(test), 2> $(test), ) -g -Wall -Wno-unused-function \ 306 -quiet @CFA_FLAGS@ -DIN_DIR="${srcdir}/.in/" \ 307 @BUILD_IN_TREE_FLAGS@ $(am__append_1) $(am__append_2) \ 308 $(am__append_3) 309 309 fstream_test_SOURCES = fstream_test.c 310 310 avl_test_SOURCES = avltree/avl_test.c avltree/avl0.c avltree/avl1.c avltree/avl2.c avltree/avl3.c avltree/avl4.c avltree/avl-private.c … … 641 641 # implicit rule so not all test require a rule 642 642 % : %.c $(CC) 643 echo $(headers_deps)644 643 $(COMPILE) $(abspath ${<}) -o ${@} 645 644 -
src/tests/preempt_longrun/Makefile.am
r04e367c r3537dd7 32 32 BUILD_FLAGS = -g -Wall -Wno-unused-function -quiet @CFA_FLAGS@ -O2 -DPREEMPTION_RATE=${preempt} -I.. -I. -DTEST_$(shell cat .type | tr a-z A-Z) 33 33 CFLAGS = ${BUILD_FLAGS} 34 CC = ${top_builddir}/src/driver/cfa34 CC = @CFACC@ 35 35 36 36 TESTS = block coroutine create disjoint enter enter3 processor stack wait yield -
src/tests/preempt_longrun/Makefile.in
r04e367c r3537dd7 337 337 AWK = @AWK@ 338 338 BACKEND_CC = @BACKEND_CC@ 339 CC = ${top_builddir}/src/driver/cfa 339 BUILD_IN_TREE_FLAGS = @BUILD_IN_TREE_FLAGS@ 340 BUILD_IN_TREE_FLAGS_NOLIB = @BUILD_IN_TREE_FLAGS_NOLIB@ 341 CC = @CFACC@ 340 342 CCAS = @CCAS@ 341 343 CCASDEPMODE = @CCASDEPMODE@ 342 344 CCASFLAGS = @CCASFLAGS@ 343 345 CCDEPMODE = @CCDEPMODE@ 346 CFACC = @CFACC@ 347 CFACPP = @CFACPP@ 344 348 CFA_BACKEND_CC = @CFA_BACKEND_CC@ 345 349 CFA_BINDIR = @CFA_BINDIR@ … … 358 362 DEFS = @DEFS@ 359 363 DEPDIR = @DEPDIR@ 364 DRIVER_DIR = @DRIVER_DIR@ 360 365 ECHO_C = @ECHO_C@ 361 366 ECHO_N = @ECHO_N@ -
src/tests/pybin/tools.py
r04e367c r3537dd7 48 48 return False 49 49 50 return match.group(1) == "ASCII text"50 return match.group(1).startswith("ASCII text") 51 51 52 52 # Remove 1 or more files silently -
tools/Makefile.in
r04e367c r3537dd7 186 186 AWK = @AWK@ 187 187 BACKEND_CC = @BACKEND_CC@ 188 BUILD_IN_TREE_FLAGS = @BUILD_IN_TREE_FLAGS@ 189 BUILD_IN_TREE_FLAGS_NOLIB = @BUILD_IN_TREE_FLAGS_NOLIB@ 188 190 CC = @BACKEND_CC@ 189 191 CCAS = @CCAS@ … … 191 193 CCASFLAGS = @CCASFLAGS@ 192 194 CCDEPMODE = @CCDEPMODE@ 195 CFACC = @CFACC@ 196 CFACPP = @CFACPP@ 193 197 CFA_BACKEND_CC = @CFA_BACKEND_CC@ 194 198 CFA_BINDIR = @CFA_BINDIR@ … … 207 211 DEFS = @DEFS@ 208 212 DEPDIR = @DEPDIR@ 213 DRIVER_DIR = @DRIVER_DIR@ 209 214 ECHO_C = @ECHO_C@ 210 215 ECHO_N = @ECHO_N@ -
tools/prettyprinter/Makefile.in
r04e367c r3537dd7 210 210 AWK = @AWK@ 211 211 BACKEND_CC = @BACKEND_CC@ 212 BUILD_IN_TREE_FLAGS = @BUILD_IN_TREE_FLAGS@ 213 BUILD_IN_TREE_FLAGS_NOLIB = @BUILD_IN_TREE_FLAGS_NOLIB@ 212 214 CC = @CC@ 213 215 CCAS = @CCAS@ … … 215 217 CCASFLAGS = @CCASFLAGS@ 216 218 CCDEPMODE = @CCDEPMODE@ 219 CFACC = @CFACC@ 220 CFACPP = @CFACPP@ 217 221 CFA_BACKEND_CC = @CFA_BACKEND_CC@ 218 222 CFA_BINDIR = @CFA_BINDIR@ … … 231 235 DEFS = @DEFS@ 232 236 DEPDIR = @DEPDIR@ 237 DRIVER_DIR = @DRIVER_DIR@ 233 238 ECHO_C = @ECHO_C@ 234 239 ECHO_N = @ECHO_N@
Note: See TracChangeset
for help on using the changeset viewer.