[code-reflection] Integrated: Allow hat.java run to pass -DXXXX options when running

Gary Frost gfrost at openjdk.org
Wed Sep 17 12:35:13 UTC 2025


This allows us to pass HAT options and also other properties when running via `java -cp hat/job.jar run ....`

For example 

                      run ffi-opencl mandel
                      run ffi-opencl nbody 4096
                      run ffi-opencl -DHAT=SHOW_CODE  -DbufferTagging=true nbody 4096
                      run ffi-opencl -DHAT=SHOW_KERNEL_MODEL heal
                      run ffi-opencl -DHAT=MINIMIZE_BUFFERS life
 ```
 
Note that configs are initialized from env HAT or from HAT property.  This has always been the case, but has not been documented 
 
 So 
 ```
   run ffi-opencl -DHAT=SHOW_KERNEL_MODEL heal
 ```
 is equiv of 
 ```
  HAT=SHOW_KERNEL_MODEL  run ffi-opencl  heal
  ```

-------------

Commit messages:
 - Allow hat.java run to pass -DXXXX options when running

Changes: https://git.openjdk.org/babylon/pull/574/files
  Webrev: https://webrevs.openjdk.org/?repo=babylon&pr=574&range=00
  Stats: 26 lines in 1 file changed: 14 ins; 8 del; 4 mod
  Patch: https://git.openjdk.org/babylon/pull/574.diff
  Fetch: git fetch https://git.openjdk.org/babylon.git pull/574/head:pull/574

PR: https://git.openjdk.org/babylon/pull/574


More information about the babylon-dev mailing list