Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

I think, this command is correct. "time java -XX:+UnlockExperimentalVMOptions -XX:+UseJVMCICompiler TopTen large.txt" #6

Open
Revolution2021 opened this issue Jan 21, 2022 · 1 comment

Comments

@Revolution2021
Copy link

Revolution2021 commented Jan 21, 2022

Sorry, one more question.
In the article(https://medium.com/graalvm/graalvm-ten-things-12d9111f307d ), the following is written.

>To run without the GraalVM JIT compiler to compare, I can use the flag -XX:-UseJVMCICompiler. JVMCI is the interface between GraalVM and the JVM. You could also compare against your standard JVM as well.

However, in my environment, it doesn't work.

root@taro123:/opt/graalvm-ce-java11-21.3.0/graalvm-ten-things# time java -XX:-UseJVMCICompiler TopTen large.txt
Error: VM option 'UseJVMCICompiler' is experimental and must be enabled via -XX:+UnlockExperimentalVMOptions.
Error: The unlock option must precede 'UseJVMCICompiler'.
Error: Could not create the Java Virtual Machine.
Error: A fatal exception has occurred. Program will exit.

real    0m0.008s
user    0m0.001s
sys     0m0.007s

I think, the below is correct.
** time java -XX:+UnlockExperimentalVMOptions -XX:+UseJVMCICompiler TopTen large.txt **

The below is the successful result for your reference.
Is that just a mistake or caused by my environment , GraalVM(CE) + Ubuntu20?

root@taro123:/opt/graalvm-ce-java11-21.3.0/graalvm-ten-things# time java -XX:+UnlockExperimentalVMOptions -XX:+UseJVMCICompiler TopTen large.txt
sed = 502500
ut = 392500
in = 377500
et = 352500
id = 317500
eu = 317500
eget = 302500
vel = 300000
a = 287500
sit = 282500

real    0m26.024s
user    0m37.151s
sys     0m1.121s

Regards,

@wirthi
Copy link
Member

wirthi commented Jan 21, 2022

Hi,

can this be the same $PATH problem as in your other ticket? What does java --version print? I guess you are using a stock JDK here instead of GraalVM (despite being inside the GraalVM folder).

While you are in the graalvm-ce-java11-21.3.0 folder, if your $PATH is not set up properly (containing /opt/graalvm-ce-java11-21.3.0/bin before all other java locations) then probably another (non-GraalVM) java is use. Stock JDK does support the UseJVMCICompiler option, but requires the UnlockExperimentalVMOptions flag in addition.

Christian

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants