Integrated: JDK-8302335: IGV: Bytecode not showing
Tobias Holenstein
tholenstein at openjdk.org
Fri Feb 17 14:47:20 UTC 2023
On Mon, 13 Feb 2023 15:09:11 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">
This pull request has now been integrated.
Changeset: 57c9bc39
Author: Tobias Holenstein <tholenstein at openjdk.org>
URL: https://git.openjdk.org/jdk/commit/57c9bc39cd50067bce34b8e3c32bf89dc6da3e60
Stats: 2 lines in 1 file changed: 1 ins; 0 del; 1 mod
8302335: IGV: Bytecode not showing
Reviewed-by: rcastanedalo, thartmann, xliu
-------------
PR: https://git.openjdk.org/jdk/pull/12537
More information about the hotspot-compiler-dev
mailing list