about summary refs log tree commit diff
diff options
context:
space:
mode:
authorAlex Crichton <alex@alexcrichton.com>2016-01-21 14:45:23 -0800
committerAlex Crichton <alex@alexcrichton.com>2016-01-21 14:45:23 -0800
commit5cd9ca90c58db5e211c5b9c5e605be5870925133 (patch)
treef1516c6bf12fb5e6941d913cbb751933c601a815
parent46dcffd05b46e62c27629f4231fc794e94e614a8 (diff)
downloadrust-5cd9ca90c58db5e211c5b9c5e605be5870925133.tar.gz
rust-5cd9ca90c58db5e211c5b9c5e605be5870925133.zip
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.
-rw-r--r--Makefile.in7
-rw-r--r--mk/main.mk8
-rw-r--r--mk/perf.mk25
-rw-r--r--mk/platform.mk17
-rw-r--r--mk/tests.mk27
5 files changed, 2 insertions, 82 deletions
diff --git a/Makefile.in b/Makefile.in
index baa7e77394a..e41ce56b9ed 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -220,19 +220,12 @@ endif
 # The test suite
 ifneq ($(strip $(findstring check,$(MAKECMDGOALS)) \
                $(findstring test,$(MAKECMDGOALS))  \
-               $(findstring perf,$(MAKECMDGOALS))  \
                $(findstring tidy,$(MAKECMDGOALS))),)
   CFG_INFO := $(info cfg: including test rules)
   include $(CFG_SRC_DIR)mk/tests.mk
   include $(CFG_SRC_DIR)mk/grammar.mk
 endif
 
