RFR: 8274982: Add a test for 8269574. [v2]

David Holmes dholmes at openjdk.java.net
Thu Dec 16 22:17:09 UTC 2021


On Thu, 16 Dec 2021 20:20:41 GMT, Evgeny Nikitin <enikitin at openjdk.org> wrote:

>> This PR contains a relatively simple test which verifies that JVMTI-agents are correctly informed about exceptions caught in C2-compiled code. The 8269574 introduces pre-allocated exceptions in some paths, so the test tries to produce a number of various exceptions and check that provided small JVMTI agent got notified about all of them.
>
> Evgeny Nikitin has updated the pull request with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought in by the merge/rebase. The pull request contains six additional commits since the last revision:
> 
>  - Get rid of while-breaks
>  - Add JIT requirements
>  - Remove explicit type specifiers for own class static calls
>  - Remove redundant build directive
>  - Merge branch 'master' into JDK-8274982/public
>  - 8274982: Add a test for 8269574.

A few more comments below.

Thanks,
David

test/hotspot/jtreg/compiler/jvmti/libTriggerBuiltinExceptions.cpp line 37:

> 35:                   jmethodID catch_method, jlocation catch_location) {
> 36:     exceptions_caught += 1;
> 37: }

IIUC this will count all exceptions occurring in any thread and in relation to any method. There are behind-the-scenes exceptions that can occur which may cause this to count exceptions not related to the test. I think you need to only count those thrown in the method of interest, for reliability.

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

PR: https://git.openjdk.java.net/jdk/pull/5889


More information about the serviceability-dev mailing list