RFR: JDK-8302335: IGV: Bytecode not showing [v3]
Roberto Castañeda Lozano
rcastanedalo at openjdk.org
Thu Feb 16 13:14:29 UTC 2023
On Thu, 16 Feb 2023 13:06:57 GMT, Tobias Holenstein <tholenstein at openjdk.org> wrote:
>> Currently, IGV does not show the bytecode of a graph in the "Bytecode" window although the bytecode is present in the XML file.
>>
>> # Solution
>>
>> Following is the `<bytecodes>` block of the XML file
>>
>> <bytecodes>
>> <![CDATA[
>> 0 iconst_3
>> 1 istore_1
>> 2 bipush 9
>> 4 istore_2
>> 5 iload_2
>> 6 ifle 34
>> 0 bci: 6 BranchData taken(0) displacement(112) not taken(0)
>> 9 iconst_2
>> 10 istore_3
>> 11 iload_3
>> 12 iload_2
>> 13 if_icmpge 28
>> 32 bci: 13 BranchData taken(0) displacement(56) not taken(0)
>> 16 iload_1
>> 17 istore_1
>> 18 iconst_1
>> 19 iload_3
>> 20 irem
>> 21 istore_1
>> 22 iinc #3 1
>> 25 goto 11
>> 64 bci: 25 JumpData taken(0) displacement(-32)
>> 28 iinc #2 -1
>> 31 goto 5
>> 88 bci: 31 JumpData taken(0) displacement(-88)
>> 34 return
>> ]]>
>> </bytecodes>
>>
>> The problem was that during paring IGV skipped all lines that started with an empty space: This just skipped all bytecodes. We only want to skip bytecode like ` 0 bci: 6 BranchData taken(0) displacement(112) not taken(0)` . Meaning: whitespace - number - exactly two white spaces - and then arbitrary text.
>>
>> <img width="283" alt="bytecode" src="https://user-images.githubusercontent.com/71546117/218495199-2b02a79c-3065-404c-af57-3f8a603ac499.png">
>
> Tobias Holenstein has updated the pull request incrementally with one additional commit since the last revision:
>
> print IGV bytecode correctly even in the presents of bug JDK-8302656
Marked as reviewed by rcastanedalo (Reviewer).
-------------
PR: https://git.openjdk.org/jdk/pull/12537
More information about the hotspot-compiler-dev
mailing list