Add a compile-stage2-under-perf step to "make perf" target.
This commit is contained in:
parent
d5b2d62b20
commit
e45c91135a
13
mk/perf.mk
13
mk/perf.mk
@ -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)
|
||||||
|
@ -54,7 +54,7 @@ ifeq ($(CFG_OSTYPE), Linux)
|
|||||||
-e sched:sched_switch \
|
-e sched:sched_switch \
|
||||||
-e fs:do_sys_open \
|
-e fs:do_sys_open \
|
||||||
-i \
|
-i \
|
||||||
-r 10
|
-r 3
|
||||||
else
|
else
|
||||||
ifdef CFG_VALGRIND
|
ifdef CFG_VALGRIND
|
||||||
CFG_PERF_TOOL :=\
|
CFG_PERF_TOOL :=\
|
||||||
|
@ -46,6 +46,10 @@ STAGE$(2) := $$(Q)$$(call CFG_RUN_TARG,stage$(2), \
|
|||||||
$$(CFG_VALGRIND_COMPILE) stage$(2)/rustc$$(X) \
|
$$(CFG_VALGRIND_COMPILE) stage$(2)/rustc$$(X) \
|
||||||
$$(CFG_RUSTC_FLAGS))
|
$$(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
|
stage$(2)/%.o: stage$(2)/%.s
|
||||||
@$$(call E, assemble [gcc]: $$@)
|
@$$(call E, assemble [gcc]: $$@)
|
||||||
$$(Q)gcc $$(CFG_GCCISH_CFLAGS) -o $$@ -c $$<
|
$$(Q)gcc $$(CFG_GCCISH_CFLAGS) -o $$@ -c $$<
|
||||||
|
Loading…
Reference in New Issue
Block a user