[vectorIntrinsics] RFR: 8244490: [vector] Move Vector API micro benchmarks under test/micro

Paul Sandoz psandoz at openjdk.java.net
Thu May 6 17:58:06 UTC 2021


On Mon, 3 May 2021 20:52:50 GMT, Marcus G K Williams <mgkwill at openjdk.org> wrote:

> Vector API micro benchmarks are currently located under test/jdk/jdk/incubator/vector/benchmark which makes them rather as "dead" code without possibility to built and run.
> 
> The proper location for micro benchmarks is actually test/micro/ directory.
> It would be nice to move Vector API benchmarks there so they can be built automatically as part 'test-image' make target.
> Once they are built they can be run as
>  make run-test TEST=micro:BENCHMARK_TEST_NAME

I looked more in detail, there are some immediate issues, and i think an architectural issue with the split.

The more immediate issues are:

1. Some benchmark tests fail to build via `make`. Some are related to bad ASCII characters in comments, some due to compiler warnings, and others due to external dependencies in the `pom.xml` (namely `org.junit.jupiter:junit-jupiter-api`). I think all those are fixable. (See https://openjdk.java.net/groups/build/doc/testing.html for configuring, compiling, and executing JMH tests.)
2. The structure under `test/micro` is misleading, and does not follow directory to package name convention. This is also fixable. I think we need to remove the maven project and merge in under `test/micro/org/openjdk/bench/jdk/incubator/vector`. We remove the maven project and place the non-generated benchmark files directly under the aforementioned directory (and fix the ones that fail to compile). Generated benchmarks could be placed under, say, `operation`.

Initially I thought it was fine that generation scripts were split between unit tests and performance tests, but architecturally, i now think it better to keep one set of bash scripts for generated code, maintained under the `vector` module. These are complex and splitting will cause divergence. These scripts can generate the `operation` performance tests under the `test/micro` directory at the appropriate location.

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

PR: https://git.openjdk.java.net/panama-vector/pull/77


More information about the panama-dev mailing list