RFR: 8314452: Explicitly indicate inlining success/failure in PrintInlining [v6]

Jorn Vernee jvernee at openjdk.org
Fri Sep 8 12:27:28 UTC 2023


> This patch proposes to add a `+` or `-` to messages produced by `PrintInlining`, to indicate whether inlining succeeded or failed. This makes it easier to find inlining failures in an inlining trace, without having to rely on the message to figure out whether inlining succeeded or failed. Looking at inlining failures is often useful for diagnosing the results of benchmarks, but it can be hard to find inlining failures in lengthy traces.
> 
> A sample of what this looks like:
> 
> 
>                             +@ 0   java.lang.foreign.Arena::ofConfined (10 bytes)   inline (hot)
>                               +@ 0   java.lang.Thread::currentThread (0 bytes)   (intrinsic)
>                               +@ 3   jdk.internal.foreign.MemorySessionImpl::createConfined (9 bytes)   inline (hot)
>                                 +@ 5   jdk.internal.foreign.ConfinedSession::<init> (18 bytes)   inline (hot)
>                                   +@ 6   jdk.internal.foreign.ConfinedSession$ConfinedResourceList::<init> (5 bytes)   inline (hot)
>                                     +@ 1   jdk.internal.foreign.MemorySessionImpl$ResourceList::<init> (5 bytes)   inline (hot)
>                                       +@ 1   java.lang.Object::<init> (1 bytes)   inline (hot)
>                                   +@ 9   jdk.internal.foreign.MemorySessionImpl::<init> (20 bytes)   inline (hot)
>                                     +@ 1   java.lang.Object::<init> (1 bytes)   inline (hot)
>                               +@ 6   jdk.internal.foreign.MemorySessionImpl::asArena (9 bytes)   inline (hot)
>                                 +@ 5   jdk.internal.foreign.MemorySessionImpl$1::<init> (10 bytes)   inline (hot)
>                                   +@ 6   java.lang.Object::<init> (1 bytes)   inline (hot)
>                             -@ 8   java.lang.foreign.SegmentAllocator::allocate (24 bytes)   already compiled into a big method
> 
> 
> Using `grep`/`sls` to find inlining failures:
> 
> 
>> Get-Content inlining_trace.txt | sls '-@'
>                             -@ 8   java.lang.foreign.SegmentAllocator::allocate (24 bytes)   already compiled into a big method
>                             -@ 34   java.lang.foreign.SegmentAllocator::allocate (24 bytes)   already compiled into a big method
>                                         -@ 19   java.lang.invoke.MethodHandle::linkToNative(JJJL)D (0 bytes)   native call
>                                     -@ 95   java.lang.foreign.Arena::close (0 bytes)   virtual call
>                           ...

Jorn Vernee has updated the pull request incrementally with two additional commits since the last revision:

 - trim excess whitespace
 - rename variables and inlining_kind_of too

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

Changes:
  - all: https://git.openjdk.org/jdk/pull/15315/files
  - new: https://git.openjdk.org/jdk/pull/15315/files/855550a3..4fd183d5

Webrevs:
 - full: https://webrevs.openjdk.org/?repo=jdk&pr=15315&range=05
 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=15315&range=04-05

  Stats: 24 lines in 7 files changed: 0 ins; 1 del; 23 mod
  Patch: https://git.openjdk.org/jdk/pull/15315.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/15315/head:pull/15315

PR: https://git.openjdk.org/jdk/pull/15315


More information about the hotspot-compiler-dev mailing list