Skip to content

Commit 761cb76

Browse files
committed
---
yaml --- r: 64361 b: refs/heads/snap-stage3 c: e4f7561 h: refs/heads/master i: 64359: b550918 v: v3
1 parent 960bfe0 commit 761cb76

File tree

247 files changed

+938
-1223
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

247 files changed

+938
-1223
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
refs/heads/master: 2d28d645422c1617be58c8ca7ad9a457264ca850
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
4-
refs/heads/snap-stage3: 8e58a272cc440ed90b15043125138e8f1aabba98
4+
refs/heads/snap-stage3: e4f7561bcdf3b54dafefd478b86e1f7610e74348
55
refs/heads/try: 7b78b52e602bb3ea8174f9b2006bff3315f03ef9
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b

branches/snap-stage3/configure

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -372,7 +372,6 @@ opt optimize 1 "build optimized rust code"
372372
opt optimize-cxx 1 "build optimized C++ code"
373373
opt optimize-llvm 1 "build optimized LLVM"
374374
opt debug 0 "build with extra debug fun"
375-
opt ratchet-bench 0 "ratchet benchmarks"
376375
opt fast-make 0 "use .gitmodules as timestamp for submodule deps"
377376
opt manage-submodules 1 "let the build manage the git submodules"
378377
opt mingw-cross 0 "cross-compile for win32 using mingw"

branches/snap-stage3/mk/tests.mk

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -60,21 +60,6 @@ endif
6060
TEST_LOG_FILE=tmp/check-stage$(1)-T-$(2)-H-$(3)-$(4).log
6161
TEST_OK_FILE=tmp/check-stage$(1)-T-$(2)-H-$(3)-$(4).ok
6262

63-
TEST_RATCHET_FILE=tmp/check-stage$(1)-T-$(2)-H-$(3)-$(4)-metrics.json
64-
TEST_RATCHET_NOISE_PERCENT=10.0
65-
66-
# Whether to ratchet or merely save benchmarks
67-
ifdef CFG_RATCHET_BENCH
68-
CRATE_TEST_BENCH_ARGS=\
69-
--test --bench \
70-
--ratchet-metrics $(call TEST_RATCHET_FILE,$(1),$(2),$(3),$(4)) \
71-
--ratchet-noise-percent $(TEST_RATCHET_NOISE_PERCENT)
72-
else
73-
CRATE_TEST_BENCH_ARGS=\
74-
--test --bench \
75-
--save-metrics $(call TEST_RATCHET_FILE,$(1),$(2),$(3),$(4))
76-
endif
77-
7863
define DEF_TARGET_COMMANDS
7964

