Skip to content

Commit 0c60fae

Browse files
chrisseatonansalond
authored andcommitted
New CE/EE version string
(cherry picked from commit af808ba)
1 parent 23ad425 commit 0c60fae

File tree

4 files changed

+27
-5
lines changed

4 files changed

+27
-5
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,8 @@ New features:
2525

2626
Changes:
2727

28+
* The version string now mentions `GraalVM CE` or `EE`.
29+
2830
* The inline JavaScript functionality `-Xinline_js` has been removed.
2931

3032
* Line numbers `< 0`, in the various eval methods, are now warned about, because

README.md

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -47,28 +47,31 @@ is that you can't use Java tools like VisualVM, you can't use Java
4747
interoperability, and *peak performance may be lower than on the JVM*. The
4848
native configuration is used by default, but you can also request it using
4949
`--native`. To use polyglot programming with the *native* configuration, you
50-
need to use the `--polyglot` flag.
50+
need to use the `--polyglot` flag. To check you are using the *native*
51+
configuration, `ruby --version` should mention `Native`.
5152

5253
TruffleRuby can also be used in the *JVM* configuration, where it runs as a
5354
normal Java application on the JVM, as any other Java application would. The
5455
advantage of the JVM configuration is that you can use Java interoperability,
5556
and *peak performance may be higher than the native configuration*. The
5657
disadvantage of the JVM configuration is that it takes much longer to start and
5758
to get fast, and may use more memory. The JVM configuration is requested using
58-
`--jvm`.
59+
`--jvm`. To check you are using the *JVM* configuration, `ruby --version` should
60+
not mention `Native`.
5961

6062
If you are running a short-running program you probably want the default,
6163
*native*, configuration. If you are running a long-running program and want the
6264
highest possible performance you probably want the *JVM* configuration, by using
6365
`--jvm`.
6466

6567
At runtime you can tell if you are using the native configuration using
66-
`TruffleRuby.native?`.
68+
`TruffleRuby.native?`
6769

6870
You won't encounter it when using TruffleRuby from the GraalVM, but there is
6971
also another configuration which is TruffleRuby running on the JVM but with the
7072
Graal compiler not available. This configuration will have much lower
71-
performance and should normally only be used for development.
73+
performance and should normally only be used for development. `ruby --version`
74+
will mention `Interpreter` for this configuration.
7275

7376
## System Compatibility
7477

doc/user/faq.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,9 +85,25 @@ chris.seaton@oracle.com.
8585

8686
### How do I know if I’m using a VM that has Graal?
8787

88+
`ruby --version` will report `GraalVM CE` or `EE`.
89+
8890
`TruffleRuby.graal?` will tell you if you are also running with the Graal
8991
dynamic compiler.
9092

93+
### How do I know that I'm using the Community Edition of GraalVM?
94+
95+
`ruby --version` will report `GraalVM CE`.
96+
97+
### How do I know that I'm using the Enterprise Edition of GraalVM?
98+
99+
`ruby --version` will report `GraalVM EE`.
100+
101+
### How do I know that I'm using the native version of TruffleRuby?
102+
103+
`ruby --version` will report `Native`.
104+
105+
`TruffleRuby.native?` will return `true`.
106+
91107
### How can I see that Truffle and Graal are working?
92108

93109
Put this program into `test.rb`:

doc/user/installing.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,8 @@ rebuild the Ruby executable images using the runtime from the Enterprise
6464
Edition. The version of the Ruby executable images you install by default uses
6565
the Community Edition runtime until you rebuild.
6666

67-
To get the best performance you want to rebuild the images.
67+
To get the best performance you want to rebuild the images. Check with `ruby
68+
--version` that it says you are running `EE` rather than `CE`.
6869

6970
Rebuilding the executable images can take a few minutes and you should have
7071
about 8 GB of RAM available.

0 commit comments

Comments
 (0)