beehive-lab / TornadoVM

TornadoVM: A practical and efficient heterogeneous programming framework for managed languages
https://www.tornadovm.org
Apache License 2.0
1.18k stars 112 forks source link

[fix] fix --profiler flag in tornado-benchmarks.py script #279

Closed ShAlireza closed 10 months ago

ShAlireza commented 10 months ago

Description

The --profiler flag didn't work, since when enabled by the user, the flag was added to JVM options, however, it should be placed in front of the tornado command and not JVM options.

Hence, the options variable is updated to two separate variables: jvm_options and tornado_options, so every option will be placed in its right place.

Problem description

JVM didn't recognize the --enableProfiler flag and showed the following error:

tornado --jvm="-Xms24G -Xmx24G -server -Dtornado.recover.bailout=False  -Dtornado.benchmarks.skipserial=True  --enableProfiler silent "  -m tornado.benchmarks/uk.ac.manchester.tornado.benchmarks.BenchmarkRunner --p
arams="saxpy"
Unrecognized option: --enableProfiler
Error: Could not create the Java Virtual Machine.
Error: A fatal exception has occurred. Program will exit.

You can regenerate the error by running the following command:

tornado-benchmarks.py --skipSequential --profiler

Backend/s tested

Mark the backends affected by this PR.

OS tested

Mark the OS where this PR is tested.

Did you check on FPGAs?

If it is applicable, check your changes on FPGAs.

How to test the new patch?

You can run the tornado-benchmarks.py script just like the following example:

tornado-benchmarks.py --skipSequential --profiler console

And profiler output will be displayed on the console.


CLAassistant commented 10 months ago

CLA assistant check
All committers have signed the CLA.

jjfumero commented 10 months ago

Thank you for your contributions. LGTM.

The way to check now is as follows:

$ tornado-benchmarks.py --skipSequential --profiler silent

It seems we also need to update the documentation here:https://tornadovm.readthedocs.io/en/latest/benchmarking.html#how-to-run

We will do that.