Skip to content

Commit 9892568

Browse files
committed
Use --vm. instead of --jvm. or --native.
1 parent b296363 commit 9892568

File tree

20 files changed

+71
-91
lines changed

20 files changed

+71
-91
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ Changes:
1414
* `-Xoption=value` has been removed - use `--option=value` instead.
1515
* The `-X` option now works as in MRI.
1616
* `--help:debug` is now `--help:internal`.
17+
* `--jvm.` and `--native.` have been deprecated, use `--vm.` instead to pass VM options.
1718

1819
# 1.0 RC 13
1920

doc/contributor/pre-initialization.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,5 +41,5 @@ runtime execution.
4141
Debugging on the JVM can be achieved with:
4242

4343
```
44-
bin/truffleruby --jvm.Dpolyglot.engine.PreinitializeContexts=ruby --log.level=FINE -e 'p :hi'
44+
jt ruby --jvm --vm.Dpolyglot.engine.PreinitializeContexts=ruby --log.level=FINE -e 'p :hi'
4545
```

doc/contributor/workflow.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -120,10 +120,10 @@ $ jt ruby --native ...
120120

121121
## Options
122122

123-
Specify JVM options with `--jvm.option`.
123+
Specify JVM options with `--vm.option`.
124124

125125
```bash
126-
$ jt ruby --jvm.Xmx1G test.rb
126+
$ jt ruby --vm.Xmx1G test.rb
127127
```
128128

129129
TruffleRuby options are set with `--name=value`. For example
@@ -143,8 +143,8 @@ See the document on [build graal](building-graal.md), and then run `jt ruby`
143143
with the `--graal` option.
144144

145145
We have flags in `jt` to set some options, such as `--trace` for
146-
`--jvm.Dgraal.TraceTruffleCompilation=true` and `--igv` for
147-
`--jvm.Dgraal.Dump=Truffle`.
146+
`--vm.Dgraal.TraceTruffleCompilation=true` and `--igv` for
147+
`--vm.Dgraal.Dump=Truffle`.
148148

149149
## Testing with Graal
150150

doc/samples/can-we-fold-yet.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
# Copyright (c) 2015 Oracle and/or its affiliates. All rights reserved. This
22
# code is released under a tri EPL/GPL/LGPL license. You can use it,
33
# redistribute it and/or modify it under the terms of the:
4-
#
4+
#
55
# Eclipse Public License version 1.0, or
66
# GNU General Public License version 2, or
77
# GNU Lesser General Public License version 2.1.
88

9-
# Use --jvm.Dgraal.TruffleIterativePartialEscape=true
9+
# Use --vm.Dgraal.TruffleIterativePartialEscape=true
1010

1111
require 'readline'
1212

