RFR: 8314452: Explicitly indicate inlining success/failure in PrintInlining [v2]
Vladimir Kozlov
kvn at openjdk.org
Tue Sep 5 16:22:40 UTC 2023
On Mon, 4 Sep 2023 09:06:16 GMT, Jorn Vernee <jvernee at openjdk.org> wrote:
>> 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::cl...
>
> Jorn Vernee has updated the pull request incrementally with one additional commit since the last revision:
>
> switch to 'failed to inline' message
I like new output. But it affects few tests - see failures in testing in GitHubtesting:
stderr: [openjdk version "22-internal" 2024-03-19
OpenJDK Runtime Environment (fastdebug build 22-internal-JornVernee-391ca8fd366b4cc9ba90fa92eaf25f72144b0fba)
OpenJDK 64-Bit Server VM (fastdebug build 22-internal-JornVernee-391ca8fd366b4cc9ba90fa92eaf25f72144b0fba, mixed mode, sharing)
]
exitValue = 0
java.lang.RuntimeException: 'TestNull::testArg .* inline' found in stdout: 'TestNull::testArg (8 bytes) failed to inline'
at jdk.test.lib.process.OutputAnalyzer.shouldNotMatch(OutputAnalyzer.java:396)
at compiler.c2.unloaded.TestInlineUnloaded.lambda$main$0(TestInlineUnloaded.java:213)
at compiler.c2.unloaded.TestInlineUnloaded.run(TestInlineUnloaded.java:204)
-------------
PR Comment: https://git.openjdk.org/jdk/pull/15315#issuecomment-1706943192
More information about the hotspot-compiler-dev
mailing list