RFR 8166929: [JVMCI] Expose decompile counts in MDO

Christian Thalinger cthalinger at twitter.com
Fri Sep 30 22:32:42 UTC 2016


> On Sep 30, 2016, at 6:07 AM, Tom Rodriguez <tom.rodriguez at oracle.com> wrote:
> 
> 
>> On Sep 29, 2016, at 7:16 PM, Vitaly Davidovich <vitalyd at gmail.com <mailto:vitalyd at gmail.com>> wrote:
>> 
>> Quick fly-by comment: HotSpotMethodData::toString should use %d for overflow recompiles count printing, like the other counters.
> 
> Thanks, that was a typo.  Fixed and updated in place.

+  COMPILER2_OR_JVMCI_PRESENT(nonstatic_field(MethodCounters, _interpreter_invocation_count,   int))                                  \
+  COMPILER2_OR_JVMCI_PRESENT(nonstatic_field(MethodCounters, _interpreter_throwout_count,     u2))                                   \
Isn’t that true always?

+    public int getDecompileCount() {
+        return UNSAFE.getInt(metaspaceMethodData + config.methodDataDecompiles);
+    }
+
+    public int getOverflowRecompileCount() {
+        return UNSAFE.getInt(metaspaceMethodData + config.methodDataOverflowRecompiles);
+    }
+
+    public int getOverflowTrapsCount() {
+        return UNSAFE.getInt(metaspaceMethodData + config.methodDataOverflowTraps);
+    }
This is high-level nitpicking:  the fields are plural but you named the methods singular except “OverflowTraps”.  Either plural everywhere or none.

> 
> tom
> 
>> 
>> Thanks
>> 
>> On Thursday, September 29, 2016, Tom Rodriguez <tom.rodriguez at oracle.com <mailto:tom.rodriguez at oracle.com>> wrote:
>> http://cr.openjdk.java.net/~never/8166929/webrev <http://cr.openjdk.java.net/~never/8166929/webrev>
>> https://bugs.openjdk.java.net/browse/JDK-8166929 <https://bugs.openjdk.java.net/browse/JDK-8166929>
>> 
>> This is a minor API addition to expose some of the top-level MDO decompile and recompile counts.  It’s necessary to detect recompilation pathologies.  Tested by printing MDOs from JVMCI.  I also fixed a few problems I discovered with the formatting of the MDO printed form.
>> 
>> tom
>> 
>> 
>> -- 
>> Sent from my phone
> 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.openjdk.java.net/pipermail/hotspot-compiler-dev/attachments/20160930/359c2079/attachment.html>


More information about the hotspot-compiler-dev mailing list