chore: 撤除 runner 与 bench 的 leak-check 死旗标及死参数

This commit is contained in:
2026-10-05 09:22:59 +00:00
parent ad5c0a747a
commit 88107f45c5
5 changed files with 31 additions and 47 deletions
Generated
+18 -18
View File
@@ -1095,7 +1095,7 @@ dependencies = [
[[package]]
name = "oxide_builtins"
version = "0.8.3"
version = "0.8.5"
dependencies = [
"chrono",
"fast-float",
@@ -1120,7 +1120,7 @@ dependencies = [
[[package]]
name = "oxide_bytecode"
version = "0.8.3"
version = "0.8.5"
dependencies = [
"num-bigint",
"oxide_log",
@@ -1128,7 +1128,7 @@ dependencies = [
[[package]]
name = "oxide_cfg"
version = "0.8.3"
version = "0.8.5"
dependencies = [
"oxide_bytecode",
"oxide_emit",
@@ -1139,7 +1139,7 @@ dependencies = [
[[package]]
name = "oxide_cli"
version = "0.8.3"
version = "0.8.5"
dependencies = [
"ansi_term",
"bumpalo",
@@ -1159,7 +1159,7 @@ dependencies = [
[[package]]
name = "oxide_code_cache"
version = "0.8.3"
version = "0.8.5"
dependencies = [
"lru",
"oxide_bytecode",
@@ -1168,7 +1168,7 @@ dependencies = [
[[package]]
name = "oxide_compiler"
version = "0.8.3"
version = "0.8.5"
dependencies = [
"oxide_bytecode",
"oxide_cfg",
@@ -1187,7 +1187,7 @@ dependencies = [
[[package]]
name = "oxide_dce"
version = "0.8.3"
version = "0.8.5"
dependencies = [
"oxide_bytecode",
"oxide_cfg",
@@ -1201,7 +1201,7 @@ dependencies = [
[[package]]
name = "oxide_emit"
version = "0.8.3"
version = "0.8.5"
dependencies = [
"num-bigint",
"oxc_allocator",
@@ -1216,7 +1216,7 @@ dependencies = [
[[package]]
name = "oxide_ir"
version = "0.8.3"
version = "0.8.5"
dependencies = [
"oxide_bytecode",
"oxide_log",
@@ -1225,7 +1225,7 @@ dependencies = [
[[package]]
name = "oxide_kernel"
version = "0.8.3"
version = "0.8.5"
dependencies = [
"bumpalo",
"dashmap",
@@ -1240,7 +1240,7 @@ dependencies = [
[[package]]
name = "oxide_liveness"
version = "0.8.3"
version = "0.8.5"
dependencies = [
"oxide_bytecode",
"oxide_cfg",
@@ -1252,7 +1252,7 @@ dependencies = [
[[package]]
name = "oxide_log"
version = "0.8.3"
version = "0.8.5"
dependencies = [
"tracing",
"tracing-appender",
@@ -1261,7 +1261,7 @@ dependencies = [
[[package]]
name = "oxide_parser"
version = "0.8.3"
version = "0.8.5"
dependencies = [
"oxc_allocator",
"oxc_ast",
@@ -1276,7 +1276,7 @@ dependencies = [
[[package]]
name = "oxide_regalloc"
version = "0.8.3"
version = "0.8.5"
dependencies = [
"oxide_bytecode",
"oxide_cfg",
@@ -1292,7 +1292,7 @@ dependencies = [
[[package]]
name = "oxide_runtime_api"
version = "0.8.3"
version = "0.8.5"
dependencies = [
"num-bigint",
"num-traits",
@@ -1304,7 +1304,7 @@ dependencies = [
[[package]]
name = "oxide_test262"
version = "0.8.3"
version = "0.8.5"
dependencies = [
"oxide_bytecode",
"oxide_compiler",
@@ -1321,7 +1321,7 @@ dependencies = [
[[package]]
name = "oxide_types"
version = "0.8.3"
version = "0.8.5"
dependencies = [
"bumpalo",
"hashbrown 0.14.5",
@@ -1333,7 +1333,7 @@ dependencies = [
[[package]]
name = "oxide_vm"
version = "0.8.3"
version = "0.8.5"
dependencies = [
"bumpalo",
"chrono",
+1 -1
View File
@@ -22,7 +22,7 @@ members = [
]
[workspace.package]
version = "0.8.4"
version = "0.8.5"
edition = "2021"
license = "MIT"
rust-version = "1.80"
-1
View File
@@ -31,7 +31,6 @@ pub struct BenchConfig {
pub warmup: u32,
pub iterations: u32,
pub update_baseline: bool,
pub leak_check_interval: usize,
/// 指令周期采样周期(2 的幂,0 关闭):开启时测量迭代每 period 条指令
/// 记一条样本,run 末按 flat_id 输出 top-K 直方图。
pub sample_period: u64,
-4
View File
@@ -85,8 +85,6 @@ enum Commands {
iterations: u32,
#[arg(long)]
update_baseline: bool,
#[arg(long, default_value = "1000")]
leak_check_interval: usize,
/// 指令周期采样周期(2 的幂,0 关闭,默认关闭)。开启时测量迭代每
/// period 条指令记一条样本,run 末按 flat_id 输出 top-K 直方图。
#[arg(long, default_value = "0")]
@@ -136,7 +134,6 @@ fn main() -> ExitCode {
warmup,
iterations,
update_baseline,
leak_check_interval,
sample,
sample_top,
}) => {
@@ -154,7 +151,6 @@ fn main() -> ExitCode {
warmup,
iterations,
update_baseline,
leak_check_interval,
sample_period: sample,
sample_top,
};
+12 -23
View File
@@ -1,5 +1,5 @@
//! test262 runner 运行配置:`RunConfig` 结构、CLI 解析(`parse`)与用法输出(`usage`)。
//! 9 字段与 3 关联函数放宽为 `pub(crate)`;`leak_check_interval` 缺省 1000,`usage` 全文即 `--help` 用户可见输出,逐字保留。
//! 7 字段与 3 关联函数放宽为 `pub(crate)`;`usage` 全文即 `--help` 用户可见输出,逐字保留。
use std::path::PathBuf;
@@ -10,8 +10,6 @@ pub(crate) struct RunConfig {
pub(crate) filter: Option<String>,
pub(crate) no_skip: bool,
pub(crate) supervise: bool,
pub(crate) leak_check: bool,
pub(crate) leak_check_interval: usize,
/// 关闭 liveness/精确 DCE/RegAlloc 链(开关对比:关优化链 vs 开优化链各跑一遍)。
pub(crate) no_regalloc: bool,
/// 逐测试打印 PASS/FAIL/SKIP(开关对比时对比两轮结果集合用)。
@@ -28,8 +26,6 @@ impl RunConfig {
filter: None,
no_skip: false,
supervise: false,
leak_check: false,
leak_check_interval: 1000,
no_regalloc: false,
verbose: false,
no_fail_list: false,
@@ -53,13 +49,8 @@ impl RunConfig {
"--no-regalloc" => config.no_regalloc = true,
"--verbose" => config.verbose = true,
"--supervise" => config.supervise = true,
"--leak-check" => config.leak_check = true,
"--no-fail-list" => config.no_fail_list = true,
"--help" | "-h" => return Err(Self::usage()),
_ if arg.starts_with("--leak-check-interval=") => {
config.leak_check_interval =
arg.strip_prefix("--leak-check-interval=").unwrap().parse().unwrap_or(1000);
}
_ if arg.starts_with("--") => return Err(format!("unknown option: {arg}\n\n{}", Self::usage())),
_ => positional.push(arg.clone()),
}
@@ -80,7 +71,7 @@ impl RunConfig {
/// 打印用法说明。
pub(crate) fn usage() -> String {
"usage: test262-runner [--no-skip] [--no-regalloc] [--verbose] [--supervise] [--leak-check] [--leak-check-interval=N] [--version] [test262-root] [path-filter]\n\
"usage: test262-runner [--no-skip] [--no-regalloc] [--verbose] [--supervise] [--version] [test262-root] [path-filter]\n\
\n\
--no-skip Run capability-excluded tests and count unsupported compile/runtime results as failures.\n\
--no-regalloc Disable the liveness/precise-DCE/RegAlloc compiler chain (vregs stay as physical numbers).\n\
@@ -90,8 +81,6 @@ impl RunConfig {
--supervise Run the suite as single-worker child-process windows with a hard per-test timeout and\n\
\x20 automatic resume past any hanging/crashing test. A hang or crash is reported by path.\n\
\x20 Combines with [path-filter]: the filter is applied per-test inside each child window.\n\
--leak-check Monitor session_object_ptrs, session_bytes, code_forge.len(), symbol_registry.len() every\n\
\x20 --leak-check-interval tests (default 1000). Flags sustained linear growth (R^2>0.9).\n\
\n\
env tunables (all optional):\n\
\x20 OXIDE_LOG per-subsystem log levels (default off)\n\
@@ -125,7 +114,7 @@ mod tests {
v
}
/// 七旗标 + 2 位置参数一次 parse:六裸旗各置位、interval 取字面值、
/// 五旗标 + 2 位置参数一次 parse:五裸旗各置位、
/// 位置参数落 root/filter,Ok 路径全断言。
#[test]
fn parse_all_flags_with_two_positionals() {
@@ -134,9 +123,7 @@ mod tests {
"--no-regalloc",
"--verbose",
"--supervise",
"--leak-check",
"--no-fail-list",
"--leak-check-interval=250",
"tests/test262",
"language",
]))
@@ -145,9 +132,7 @@ mod tests {
assert!(cfg.no_regalloc);
assert!(cfg.verbose);
assert!(cfg.supervise);
assert!(cfg.leak_check);
assert!(cfg.no_fail_list);
assert_eq!(cfg.leak_check_interval, 250);
assert_eq!(cfg.test262_root, Some(PathBuf::from("tests/test262")));
assert_eq!(cfg.filter.as_deref(), Some("language"));
}
@@ -174,12 +159,16 @@ mod tests {
assert!(!off.supervised(false));
}
/// interval 非数字回落缺省 1000;位置参数超过 2 个返回错误。
/// leak-check 旗标不在已知选项集内,落未知选项分支返回错误(回归钉);
/// 位置参数超过 2 个返回错误。
#[test]
fn parse_interval_fallback_and_positional_limit() {
let cfg =
RunConfig::parse(&args(&["--leak-check-interval=abc"])).expect("fallback interval parse should succeed");
assert_eq!(cfg.leak_check_interval, 1000);
fn parse_leak_check_flags_unknown_and_positional_limit() {
let err = RunConfig::parse(&args(&["--leak-check"])).expect_err("removed flag must be rejected");
assert!(err.contains("unknown option: --leak-check"));
let err = RunConfig::parse(&args(&["--leak-check-interval=abc"]))
.expect_err("removed interval flag must be rejected");
assert!(err.contains("unknown option: --leak-check-interval=abc"));
let err = RunConfig::parse(&args(&["a", "b", "c"])).expect_err("three positionals must error");
assert!(err.contains("too many positional arguments"));