Add a compile-stage2-under-perf step to "make perf" target.

This commit is contained in:
Graydon Hoare 2011-09-13 16:05:53 -07:00
parent d5b2d62b20
commit e45c91135a
3 changed files with 17 additions and 2 deletions

View File

@ -1 +1,12 @@
perf: check-stage2-perf
ifdef CFG_PERF_TOOL
rustc-perf$(X): stage2/rustc$(X)
@$(call E, perf compile: $@)
$(PERF_STAGE1) -L stage2 -o $@ $(COMPILER_CRATE)
rm -f $@
else
rustc-perf$(X): stage2/rustc$(X)
touch $@
endif
perf: check-stage2-perf rustc-perf$(X)

View File

@ -54,7 +54,7 @@ ifeq ($(CFG_OSTYPE), Linux)
-e sched:sched_switch \
-e fs:do_sys_open \
-i \
-r 10
-r 3
else
ifdef CFG_VALGRIND
CFG_PERF_TOOL :=\

View File

@ -46,6 +46,10 @@ STAGE$(2) := $$(Q)$$(call CFG_RUN_TARG,stage$(2), \
$$(CFG_VALGRIND_COMPILE) stage$(2)/rustc$$(X) \
$$(CFG_RUSTC_FLAGS))
PERF_STAGE$(2) := $$(Q)$$(call CFG_RUN_TARG,stage$(2), \
$$(CFG_PERF_TOOL) stage$(2)/rustc$$(X) \
$$(CFG_RUSTC_FLAGS))
stage$(2)/%.o: stage$(2)/%.s
@$$(call E, assemble [gcc]: $$@)
$$(Q)gcc $$(CFG_GCCISH_CFLAGS) -o $$@ -c $$<