RFR(S): 8250635: MethodArityHistogram should use Compile_lock in favour of fancy checks

Doerr, Martin martin.doerr at sap.com
Fri Aug 28 15:02:53 UTC 2020


Hi Lutz,

just for my understanding: What exactly are we protecting against by holding Compile_lock?
Is it for concurrent initialization or concurrent unloading?

Note that it's also possible to iterate only over alive nmethods:
NMethodIterator iter(NMethodIterator::only_alive);

Best regards,
Martin


> -----Original Message-----
> From: hotspot-compiler-dev <hotspot-compiler-dev-
> retn at openjdk.java.net> On Behalf Of Schmidt, Lutz
> Sent: Mittwoch, 26. August 2020 17:19
> To: hotspot-compiler-dev at openjdk.java.net
> Subject: [CAUTION] RFR(S): 8250635: MethodArityHistogram should use
> Compile_lock in favour of fancy checks
> 
> Dear all,
> 
> may I please request reviews for this small enhancement? Instead of calling a
> method doing complicated and fancy (hard to understand) checks, the
> iteration over all nmethods is now protected by holding the Compile_lock in
> addition to the CodeCache_lock.
> 
> Bug:    https://bugs.openjdk.java.net/browse/JDK-8250635
> Webrev: https://cr.openjdk.java.net/~lucy/webrevs/8250635.00/
> 
> Thank you!
> Lutz
> 



More information about the hotspot-compiler-dev mailing list