beehive-lab / TornadoVM

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

[fix] Fix profiler in silent mode #330

Closed jjfumero closed 6 months ago

jjfumero commented 6 months ago

Description

This PR fixes the profiler when it is enabled in SILENT mode from the TornadoExecutionPlan API.

Problem description

The issue is that the profiler was only checked from the command line argument, rather than both command line and API enabled.

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?

$ make
$ tornado-test -V uk.ac.manchester.tornado.unittests.profiler.TestProfiler#testProfilerOnAndOff 
WARNING: Using incubator modules: jdk.incubator.vector

Enable Profiler
Test: class uk.ac.manchester.tornado.unittests.profiler.TestProfiler#testProfilerOnAndOff
    Running test: testProfilerOnAndOff       ................  [PASS] 
Test ran: 1, Failed: 0, Unsupported: 0