doc/user/faq.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -115,12 +115,12 @@ end
115115
```
116116

117117
As well as the instructions for running with GraalVM that are described in
118-
[Using GraalVM](using-graalvm.md), we'll also use the `--jvm.Dgraal.TraceTruffleCompilation=true`
118+
[Using GraalVM](using-graalvm.md), we'll also use the `--vm.Dgraal.TraceTruffleCompilation=true`
119119
to ask Truffle to tell us when it compiles something.
120120

121121
```
122-
$ ruby --jvm.Dgraal.TraceTruffleCompilation=true test.rb
123-
[truffle] opt done block in <main> test.rb:1 <opt> <split-3a9ffa1b> |ASTSize 8/ 8 |Time 103( 99+4 )ms |DirectCallNodes I 0/D 0 |GraalNodes 24/ 3 |CodeSize 69 |CodeAddress 0x11245cf50 |Source ../test.rb:1
122+
$ ruby --vm.Dgraal.TraceTruffleCompilation=true test.rb
123+
[truffle] opt done block in <main> test.rb:1 <opt> <split-3a9ffa1b> |ASTSize 8/ 8 |Time 103( 99+4 )ms |DirectCallNodes I 0/D 0 |GraalNodes 24/ 3 |CodeSize 69 |CodeAddress 0x11245cf50 |Source ../test.rb:1
124124
```
125125

126126
Here you can see that Truffle has decided to use Graal to compile the block of

doc/user/optcarrot.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,13 @@ You will need `SDL2` to be installed, then you can play Lan Master with the
1111
following command.
1212

1313
```
14-
$ path/to/graalvm/bin/ruby bin/optcarrot --sdl2 --audio=none examples/Lan_Master.nes
14+
$ path/to/graalvm/bin/ruby --jvm bin/optcarrot --sdl2 --audio=none examples/Lan_Master.nes
1515
```
1616

1717
On macOS, you might need an extra flag for the GUI to appear:
1818

1919
```
20-
$ path/to/graalvm/bin/ruby --jvm.XstartOnFirstThread bin/optcarrot --sdl2 --audio=none examples/Lan_Master.nes
20+
$ path/to/graalvm/bin/ruby --jvm --vm.XstartOnFirstThread bin/optcarrot --sdl2 --audio=none examples/Lan_Master.nes
2121
```
2222

2323
If you have a local checkout of TruffleRuby, you can also use the version of

doc/user/options.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ Additionally set `--help:expert` and `--help:internal` to see those categories o
6969
options. All options all experimental and subject to change at any time.
7070

7171
Options can also be set as JVM system properties, where they have a prefix
72-
`polyglot.ruby.`. For example `--jvm.Dpolyglot.ruby.cexts.remap=true`, or via
72+
`polyglot.ruby.`. For example `--vm.Dpolyglot.ruby.cexts.remap=true`, or via
7373
any other way of setting JVM system properties. Finally, options can be set as
7474
Graal-SDK polyglot API configuration options.
7575

@@ -85,13 +85,13 @@ options in the same way it stops processing of Ruby arguments.
8585

8686
## VM options
8787

88-
To set options in the underlying VM, use `--native.` in the native
89-
configuration, and `--jvm.` in the JVM configuration.
88+
To set options in the underlying VM, use `--vm.`, valid for both the native
89+
configuration and the JVM configuration.
9090

91-
For example `--native.Dsystem_property=value` or `--jvm.ea`.
91+
For example `--vm.Dsystem_property=value` or `--vm.ea`.
9292

9393
To set the classpath, use the `=` notation, rather than two separate arguments.
94-
For example `--jvm.cp=lib.jar` or `--jvm.classpath=lib.jar`.
94+
For example `--vm.cp=lib.jar` or `--vm.classpath=lib.jar`.
9595

9696
## Other binary switches
9797

doc/user/reporting-performance-problems.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -34,12 +34,12 @@ tool, like `benchmark-ips` described below, to run the benchmark, or the slower
3434
warmup time will mean that you don't see TruffleRuby's true performance in the
3535
benchmark. If you want to write simpler benchmarks that just run a while loop
3636
with a simple timer (which we would not recommend anyway), then use the default
37-
native mode so that startup and warmup time is shorter.
37+
native mode so that startup and warmup time is shorter.
3838

3939
## How to check for basic performance problems
4040

4141
If you are examining the performance of TruffleRuby, we would recommend that you
42-
always run with the `--jvm.Dgraal.TraceTruffleCompilation=true` flag. If you see
42+
always run with the `--vm.Dgraal.TraceTruffleCompilation=true` flag. If you see
4343
compilation failures or repeated compilation of the same methods, this is an
4444
indicator that something is not working as intended and you may need to examine
4545
why, or ask us to help you do so. If you don't run with this flag Truffle will
@@ -58,13 +58,13 @@ A benchmark could look like this:
5858
require 'benchmark/ips'
5959

6060
Benchmark.ips do |x|
61-
61+
6262
x.iterations = 3
63-
63+
6464
x.report("adding") do
6565
14 + 2
6666
end
67-
67+
6868
end
6969
```
7070

mx.truffleruby/mx_truffleruby_benchmark.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -587,7 +587,7 @@ def name(self):
587587
def runBenchmark(self, benchmark, bmSuiteArgs):
588588
arguments = ['ruby']
589589
if 'MX_NO_GRAAL' not in os.environ and not bmSuiteArgs:
590-
arguments.extend(['--graal', '--jvm.Dgraal.TruffleCompilationExceptionsAreFatal=true'])
590+
arguments.extend(['--graal', '--vm.Dgraal.TruffleCompilationExceptionsAreFatal=true'])
591591
arguments.extend(['bench/servers/' + benchmark + '.rb'])
592592

593593
server = BackgroundJT(arguments + bmSuiteArgs)

spec/tags/truffle/launcher_tags.txt

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,9 @@ slow:The launcher prints an error for an unknown option
55
slow:The launcher StringArray option appends multiple options
66
slow:The launcher StringArray option parses ,
77
slow:The launcher StringArray option parses , respecting escaping
8-
slow:The launcher takes options from system properties set on the command line using --jvm
9-
slow:The launcher takes options from system properties set on the command line using --native
10-
slow:The launcher '--jvm.classpath=' adds the jar
11-
slow:The launcher '--jvm.cp=' adds the jar
8+
slow:The launcher takes options from system properties set on the command line using --vm
9+
slow:The launcher '--vm.classpath=' adds the jar
10+
slow:The launcher '--vm.cp=' adds the jar
1211
slow:The launcher enables deterministic hashing if --hashing.deterministic is set
1312
slow:The launcher 'gem' in `RbConfig::CONFIG['bindir']` directory runs when symlinked
1413
slow:The launcher 'irb' in `RbConfig::CONFIG['bindir']` directory runs when symlinked

0 commit comments

Comments
 (0)