Skip to content

Commit 5cd9ca9

Browse files
committed
mk: Remove all perf-related targets
I don't believe these have been used at all recently, and I doubt many of them still work, so remove the stale support.
1 parent 46dcffd commit 5cd9ca9

File tree

5 files changed

+2
-82
lines changed

5 files changed

+2
-82
lines changed

Makefile.in

-7
Original file line numberDiff line numberDiff line change
@@ -220,19 +220,12 @@ endif
220220
# The test suite
221221
ifneq ($(strip $(findstring check,$(MAKECMDGOALS)) \
222222
$(findstring test,$(MAKECMDGOALS)) \
223-
$(findstring perf,$(MAKECMDGOALS)) \
224223
$(findstring tidy,$(MAKECMDGOALS))),)
225224
CFG_INFO := $(info cfg: including test rules)
226225
include $(CFG_SRC_DIR)mk/tests.mk
227226
include $(CFG_SRC_DIR)mk/grammar.mk
228227
endif
229228

230-
# Performance and benchmarking
231-
ifneq ($(findstring perf,$(MAKECMDGOALS)),)
232-
CFG_INFO := $(info cfg: including perf rules)
233-
include $(CFG_SRC_DIR)mk/perf.mk
234-
endif
235-
236229
# Copy all the distributables to another directory for binary install
237230
ifneq ($(strip $(findstring prepare,$(MAKECMDGOALS)) \
238231
$(findstring dist,$(MAKECMDGOALS)) \

mk/main.mk

-8
Original file line numberDiff line numberDiff line change
@@ -522,14 +522,6 @@ STAGE$(1)_T_$(2)_H_$(3) := \
522522
$$(CFG_RUSTC_FLAGS) $$(EXTRAFLAGS_STAGE$(1)) --target=$(2)) \
523523
$$(RUSTC_FLAGS_$(2))
524524

525-
PERF_STAGE$(1)_T_$(2)_H_$(3) := \
526-
$$(Q)$$(call CFG_RUN_TARG_$(3),$(1), \
527-
$$(CFG_PERF_TOOL) \
528-
$$(HBIN$(1)_H_$(3))/rustc$$(X_$(3)) \
529-
--cfg $$(CFGFLAG$(1)_T_$(2)_H_$(3)) \
530-
$$(CFG_RUSTC_FLAGS) $$(EXTRAFLAGS_STAGE$(1)) --target=$(2)) \
531-
$$(RUSTC_FLAGS_$(2))
532-
533525
endef
534526

535527
$(foreach build,$(CFG_HOST), \

mk/perf.mk

-25
This file was deleted.

mk/platform.mk

-17
Original file line numberDiff line numberDiff line change
@@ -77,23 +77,6 @@ define DEF_GOOD_VALGRIND
7777
endef
7878
$(foreach t,$(CFG_TARGET),$(eval $(call DEF_GOOD_VALGRIND,$(t))))
7979

80-
ifneq ($(findstring linux,$(CFG_OSTYPE)),)
81-
ifdef CFG_PERF
82-
ifneq ($(CFG_PERF_WITH_LOGFD),)
83-
CFG_PERF_TOOL := $(CFG_PERF) stat -r 3 --log-fd 2
84-
else
85-
CFG_PERF_TOOL := $(CFG_PERF) stat -r 3
86-
endif
87-
else
88-
ifdef CFG_VALGRIND
89-
CFG_PERF_TOOL := \
90-
$(CFG_VALGRIND) --tool=cachegrind --cache-sim=yes --branch-sim=yes
91-
else
92-
CFG_PERF_TOOL := /usr/bin/time --verbose
93-
endif
94-
endif
95-
endif
96-
9780
AR := ar
9881

9982
define SET_FROM_CFG

mk/tests.mk

+2-25
Original file line numberDiff line numberDiff line change
@@ -50,11 +50,6 @@ ifdef CFG_VALGRIND
5050
CTEST_RUNTOOL = --runtool "$(CFG_VALGRIND)"
5151
endif
5252

53-
# Arguments to the perf tests
54-
ifdef CFG_PERF_TOOL
55-
CTEST_PERF_RUNTOOL = --runtool "$(CFG_PERF_TOOL)"
56-
endif
57-
5853
CTEST_TESTARGS := $(TESTARGS)
5954

6055
# --bench is only relevant for crate tests, not for the compile tests
@@ -70,12 +65,6 @@ endif
7065
# This prevents tests from failing with some locales (fixes #17423).
7166
export LC_ALL=C
7267

73-
# If we're running perf then set this environment variable
74-
# to put the benchmarks into 'hard mode'
75-
ifeq ($(MAKECMDGOALS),perf)
76-
export RUST_BENCH=1
77-
endif
78-
7968
TEST_LOG_FILE=tmp/check-stage$(1)-T-$(2)-H-$(3)-$(4).log
8069
TEST_OK_FILE=tmp/check-stage$(1)-T-$(2)-H-$(3)-$(4).ok
8170

@@ -486,10 +475,6 @@ CODEGEN_RS := $(wildcard $(S)src/test/codegen/*.rs)
486475
CODEGEN_CC := $(wildcard $(S)src/test/codegen/*.cc)
487476
RUSTDOCCK_RS := $(wildcard $(S)src/test/rustdoc/*.rs)
488477

489-
# perf tests are the same as bench tests only they run under
490-
# a performance monitor.
491-
PERF_RS := $(wildcard $(S)src/test/bench/*.rs)
492-
493478
RPASS_TESTS := $(RPASS_RS)
494479
RPASS_VALGRIND_TESTS := $(RPASS_VALGRIND_RS)
495480
RPASS_FULL_TESTS := $(RPASS_FULL_RS)
@@ -499,7 +484,6 @@ RFAIL_TESTS := $(RFAIL_RS)
499484
CFAIL_TESTS := $(CFAIL_RS)
500485
PFAIL_TESTS := $(PFAIL_RS)
501486
BENCH_TESTS := $(BENCH_RS)
502-
PERF_TESTS := $(PERF_RS)
503487
PRETTY_TESTS := $(PRETTY_RS)
504488
DEBUGINFO_GDB_TESTS := $(DEBUGINFO_GDB_RS)
505489
DEBUGINFO_LLDB_TESTS := $(DEBUGINFO_LLDB_RS)
@@ -551,11 +535,6 @@ CTEST_BUILD_BASE_bench = bench
551535
CTEST_MODE_bench = run-pass
552536
CTEST_RUNTOOL_bench = $(CTEST_RUNTOOL)
553537

554-
CTEST_SRC_BASE_perf = bench
555-
CTEST_BUILD_BASE_perf = perf
556-
CTEST_MODE_perf = run-pass
557-
CTEST_RUNTOOL_perf = $(CTEST_PERF_RUNTOOL)
558-
559538
CTEST_SRC_BASE_debuginfo-gdb = debuginfo
560539
CTEST_BUILD_BASE_debuginfo-gdb = debuginfo-gdb
561540
CTEST_MODE_debuginfo-gdb = debuginfo-gdb
@@ -625,7 +604,7 @@ TEST_SREQ$(1)_T_$(2)_H_$(3) = \
625604
$$(HBIN$(1)_H_$(3))/compiletest$$(X_$(3)) \
626605
$$(SREQ$(1)_T_$(2)_H_$(3))
627606

628-
# Rules for the cfail/rfail/rpass/bench/perf test runner
607+
# Rules for the cfail/rfail/rpass/bench test runner
629608

630609
# The tests select when to use debug configuration on their own;
631610
# remove directive, if present, from CFG_RUSTC_FLAGS (issue #7898).
@@ -689,7 +668,6 @@ CTEST_DEPS_rfail_$(1)-T-$(2)-H-$(3) = $$(RFAIL_TESTS)
689668
CTEST_DEPS_cfail_$(1)-T-$(2)-H-$(3) = $$(CFAIL_TESTS)
690669
CTEST_DEPS_pfail_$(1)-T-$(2)-H-$(3) = $$(PFAIL_TESTS)
691670
CTEST_DEPS_bench_$(1)-T-$(2)-H-$(3) = $$(BENCH_TESTS)
692-
CTEST_DEPS_perf_$(1)-T-$(2)-H-$(3) = $$(PERF_TESTS)
693671
CTEST_DEPS_debuginfo-gdb_$(1)-T-$(2)-H-$(3) = $$(DEBUGINFO_GDB_TESTS)
694672
CTEST_DEPS_debuginfo-lldb_$(1)-T-$(2)-H-$(3) = $$(DEBUGINFO_LLDB_TESTS) \
695673
$(S)src/etc/lldb_batchmode.py \
@@ -761,7 +739,7 @@ endif
761739
endef
762740

763741
CTEST_NAMES = rpass rpass-valgrind rpass-full rfail-full cfail-full rfail cfail pfail \
764-
bench perf debuginfo-gdb debuginfo-lldb codegen rustdocck
742+
bench debuginfo-gdb debuginfo-lldb codegen rustdocck
765743

766744
$(foreach host,$(CFG_HOST), \
767745
$(eval $(foreach target,$(CFG_TARGET), \
@@ -934,7 +912,6 @@ TEST_GROUPS = \
934912
cfail \
935913
pfail \
936914
bench \
937-
perf \
938915
rmake \
939916
rustdocck \
940917
debuginfo-gdb \

0 commit comments

Comments
 (0)