go back to -O, drop defunct xprofile target
-O/-O2/-O3 don't affect hledger performance right now, leaving a buildo2 target for future checking
This commit is contained in:
		
							parent
							
								
									0465c369e2
								
							
						
					
					
						commit
						0bb2b002c3
					
				
							
								
								
									
										43
									
								
								Makefile
									
									
									
									
									
								
							
							
						
						
									
										43
									
								
								Makefile
									
									
									
									
									
								
							@ -1,20 +1,27 @@
 | 
				
			|||||||
BUILD=ghc --make hledger.hs -O3 -o hledger
 | 
					BUILD=ghc --make hledger.hs -o hledger -O
 | 
				
			||||||
 | 
					build: tag
 | 
				
			||||||
 | 
						$(BUILD)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					BUILDO2=ghc --make hledger.hs -o hledgero2 -O2 -fvia-C
 | 
				
			||||||
 | 
					buildo2:
 | 
				
			||||||
 | 
						$(BUILDO2)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					rebuild: clean build
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					# recompile and run tests whenever a module changes
 | 
				
			||||||
 | 
					# see http://searchpath.org , you may need the patched version from
 | 
				
			||||||
 | 
					# http://joyful.com/repos/searchpath
 | 
				
			||||||
 | 
					continuous ci:
 | 
				
			||||||
 | 
						sp --no-exts --no-default-map -o hledger ghc --make hledger.hs --run test
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					test:
 | 
				
			||||||
 | 
						./hledger.hs test
 | 
				
			||||||
 | 
					
 | 
				
			||||||
PROFBIN=hledgerp
 | 
					PROFBIN=hledgerp
 | 
				
			||||||
BUILDPROF=ghc --make hledger.hs -prof -auto-all -o $(PROFBIN)
 | 
					BUILDPROF=ghc --make hledger.hs -prof -auto-all -o $(PROFBIN)
 | 
				
			||||||
RUNPROF=./$(PROFBIN) +RTS -p -RTS
 | 
					RUNPROF=./$(PROFBIN) +RTS -p -RTS
 | 
				
			||||||
PROFCMD=-s balance
 | 
					PROFCMD=-s balance
 | 
				
			||||||
TIME=`date +"%Y%m%d%H%M"`
 | 
					TIME=`date +"%Y%m%d%H%M"`
 | 
				
			||||||
 | 
					 | 
				
			||||||
build: tag
 | 
					 | 
				
			||||||
	$(BUILD)
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
rebuild: clean build
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
# build and run whenever a module changes, see http://searchpath.org
 | 
					 | 
				
			||||||
# or the patched http://joyful.com/repos/searchpath
 | 
					 | 
				
			||||||
continuous ci:
 | 
					 | 
				
			||||||
	sp --no-exts --no-default-map -o hledger ghc --make hledger.hs --run test
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
profile:
 | 
					profile:
 | 
				
			||||||
	@echo "Profiling $(PROFCMD)"
 | 
						@echo "Profiling $(PROFCMD)"
 | 
				
			||||||
	$(BUILDPROF)
 | 
						$(BUILDPROF)
 | 
				
			||||||
@ -23,17 +30,9 @@ profile:
 | 
				
			|||||||
	cp simple.prof profs/$(TIME).prof
 | 
						cp simple.prof profs/$(TIME).prof
 | 
				
			||||||
	cat simple.prof
 | 
						cat simple.prof
 | 
				
			||||||
 | 
					
 | 
				
			||||||
xprofile: build
 | 
					 | 
				
			||||||
	$(PROFILE) -x
 | 
					 | 
				
			||||||
	mv hledger.prof profs/$(TIME).xprof
 | 
					 | 
				
			||||||
	ghcprof profs/$(TIME).xprof
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
test:
 | 
					 | 
				
			||||||
	./hledger.hs test
 | 
					 | 
				
			||||||
#	tools/regressiontest.py
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
# run performance benchmarks and save results in profs
 | 
					# run performance benchmarks and save results in profs
 | 
				
			||||||
BENCHEXES=hledger ledger
 | 
					# prepend ./ to executables if not in $PATH
 | 
				
			||||||
 | 
					BENCHEXES=./hledgero2 ledger
 | 
				
			||||||
BENCHITERATIONS=2
 | 
					BENCHITERATIONS=2
 | 
				
			||||||
bench:
 | 
					bench:
 | 
				
			||||||
	tools/bench.hs bench.tests $(BENCHITERATIONS) $(BENCHEXES) | tee profs/`date +%Y%m%d%H%M%S`.bench
 | 
						tools/bench.hs bench.tests $(BENCHITERATIONS) $(BENCHEXES) | tee profs/`date +%Y%m%d%H%M%S`.bench
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
		Reference in New Issue
	
	Block a user