[ 
https://issues.apache.org/jira/browse/GROOVY-12191?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18099121#comment-18099121
 ] 

ASF GitHub Bot commented on GROOVY-12191:
-----------------------------------------

codecov-commenter commented on PR #2736:
URL: https://github.com/apache/groovy/pull/2736#issuecomment-5078736287

   ## 
[Codecov](https://app.codecov.io/gh/apache/groovy/pull/2736?dropdown=coverage&src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)
 Report
   :x: Patch coverage is `80.65327%` with `77 lines` in your changes missing 
coverage. Please review.
   :white_check_mark: Project coverage is 69.4009%. Comparing base 
([`c513a3a`](https://app.codecov.io/gh/apache/groovy/commit/c513a3ade4e64d4b10531af3697be0fd1fdc5587?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache))
 to head 
([`793abf8`](https://app.codecov.io/gh/apache/groovy/commit/793abf88981fc6ae3f8025d44ef8a5b521026a39?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)).
   :warning: Report is 1 commits behind head on master.
   
   | [Files with missing 
lines](https://app.codecov.io/gh/apache/groovy/pull/2736?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)
 | Patch % | Lines |
   |---|---|---|
   | 
[...codehaus/groovy/vmplugin/v8/CacheableCallSite.java](https://app.codecov.io/gh/apache/groovy/pull/2736?src=pr&el=tree&filepath=src%2Fmain%2Fjava%2Forg%2Fcodehaus%2Fgroovy%2Fvmplugin%2Fv8%2FCacheableCallSite.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-c3JjL21haW4vamF2YS9vcmcvY29kZWhhdXMvZ3Jvb3Z5L3ZtcGx1Z2luL3Y4L0NhY2hlYWJsZUNhbGxTaXRlLmphdmE=)
 | 78.9474% | [10 Missing and 14 partials :warning: 
](https://app.codecov.io/gh/apache/groovy/pull/2736?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)
 |
   | 
[...org/codehaus/groovy/vmplugin/v8/IndyInterface.java](https://app.codecov.io/gh/apache/groovy/pull/2736?src=pr&el=tree&filepath=src%2Fmain%2Fjava%2Forg%2Fcodehaus%2Fgroovy%2Fvmplugin%2Fv8%2FIndyInterface.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-c3JjL21haW4vamF2YS9vcmcvY29kZWhhdXMvZ3Jvb3Z5L3ZtcGx1Z2luL3Y4L0luZHlJbnRlcmZhY2UuamF2YQ==)
 | 62.9630% | [8 Missing and 12 partials :warning: 
](https://app.codecov.io/gh/apache/groovy/pull/2736?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)
 |
   | 
[...he/groovy/runtime/indy/SwitchPointInvalidator.java](https://app.codecov.io/gh/apache/groovy/pull/2736?src=pr&el=tree&filepath=src%2Fmain%2Fjava%2Forg%2Fapache%2Fgroovy%2Fruntime%2Findy%2FSwitchPointInvalidator.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-c3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2dyb292eS9ydW50aW1lL2luZHkvU3dpdGNoUG9pbnRJbnZhbGlkYXRvci5qYXZh)
 | 78.3333% | [7 Missing and 6 partials :warning: 
](https://app.codecov.io/gh/apache/groovy/pull/2736?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)
 |
   | 
[...g/apache/groovy/runtime/indy/IndyInvalidation.java](https://app.codecov.io/gh/apache/groovy/pull/2736?src=pr&el=tree&filepath=src%2Fmain%2Fjava%2Forg%2Fapache%2Fgroovy%2Fruntime%2Findy%2FIndyInvalidation.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-c3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2dyb292eS9ydW50aW1lL2luZHkvSW5keUludmFsaWRhdGlvbi5qYXZh)
 | 85.5263% | [6 Missing and 5 partials :warning: 
](https://app.codecov.io/gh/apache/groovy/pull/2736?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)
 |
   | 
[...vmplugin/v8/ColdReflectiveMethodHandleWrapper.java](https://app.codecov.io/gh/apache/groovy/pull/2736?src=pr&el=tree&filepath=src%2Fmain%2Fjava%2Forg%2Fcodehaus%2Fgroovy%2Fvmplugin%2Fv8%2FColdReflectiveMethodHandleWrapper.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-c3JjL21haW4vamF2YS9vcmcvY29kZWhhdXMvZ3Jvb3Z5L3ZtcGx1Z2luL3Y4L0NvbGRSZWZsZWN0aXZlTWV0aG9kSGFuZGxlV3JhcHBlci5qYXZh)
 | 70.5882% | [1 Missing and 4 partials :warning: 
](https://app.codecov.io/gh/apache/groovy/pull/2736?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)
 |
   | 
[...java/org/codehaus/groovy/reflection/ClassInfo.java](https://app.codecov.io/gh/apache/groovy/pull/2736?src=pr&el=tree&filepath=src%2Fmain%2Fjava%2Forg%2Fcodehaus%2Fgroovy%2Freflection%2FClassInfo.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-c3JjL21haW4vamF2YS9vcmcvY29kZWhhdXMvZ3Jvb3Z5L3JlZmxlY3Rpb24vQ2xhc3NJbmZvLmphdmE=)
 | 88.0000% | [1 Missing and 2 partials :warning: 
](https://app.codecov.io/gh/apache/groovy/pull/2736?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)
 |
   | 
[...java/org/codehaus/groovy/vmplugin/v8/Selector.java](https://app.codecov.io/gh/apache/groovy/pull/2736?src=pr&el=tree&filepath=src%2Fmain%2Fjava%2Forg%2Fcodehaus%2Fgroovy%2Fvmplugin%2Fv8%2FSelector.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-c3JjL21haW4vamF2YS9vcmcvY29kZWhhdXMvZ3Jvb3Z5L3ZtcGx1Z2luL3Y4L1NlbGVjdG9yLmphdmE=)
 | 66.6667% | [0 Missing and 1 partial :warning: 
](https://app.codecov.io/gh/apache/groovy/pull/2736?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)
 |
   
   <details><summary>Additional details and impacted files</summary>
   
   
   
   [![Impacted file tree 
graph](https://app.codecov.io/gh/apache/groovy/pull/2736/graphs/tree.svg?width=650&height=150&src=pr&token=1r45138NfQ&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)](https://app.codecov.io/gh/apache/groovy/pull/2736?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)
   
   ```diff
   @@                Coverage Diff                 @@
   ##               master      #2736        +/-   ##
   ==================================================
   + Coverage     69.3657%   69.4009%   +0.0352%     
   - Complexity      35082      35216       +134     
   ==================================================
     Files            1553       1556         +3     
     Lines          131490     131847       +357     
     Branches        24045      24105        +60     
   ==================================================
   + Hits            91209      91503       +294     
   - Misses          32045      32070        +25     
   - Partials         8236       8274        +38     
   ```
   
   | [Files with missing 
lines](https://app.codecov.io/gh/apache/groovy/pull/2736?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)
 | Coverage Δ | |
   |---|---|---|
   | 
[...rg/apache/groovy/runtime/indy/CallSiteTracker.java](https://app.codecov.io/gh/apache/groovy/pull/2736?src=pr&el=tree&filepath=src%2Fmain%2Fjava%2Forg%2Fapache%2Fgroovy%2Fruntime%2Findy%2FCallSiteTracker.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-c3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2dyb292eS9ydW50aW1lL2luZHkvQ2FsbFNpdGVUcmFja2VyLmphdmE=)
 | `100.0000% <100.0000%> (ø)` | |
   | 
[...odehaus/groovy/vmplugin/v8/IndyCompoundAssign.java](https://app.codecov.io/gh/apache/groovy/pull/2736?src=pr&el=tree&filepath=src%2Fmain%2Fjava%2Forg%2Fcodehaus%2Fgroovy%2Fvmplugin%2Fv8%2FIndyCompoundAssign.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-c3JjL21haW4vamF2YS9vcmcvY29kZWhhdXMvZ3Jvb3Z5L3ZtcGx1Z2luL3Y4L0luZHlDb21wb3VuZEFzc2lnbi5qYXZh)
 | `84.0909% <100.0000%> (ø)` | |
   | 
[...java/org/codehaus/groovy/vmplugin/v8/IndyMath.java](https://app.codecov.io/gh/apache/groovy/pull/2736?src=pr&el=tree&filepath=src%2Fmain%2Fjava%2Forg%2Fcodehaus%2Fgroovy%2Fvmplugin%2Fv8%2FIndyMath.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-c3JjL21haW4vamF2YS9vcmcvY29kZWhhdXMvZ3Jvb3Z5L3ZtcGx1Z2luL3Y4L0luZHlNYXRoLmphdmE=)
 | `82.5000% <100.0000%> (+3.2921%)` | :arrow_up: |
   | 
[...java/org/codehaus/groovy/vmplugin/v8/Selector.java](https://app.codecov.io/gh/apache/groovy/pull/2736?src=pr&el=tree&filepath=src%2Fmain%2Fjava%2Forg%2Fcodehaus%2Fgroovy%2Fvmplugin%2Fv8%2FSelector.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-c3JjL21haW4vamF2YS9vcmcvY29kZWhhdXMvZ3Jvb3Z5L3ZtcGx1Z2luL3Y4L1NlbGVjdG9yLmphdmE=)
 | `80.4538% <66.6667%> (ø)` | |
   | 
[...java/org/codehaus/groovy/reflection/ClassInfo.java](https://app.codecov.io/gh/apache/groovy/pull/2736?src=pr&el=tree&filepath=src%2Fmain%2Fjava%2Forg%2Fcodehaus%2Fgroovy%2Freflection%2FClassInfo.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-c3JjL21haW4vamF2YS9vcmcvY29kZWhhdXMvZ3Jvb3Z5L3JlZmxlY3Rpb24vQ2xhc3NJbmZvLmphdmE=)
 | `91.1330% <88.0000%> (+0.4226%)` | :arrow_up: |
   | 
[...vmplugin/v8/ColdReflectiveMethodHandleWrapper.java](https://app.codecov.io/gh/apache/groovy/pull/2736?src=pr&el=tree&filepath=src%2Fmain%2Fjava%2Forg%2Fcodehaus%2Fgroovy%2Fvmplugin%2Fv8%2FColdReflectiveMethodHandleWrapper.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-c3JjL21haW4vamF2YS9vcmcvY29kZWhhdXMvZ3Jvb3Z5L3ZtcGx1Z2luL3Y4L0NvbGRSZWZsZWN0aXZlTWV0aG9kSGFuZGxlV3JhcHBlci5qYXZh)
 | `85.9375% <70.5882%> (-7.9400%)` | :arrow_down: |
   | 
[...g/apache/groovy/runtime/indy/IndyInvalidation.java](https://app.codecov.io/gh/apache/groovy/pull/2736?src=pr&el=tree&filepath=src%2Fmain%2Fjava%2Forg%2Fapache%2Fgroovy%2Fruntime%2Findy%2FIndyInvalidation.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-c3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2dyb292eS9ydW50aW1lL2luZHkvSW5keUludmFsaWRhdGlvbi5qYXZh)
 | `85.5263% <85.5263%> (ø)` | |
   | 
[...he/groovy/runtime/indy/SwitchPointInvalidator.java](https://app.codecov.io/gh/apache/groovy/pull/2736?src=pr&el=tree&filepath=src%2Fmain%2Fjava%2Forg%2Fapache%2Fgroovy%2Fruntime%2Findy%2FSwitchPointInvalidator.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-c3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2dyb292eS9ydW50aW1lL2luZHkvU3dpdGNoUG9pbnRJbnZhbGlkYXRvci5qYXZh)
 | `78.3333% <78.3333%> (ø)` | |
   | 
[...org/codehaus/groovy/vmplugin/v8/IndyInterface.java](https://app.codecov.io/gh/apache/groovy/pull/2736?src=pr&el=tree&filepath=src%2Fmain%2Fjava%2Forg%2Fcodehaus%2Fgroovy%2Fvmplugin%2Fv8%2FIndyInterface.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-c3JjL21haW4vamF2YS9vcmcvY29kZWhhdXMvZ3Jvb3Z5L3ZtcGx1Z2luL3Y4L0luZHlJbnRlcmZhY2UuamF2YQ==)
 | `81.9512% <62.9630%> (-5.4773%)` | :arrow_down: |
   | 
[...codehaus/groovy/vmplugin/v8/CacheableCallSite.java](https://app.codecov.io/gh/apache/groovy/pull/2736?src=pr&el=tree&filepath=src%2Fmain%2Fjava%2Forg%2Fcodehaus%2Fgroovy%2Fvmplugin%2Fv8%2FCacheableCallSite.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-c3JjL21haW4vamF2YS9vcmcvY29kZWhhdXMvZ3Jvb3Z5L3ZtcGx1Z2luL3Y4L0NhY2hlYWJsZUNhbGxTaXRlLmphdmE=)
 | `77.1739% <78.9474%> (+2.8882%)` | :arrow_up: |
   
   ... and [7 files with indirect coverage 
changes](https://app.codecov.io/gh/apache/groovy/pull/2736/indirect-changes?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)
   </details>
   <details><summary> :rocket: New features to boost your workflow: </summary>
   
   - :snowflake: [Test 
Analytics](https://docs.codecov.com/docs/test-analytics): Detect flaky tests, 
report on failures, and find test suite problems.
   - :package: [JS Bundle 
Analysis](https://docs.codecov.com/docs/javascript-bundle-analysis): Save 
yourself from yourself by tracking and limiting bundle sizes in JS merges.
   </details>




> Scope indy SwitchPoint invalidation and harden PIC/math paths
> -------------------------------------------------------------
>
>                 Key: GROOVY-12191
>                 URL: https://issues.apache.org/jira/browse/GROOVY-12191
>             Project: Groovy
>          Issue Type: Improvement
>            Reporter: Daniel Sun
>            Priority: Major
>
> h3. Problem this targets
> With invokedynamic enabled (default since Groovy 4), a *single process-wide* 
> {{SwitchPoint}} guarded essentially all linked MOP call sites. Any MetaClass 
> registry change or category enter/leave invalidated that switch point, so 
> *all* sites fell back and re-linked — including sites whose receiver type was 
> unrelated.
> That global invalidation shows up as:
>  * Startup / request paths with ExpandoMetaClass / mixins (Grails-like 
> patterns) pay repeated re-link cost
>  * Category {{use}} thrashing deoptimizes the whole application
>  * JMH benches under {{subprojects/performance}} document this cost pattern
> h3. What changes proposed
> Four complementary layers under the indy / MOP runtime:
> ||#||Area||Behaviour||
> |1|Scoped SwitchPoint invalidation|Per-{{{}ClassInfo{}}} domain + hierarchy 
> fan-out to loaded subtypes; separate *category-global* domain for 
> {{{}use(Category){}}}. MetaClass change for class {{A}} no longer invalidates 
> sites for unrelated class {{B}}|
> |2|PIC polymorphism policy|{{CallSiteTracker}} counts distinct receiver 
> shapes; at {{max.poly}} the site becomes sticky *megamorphic* (pin default 
> boot target, no monomorphic {{setTarget}} thrash). Selection stays amortized 
> via the PIC|
> |3|Bimorphic promote|Two stable receiver shapes can share one nested 
> {{guardWithTest}} target instead of alternating monomorphic targets|
> |4|IndyMath completeness|BigDecimal-category ops (and mixed integral+BD) via 
> {{{}NumberMath{}}}; {{div}} / {{{}intdiv{}}}; primitive 
> {{rightShiftUnsigned}} table entries. Shift ops stay off the 
> GeneratedMetaMethod→IndyMath fast path so mixed {{{}int{}}}/{{{}long{}}} 
> keeps left-operand result typing|
> h3. Invalidation model (after the changes)
> ||Domain||Invalidated when||Guards||
> |Per-class (+ subtypes)|{{ClassInfo.incVersion}} / MetaClass registry change 
> for that type|Receiver class (or {{Class}} for static sites); hierarchy 
> fan-out invalidates subtype SwitchPoints|
> |Category-global|Category enter/leave 
> ({{{}VMPlugin.invalidateCallSites{}}})|Always dual-guarded with the class 
> domain; *never* fails over (correctness)|
> Per-class SwitchPoint can fail over after repeated retirements (default 100) 
> to a {{ClassInfo.version}} equality guard (avoids permanent-invalid SP 
> recursion). Concurrent failover drains any raced-in SwitchPoint so none 
> remains valid after the domain has failed over. Category domain stays 
> unlimited.
> Generation bump on MetaClass *replacement* / clear retires that class's 
> SwitchPoint; first MetaClass install only bumps version (no linked sites 
> yet). Hierarchy fan-out remains on {{incVersion}} and registry listeners.
> h3. Tunables (system properties)
> ||Property||Default||Meaning||
> |{{groovy.indy.switchpoint.max.failures}}|{{100}}|Live SP retirements before 
> per-class failover (value less than or equal to 0 = unlimited)|
> |{{groovy.indy.invalidation.stats}}|{{false}}|Log invalidation counters|
> |{{groovy.indy.callsite.max.poly}}|{{8}}|Distinct shapes to sticky 
> megamorphic (value less than or equal to 0 disables)|
> |{{groovy.indy.callsite.mega.sticky}}|{{true}}|Mega flag survives shape clear|
> |{{groovy.indy.callsite.bimorphic}}|{{true}}|Allow dual-shape target promote|
> |{{groovy.indy.callsite.cache.size}}|{{8}}|PIC LRU size|



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to