RFR: 8335397: Improve reliability of TestRecursiveMonitorChurn.java [v2]
David Holmes
dholmes at openjdk.org
Wed Jul 3 07:14:19 UTC 2024
On Tue, 2 Jul 2024 19:18:47 GMT, Axel Boldt-Christmas <aboldtch at openjdk.org> wrote:
>> TestRecursiveMonitorChurn.java currently uses NMT to try and correlate the native memory increase with unwanted inflation.
>>
>> Change to instead query the JVM for exact number of inflations via the Whitebox API. This allow us to both be more exact and less dependent on interactions with NMT.
>
> Axel Boldt-Christmas has updated the pull request incrementally with one additional commit since the last revision:
>
> Update test/hotspot/jtreg/runtime/locking/TestRecursiveMonitorChurn.java
This seems much more reliable if we are testing the absence of excessive inflation.
One query below and one typo, but approved.
Thanks
src/hotspot/share/prims/whitebox.cpp line 1858:
> 1856:
> 1857: WB_ENTRY(jlong, WB_getInUseMonitorCount(JNIEnv* env, jobject wb))
> 1858: return (jlong) WhiteBox::get_in_use_monitor_count();
Why the indirection?
test/hotspot/jtreg/runtime/locking/TestRecursiveMonitorChurn.java line 72:
> 70: if (pre_monitor_count != post_monitor_count) {
> 71: final long monitor_count_change = post_monitor_count - pre_monitor_count;
> 72: System.out.println("Unexpected change in mointor count: " + monitor_count_change);
typo: mointor
-------------
Marked as reviewed by dholmes (Reviewer).
PR Review: https://git.openjdk.org/jdk/pull/19965#pullrequestreview-2155627165
PR Review Comment: https://git.openjdk.org/jdk/pull/19965#discussion_r1663630628
PR Review Comment: https://git.openjdk.org/jdk/pull/19965#discussion_r1663636766
More information about the hotspot-dev
mailing list