8065
ifdef CFG_UNIXY_$(1)
@@ -374,14 +359,11 @@ $(foreach host,$(CFG_HOST_TRIPLES), \
374359
define DEF_TEST_CRATE_RULES
375360
check-stage$(1)-T-$(2)-H-$(3)-$(4)-exec: $$(call TEST_OK_FILE,$(1),$(2),$(3),$(4))
376361

377-
check-stage$(1)-T-$(2)-H-$(3)-$(4)-exec: $$(call TEST_OK_FILE,$(1),$(2),$(3),$(4))
378-
379362
$$(call TEST_OK_FILE,$(1),$(2),$(3),$(4)): \
380363
$(3)/stage$(1)/test/$(4)test-$(2)$$(X_$(2))
381364
@$$(call E, run: $$<)
382365
$$(Q)$$(call CFG_RUN_TEST_$(2),$$<,$(2),$(3)) $$(TESTARGS) \
383366
--logfile $$(call TEST_LOG_FILE,$(1),$(2),$(3),$(4)) \
384-
$$(call CRATE_TEST_BENCH_ARGS,$(1),$(2),$(3),$(4)) \
385367
&& touch $$@
386368
endef
387369

@@ -570,7 +552,6 @@ CTEST_ARGS$(1)-T-$(2)-H-$(3)-$(4) := \
570552
$$(CTEST_COMMON_ARGS$(1)-T-$(2)-H-$(3)) \
571553
--src-base $$(S)src/test/$$(CTEST_SRC_BASE_$(4))/ \
572554
--build-base $(3)/test/$$(CTEST_BUILD_BASE_$(4))/ \
573-
--ratchet-metrics $(call TEST_RATCHET_FILE,$(1),$(2),$(3),$(4)) \
574555
--mode $$(CTEST_MODE_$(4)) \
575556
$$(CTEST_RUNTOOL_$(4))
576557

branches/snap-stage3/src/compiletest/common.rs

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -58,15 +58,6 @@ pub struct config {
5858
// Write out a parseable log of tests that were run
5959
logfile: Option<Path>,
6060

61-
// Write out a json file containing any metrics of the run
62-
save_metrics: Option<Path>,
63-
64-
// Write and ratchet a metrics file
65-
ratchet_metrics: Option<Path>,
66-
67-
// Percent change in metrics to consider noise
68-
ratchet_noise_percent: Option<f64>,
69-
7061
// A command line to prefix program execution with,
7162
// for running under valgrind
7263
runtool: Option<~str>,

branches/snap-stage3/src/compiletest/compiletest.rs

Lines changed: 7 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@
1717
extern mod extra;
1818

1919
use std::os;
20-
use std::f64;
2120

2221
use extra::getopts;
2322
use extra::getopts::groups::{optopt, optflag, reqopt};
@@ -67,10 +66,6 @@ pub fn parse_config(args: ~[~str]) -> config {
6766
optopt("", "rustcflags", "flags to pass to rustc", "FLAGS"),
6867
optflag("", "verbose", "run tests verbosely, showing all output"),
6968
optopt("", "logfile", "file to log test execution to", "FILE"),
70-
optopt("", "save-metrics", "file to save metrics to", "FILE"),
71-
optopt("", "ratchet-metrics", "file to ratchet metrics against", "FILE"),
72-
optopt("", "ratchet-noise-percent",
73-
"percent change in metrics to consider noise", "N"),
7469
optflag("", "jit", "run tests under the JIT"),
7570
optflag("", "newrt", "run tests on the new runtime / scheduler"),
7671
optopt("", "target", "the target to build for", "TARGET"),
@@ -121,13 +116,6 @@ pub fn parse_config(args: ~[~str]) -> config {
121116
Some(copy matches.free[0])
122117
} else { None },
123118
logfile: getopts::opt_maybe_str(matches, "logfile").map(|s| Path(*s)),
124-
save_metrics: getopts::opt_maybe_str(matches, "save-metrics").map(|s| Path(*s)),
125-
ratchet_metrics:
126-
getopts::opt_maybe_str(matches, "ratchet-metrics").map(|s| Path(*s)),
127-
ratchet_noise_percent:
128-
getopts::opt_maybe_str(matches,
129-
"ratchet-noise-percent").map(|s|
130-
f64::from_str(*s).get()),
131119
runtool: getopts::opt_maybe_str(matches, "runtool"),
132120
rustcflags: getopts::opt_maybe_str(matches, "rustcflags"),
133121
jit: getopts::opt_present(matches, "jit"),
@@ -227,10 +215,10 @@ pub fn test_opts(config: &config) -> test::TestOpts {
227215
run_ignored: config.run_ignored,
228216
logfile: copy config.logfile,
229217
run_tests: true,
230-
run_benchmarks: true,
231-
ratchet_metrics: copy config.ratchet_metrics,
232-
ratchet_noise_percent: copy config.ratchet_noise_percent,
233-
save_metrics: copy config.save_metrics,
218+
run_benchmarks: false,
219+
ratchet_metrics: None,
220+
ratchet_noise_percent: None,
221+
save_metrics: None,
234222
}
235223
}
236224

@@ -243,13 +231,7 @@ pub fn make_tests(config: &config) -> ~[test::TestDescAndFn] {
243231
let file = copy *file;
244232
debug!("inspecting file %s", file.to_str());
245233
if is_test(config, file) {
246-
let t = do make_test(config, file) {
247-
match config.mode {
248-
mode_codegen => make_metrics_test_closure(config, file),
249-
_ => make_test_closure(config, file)
250-
}
251-
};
252-
tests.push(t)
234+
tests.push(make_test(config, file))
253235
}
254236
}
255237
tests
@@ -278,15 +260,14 @@ pub fn is_test(config: &config, testfile: &Path) -> bool {
278260
return valid;
279261
}
280262

281-
pub fn make_test(config: &config, testfile: &Path,
282-
f: &fn()->test::TestFn) -> test::TestDescAndFn {
263+
pub fn make_test(config: &config, testfile: &Path) -> test::TestDescAndFn {
283264
test::TestDescAndFn {
284265
desc: test::TestDesc {
285266
name: make_test_name(config, testfile),
286267
ignore: header::is_test_ignored(config, testfile),
287268
should_fail: false
288269
},
289-
testfn: f(),
270+
testfn: make_test_closure(config, testfile),
290271
}
291272
}
292273

@@ -310,10 +291,3 @@ pub fn make_test_closure(config: &config, testfile: &Path) -> test::TestFn {
310291
let testfile = Cell::new(testfile.to_str());
311292
test::DynTestFn(|| { runtest::run(config.take(), testfile.take()) })
312293
}
313-
314-
pub fn make_metrics_test_closure(config: &config, testfile: &Path) -> test::TestFn {
315-
use std::cell::Cell;
316-
let config = Cell::new(copy *config);
317-
let testfile = Cell::new(testfile.to_str());
318-
test::DynMetricFn(|mm| { runtest::run_metrics(config.take(), testfile.take(), mm) })
319-
}

branches/snap-stage3/src/compiletest/runtest.rs

Lines changed: 2 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -25,14 +25,7 @@ use std::os;
2525
use std::uint;
2626
use std::vec;
2727

28-
use extra::test::MetricMap;
29-
3028
pub fn run(config: config, testfile: ~str) {
31-
let mut _mm = MetricMap::new();
32-
run_metrics(config, testfile, &mut _mm);
33-
}
34-
35-
pub fn run_metrics(config: config, testfile: ~str, mm: &mut MetricMap) {
3629
if config.verbose {
3730
// We're going to be dumping a lot of info. Start on a new line.
3831
io::stdout().write_str("\n\n");
@@ -47,7 +40,7 @@ pub fn run_metrics(config: config, testfile: ~str, mm: &mut MetricMap) {
4740
mode_run_pass => run_rpass_test(&config, &props, &testfile),
4841
mode_pretty => run_pretty_test(&config, &props, &testfile),
4942
mode_debug_info => run_debuginfo_test(&config, &props, &testfile),
50-
mode_codegen => run_codegen_test(&config, &props, &testfile, mm)
43+
mode_codegen => run_codegen_test(&config, &props, &testfile)
5144
}
5245
}
5346

@@ -913,14 +906,7 @@ fn disassemble_extract(config: &config, _props: &TestProps,
913906
}
914907

915908

916-
fn count_extracted_lines(p: &Path) -> uint {
917-
let x = io::read_whole_file_str(&p.with_filetype("ll")).get();
918-
x.line_iter().len_()
919-
}
920-
921-
922-
fn run_codegen_test(config: &config, props: &TestProps,
923-
testfile: &Path, mm: &mut MetricMap) {
909+
fn run_codegen_test(config: &config, props: &TestProps, testfile: &Path) {
924910

925911
if config.llvm_bin_path.is_none() {
926912
fatal(~"missing --llvm-bin-path");
@@ -961,17 +947,7 @@ fn run_codegen_test(config: &config, props: &TestProps,
961947
fatal_ProcRes(~"disassembling extract failed", &ProcRes);
962948
}
963949

964-
let base = output_base_name(config, testfile);
965-
let base_extract = append_suffix_to_stem(&base, "extract");
966-
967-
let base_clang = append_suffix_to_stem(&base, "clang");
968-
let base_clang_extract = append_suffix_to_stem(&base_clang, "extract");
969950

970-
let base_lines = count_extracted_lines(&base_extract);
971-
let clang_lines = count_extracted_lines(&base_clang_extract);
972951

973-
mm.insert_metric("clang-codegen-ratio",
974-
(base_lines as f64) / (clang_lines as f64),
975-
0.001);
976952
}
977953

0 commit comments

Comments
 (0)