-# Performance and benchmarking
-ifneq ($(findstring perf,$(MAKECMDGOALS)),)
-  CFG_INFO := $(info cfg: including perf rules)
-  include $(CFG_SRC_DIR)mk/perf.mk
-endif
-
 # Copy all the distributables to another directory for binary install
 ifneq ($(strip $(findstring prepare,$(MAKECMDGOALS)) \
                $(findstring dist,$(MAKECMDGOALS)) \
diff --git a/mk/main.mk b/mk/main.mk
index 084e08aa339..9d75771dc80 100644
--- a/mk/main.mk
+++ b/mk/main.mk
@@ -522,14 +522,6 @@ STAGE$(1)_T_$(2)_H_$(3) := \
 		$$(CFG_RUSTC_FLAGS) $$(EXTRAFLAGS_STAGE$(1)) --target=$(2)) \
                 $$(RUSTC_FLAGS_$(2))
 
-PERF_STAGE$(1)_T_$(2)_H_$(3) := \
-	$$(Q)$$(call CFG_RUN_TARG_$(3),$(1), \
-		$$(CFG_PERF_TOOL) \
-		$$(HBIN$(1)_H_$(3))/rustc$$(X_$(3)) \
-		--cfg $$(CFGFLAG$(1)_T_$(2)_H_$(3)) \
-		$$(CFG_RUSTC_FLAGS) $$(EXTRAFLAGS_STAGE$(1)) --target=$(2)) \
-                $$(RUSTC_FLAGS_$(2))
-
 endef
 
 $(foreach build,$(CFG_HOST), \
diff --git a/mk/perf.mk b/mk/perf.mk
deleted file mode 100644
index 16cbaab495d..00000000000
--- a/mk/perf.mk
+++ /dev/null
@@ -1,25 +0,0 @@
-# Copyright 2012 The Rust Project Developers. See the COPYRIGHT
-# file at the top-level directory of this distribution and at
-# http://rust-lang.org/COPYRIGHT.
-#
-# Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-# http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-# <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-# option. This file may not be copied, modified, or distributed
-# except according to those terms.
-
-
-ifdef CFG_PERF_TOOL
-rustc-perf$(X): $(CFG_BUILD)/stage2/bin/rustc$(X_$(CFG_BUILD))
-	@$(call E, perf compile: $@)
-	$(PERF_STAGE2_T_$(CFG_BUILD)_H_$(CFG_BUILD)) \
-		 -o $@ $(COMPILER_CRATE) >rustc-perf.err 2>&1
-	$(Q)rm -f $(LIBRUSTC_GLOB)
-else
-rustc-perf$(X): $(CFG_BUILD)/stage2/bin/rustc$(X_$(CFG_BUILD))
-	$(Q)touch $@
-endif
-
-perf: check-stage2-perf rustc-perf$(X_$(CFG_BUILD))
-	$(Q)find $(CFG_BUILD)/test/perf -name \*.err | xargs cat
-	$(Q)cat rustc-perf.err
diff --git a/mk/platform.mk b/mk/platform.mk
index 5239086a655..9c74e657a84 100644
--- a/mk/platform.mk
+++ b/mk/platform.mk
@@ -77,23 +77,6 @@ define DEF_GOOD_VALGRIND
 endef
 $(foreach t,$(CFG_TARGET),$(eval $(call DEF_GOOD_VALGRIND,$(t))))
 
-ifneq ($(findstring linux,$(CFG_OSTYPE)),)
-  ifdef CFG_PERF
-    ifneq ($(CFG_PERF_WITH_LOGFD),)
-        CFG_PERF_TOOL := $(CFG_PERF) stat -r 3 --log-fd 2
-    else
-        CFG_PERF_TOOL := $(CFG_PERF) stat -r 3
-    endif
-  else
-    ifdef CFG_VALGRIND
-      CFG_PERF_TOOL := \
-        $(CFG_VALGRIND) --tool=cachegrind --cache-sim=yes --branch-sim=yes
-    else
-      CFG_PERF_TOOL := /usr/bin/time --verbose
-    endif
-  endif
-endif
-
 AR := ar
 
 define SET_FROM_CFG
diff --git a/mk/tests.mk b/mk/tests.mk
index 0f30ff8711e..b3f7278ad62 100644
--- a/mk/tests.mk
+++ b/mk/tests.mk
@@ -50,11 +50,6 @@ ifdef CFG_VALGRIND
   CTEST_RUNTOOL = --runtool "$(CFG_VALGRIND)"
 endif
 
-# Arguments to the perf tests
-ifdef CFG_PERF_TOOL
-  CTEST_PERF_RUNTOOL = --runtool "$(CFG_PERF_TOOL)"
-endif
-
 CTEST_TESTARGS := $(TESTARGS)
 
 # --bench is only relevant for crate tests, not for the compile tests
@@ -70,12 +65,6 @@ endif
 # This prevents tests from failing with some locales (fixes #17423).
 export LC_ALL=C
 
-# If we're running perf then set this environment variable
-# to put the benchmarks into 'hard mode'
-ifeq ($(MAKECMDGOALS),perf)
-  export RUST_BENCH=1
-endif
-
 TEST_LOG_FILE=tmp/check-stage$(1)-T-$(2)-H-$(3)-$(4).log
 TEST_OK_FILE=tmp/check-stage$(1)-T-$(2)-H-$(3)-$(4).ok
 
@@ -486,10 +475,6 @@ CODEGEN_RS := $(wildcard $(S)src/test/codegen/*.rs)
 CODEGEN_CC := $(wildcard $(S)src/test/codegen/*.cc)
 RUSTDOCCK_RS := $(wildcard $(S)src/test/rustdoc/*.rs)
 
-# perf tests are the same as bench tests only they run under
-# a performance monitor.
-PERF_RS := $(wildcard $(S)src/test/bench/*.rs)
-
 RPASS_TESTS := $(RPASS_RS)
 RPASS_VALGRIND_TESTS := $(RPASS_VALGRIND_RS)
 RPASS_FULL_TESTS := $(RPASS_FULL_RS)
@@ -499,7 +484,6 @@ RFAIL_TESTS := $(RFAIL_RS)
 CFAIL_TESTS := $(CFAIL_RS)
 PFAIL_TESTS := $(PFAIL_RS)
 BENCH_TESTS := $(BENCH_RS)
-PERF_TESTS := $(PERF_RS)
 PRETTY_TESTS := $(PRETTY_RS)
 DEBUGINFO_GDB_TESTS := $(DEBUGINFO_GDB_RS)
 DEBUGINFO_LLDB_TESTS := $(DEBUGINFO_LLDB_RS)
@@ -551,11 +535,6 @@ CTEST_BUILD_BASE_bench = bench
 CTEST_MODE_bench = run-pass
 CTEST_RUNTOOL_bench = $(CTEST_RUNTOOL)
 
-CTEST_SRC_BASE_perf = bench
-CTEST_BUILD_BASE_perf = perf
-CTEST_MODE_perf = run-pass
-CTEST_RUNTOOL_perf = $(CTEST_PERF_RUNTOOL)
-
 CTEST_SRC_BASE_debuginfo-gdb = debuginfo
 CTEST_BUILD_BASE_debuginfo-gdb = debuginfo-gdb
 CTEST_MODE_debuginfo-gdb = debuginfo-gdb
@@ -625,7 +604,7 @@ TEST_SREQ$(1)_T_$(2)_H_$(3) = \
 	$$(HBIN$(1)_H_$(3))/compiletest$$(X_$(3)) \
 	$$(SREQ$(1)_T_$(2)_H_$(3))
 
-# Rules for the cfail/rfail/rpass/bench/perf test runner
+# Rules for the cfail/rfail/rpass/bench test runner
 
 # The tests select when to use debug configuration on their own;
 # remove directive, if present, from CFG_RUSTC_FLAGS (issue #7898).
@@ -689,7 +668,6 @@ CTEST_DEPS_rfail_$(1)-T-$(2)-H-$(3) = $$(RFAIL_TESTS)
 CTEST_DEPS_cfail_$(1)-T-$(2)-H-$(3) = $$(CFAIL_TESTS)
 CTEST_DEPS_pfail_$(1)-T-$(2)-H-$(3) = $$(PFAIL_TESTS)
 CTEST_DEPS_bench_$(1)-T-$(2)-H-$(3) = $$(BENCH_TESTS)
-CTEST_DEPS_perf_$(1)-T-$(2)-H-$(3) = $$(PERF_TESTS)
 CTEST_DEPS_debuginfo-gdb_$(1)-T-$(2)-H-$(3) = $$(DEBUGINFO_GDB_TESTS)
 CTEST_DEPS_debuginfo-lldb_$(1)-T-$(2)-H-$(3) = $$(DEBUGINFO_LLDB_TESTS) \
                                                $(S)src/etc/lldb_batchmode.py \
@@ -761,7 +739,7 @@ endif
 endef
 
 CTEST_NAMES = rpass rpass-valgrind rpass-full rfail-full cfail-full rfail cfail pfail \
-	bench perf debuginfo-gdb debuginfo-lldb codegen rustdocck
+	bench debuginfo-gdb debuginfo-lldb codegen rustdocck
 
 $(foreach host,$(CFG_HOST), \
  $(eval $(foreach target,$(CFG_TARGET), \
@@ -934,7 +912,6 @@ TEST_GROUPS = \
 	cfail \
 	pfail \
 	bench \
-	perf \
 	rmake \
 	rustdocck \
 	debuginfo-gdb \