On Mon, 21 Feb 2022 10:55:42 GMT, Aleksey Shipilev <sh...@openjdk.org> wrote:

> There are few bugs in SetBreakpoint when it reaches for metaspace allocation, 
> notably [JDK-8214992](https://bugs.openjdk.java.net/browse/JDK-8214992) and 
> [JDK-8264149](https://bugs.openjdk.java.net/browse/JDK-8264149). This adds 
> the test that exercises the metaspace allocation paths.
> 
> Additional testing:
>  - [x] New test on Linux x86_64 fastdebug
>  - [x] New test on Linux x86_64 release
>  - [x] New test with 
> [JDK-8264149](https://bugs.openjdk.java.net/browse/JDK-8264149) reverted 
> fails on Linux x86_64 release

So you load a class 50 times in separate ClassLoaders, and each load triggers 
the ClassPrepare event, and each time that happens you set a breakpoint on each 
of the 1000 methods, meaning a total of 5000 breakpoints. Doing this will 
eventually trigger calling 
CollectorPolicy::satisfy_failed_metadata_allocation(). Previous to the 
[8264149](https://bugs.openjdk.java.net/browse/JDK-8264149) fix, this used to 
trigger an assert. Am I understanding this properly?

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

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

Reply via email to