On Mon, 15 Feb 2021 18:21:53 GMT, Lutz Schmidt <[email protected]> wrote:

>> This is a request for help. Could someone with SA knowledge please check if 
>> my assumption is correct?
>> 
>> In hotspot code, the field Method::_compiled_invocation_count is annotated 
>> with a comment that it is used by SA. The field is also exposed via 
>> vmStructs.cpp to enable such use. I have scanned SA code in OpenJDK11 and 
>> OpenJDK head but found no evidence that this particular field is accessed. 
>> Is this finding/assumption correct? 
>> 
>> If so, I could just stop exposing the field, making my life easier. Thanks!
>
> Looks like I have completely messed up my pull request. Please disregard for 
> now. I'm trying to find a way how to clean up. Maybe I'll just start over.

OK, my pull request is back in a reviewable state. Here is what changed: 

1) Honouring review comments from @TobiHartmann and @veresov 
Trusting my own code research, I removed _compiled_invocation_count from 
vmStructs.cpp. Builds are ok and all tests we run in-house (including the jtreg 
suite) did not show any issue. The updated pull request has 
_compiled_invocation_count widened to 64-bit and all those *64 suffixes are 
removed. 

2) Dealing with counter updates in {v|i}table stubs
While waiting for a response from SA experts, I took the time and had a closer 
look at the last remaining 32-bit counter (_nof_megamorphic_calls). It turned 
out the required changes to code generation were trivial. So I took the 
opportunity and made it a 64-bit counter. Call stats look even nicer now!

In summary: All global invocation counters are 64-bit now. From those counters 
that register method-individual calls, only _compiled_invocation_count and 
_nof_megamorphic_calls were widened to 64-bit. The three remaining 
method-individual counters (invocation_count, interpreter_invocation_count. and 
backedge_count) remain untouched.

I appreciate your feedback!

Here is how stats look like now:

Invocations summary for 28214 methods:
         41055191904 (100%)  total
          4818528940 (11.7%) |- interpreted
         36236662964 (88.3%) |- compiled
          9065026571 (22.1%) |- special methods (interpreted and compiled)
           607128840 ( 1.5%)    |- synchronized
          2107652419 ( 5.1%)    |- final
          6347934023 (15.5%)    |- static
             1122857 ( 0.0%)    |- native
             1188432 ( 0.0%)    |- accessor

Calls from compiled code:
         27011733837 (100%)  total non-inlined
         14500960686 (53.7%) |- virtual calls
        124325246564 ( 857%) |  |- inlined
                   0 (   0%) |  |- optimized
          8890453008 (  61%) |  |- monomorphic
          5610507678 (  39%) |  |- megamorphic
          4529160753 (16.8%) |- interface calls
          8905052200 ( 197%) |  |- inlined
                   0 (   0%) |  |- optimized
          4529160753 ( 100%) |  |- monomorphic
                   0 (   0%) |  |- megamorphic
          7981612398 (29.5%) |- static/special calls
         73886243527 ( 926%) |  |- inlined

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

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

Reply via email to