зеркало из https://github.com/github/ruby.git
YJIT: Add --yjit-disable to help and reorder it (#9230)
This commit is contained in:
Родитель
7f4b271a61
Коммит
b266890dab
|
@ -165,15 +165,17 @@ The machine code generated for a given method can be printed by adding `puts Rub
|
||||||
YJIT supports all command-line options supported by upstream CRuby, but also adds a few YJIT-specific options:
|
YJIT supports all command-line options supported by upstream CRuby, but also adds a few YJIT-specific options:
|
||||||
|
|
||||||
- `--yjit`: enable YJIT (disabled by default)
|
- `--yjit`: enable YJIT (disabled by default)
|
||||||
|
- `--yjit-exec-mem-size=N`: size of the executable memory block to allocate, in MiB (default 64 MiB)
|
||||||
- `--yjit-call-threshold=N`: number of calls after which YJIT begins to compile a function (default 30)
|
- `--yjit-call-threshold=N`: number of calls after which YJIT begins to compile a function (default 30)
|
||||||
- `--yjit-cold-threshold=N`: number of global calls after which an ISEQ is considered cold and not
|
- `--yjit-cold-threshold=N`: number of global calls after which an ISEQ is considered cold and not
|
||||||
compiled, lower values mean less code is compiled (default 200K)
|
compiled, lower values mean less code is compiled (default 200K)
|
||||||
- `--yjit-exec-mem-size=N`: size of the executable memory block to allocate, in MiB (default 64 MiB)
|
|
||||||
- `--yjit-code-gc`: enable code GC (disabled by default as of Ruby 3.3)
|
|
||||||
- `--yjit-stats`: print statistics after the execution of a program (incurs a run-time cost)
|
- `--yjit-stats`: print statistics after the execution of a program (incurs a run-time cost)
|
||||||
- `--yjit-stats=quiet`: gather statistics while running a program but don't print them. Stats are accessible through `RubyVM::YJIT.runtime_stats`. (incurs a run-time cost)
|
- `--yjit-stats=quiet`: gather statistics while running a program but don't print them. Stats are accessible through `RubyVM::YJIT.runtime_stats`. (incurs a run-time cost)
|
||||||
|
- `--yjit-disable`: disable YJIT despite other `--yjit*` flags for lazily enabling it with `RubyVM::YJIT.enable`
|
||||||
|
- `--yjit-code-gc`: enable code GC (disabled by default as of Ruby 3.3)
|
||||||
|
- `--yjit-perf`: enable frame pointers and profiling with the `perf` tool
|
||||||
- `--yjit-trace-exits`: produce a Marshal dump of backtraces from specific exits. Automatically enables `--yjit-stats`
|
- `--yjit-trace-exits`: produce a Marshal dump of backtraces from specific exits. Automatically enables `--yjit-stats`
|
||||||
- `--yjit-perf`: Enable frame pointers and profiling with the `perf` tool
|
- `--yjit-trace-exits-sample-rate=N`: trace exit locations only every Nth occurrence
|
||||||
|
|
||||||
Note that there is also an environment variable `RUBY_YJIT_ENABLE` which can be used to enable YJIT.
|
Note that there is also an environment variable `RUBY_YJIT_ENABLE` which can be used to enable YJIT.
|
||||||
This can be useful for some deployment scripts where specifying an extra command-line option to Ruby is not practical.
|
This can be useful for some deployment scripts where specifying an extra command-line option to Ruby is not practical.
|
||||||
|
|
|
@ -100,15 +100,16 @@ pub static mut OPTIONS: Options = Options {
|
||||||
};
|
};
|
||||||
|
|
||||||
/// YJIT option descriptions for `ruby --help`.
|
/// YJIT option descriptions for `ruby --help`.
|
||||||
static YJIT_OPTIONS: [(&str, &str); 8] = [
|
static YJIT_OPTIONS: [(&str, &str); 9] = [
|
||||||
("--yjit-stats", "Enable collecting YJIT statistics"),
|
("--yjit-exec-mem-size=num", "Size of executable memory block in MiB (default: 64)"),
|
||||||
("--yjit-trace-exits", "Record Ruby source location when exiting from generated code"),
|
("--yjit-call-threshold=num", "Number of calls to trigger JIT"),
|
||||||
("--yjit-trace-exits-sample-rate", "Trace exit locations only every Nth occurrence"),
|
("--yjit-cold-threshold=num", "Global calls after which ISEQs not compiled (default: 200K)"),
|
||||||
("--yjit-exec-mem-size=num", "Size of executable memory block in MiB (default: 64)"),
|
("--yjit-stats", "Enable collecting YJIT statistics"),
|
||||||
("--yjit-code-gc", "Run code GC when the code size reaches the limit"),
|
("--yjit-disable", "Disable YJIT for lazily enabling it with RubyVM::YJIT.enable"),
|
||||||
("--yjit-call-threshold=num", "Number of calls to trigger JIT"),
|
("--yjit-code-gc", "Run code GC when the code size reaches the limit"),
|
||||||
("--yjit-cold-threshold=num", "Global call after which ISEQs not compiled (default: 200K)"),
|
("--yjit-perf", "Enable frame pointers and perf profiling"),
|
||||||
("--yjit-perf", "Enable frame pointers and perf profiling"),
|
("--yjit-trace-exits", "Record Ruby source location when exiting from generated code"),
|
||||||
|
("--yjit-trace-exits-sample-rate=num", "Trace exit locations only every Nth occurrence"),
|
||||||
];
|
];
|
||||||
|
|
||||||
#[derive(Clone, PartialEq, Eq, Debug)]
|
#[derive(Clone, PartialEq, Eq, Debug)]
|
||||||
|
|
Загрузка…
Ссылка в новой задаче