RFR: JDK-8302335: IGV: Bytecode not showing [v2]

Tobias Holenstein tholenstein at openjdk.org
Wed Feb 15 15:38:31 UTC 2023


On Wed, 15 Feb 2023 09:49:08 GMT, Roberto Castañeda Lozano <rcastanedalo at openjdk.org> wrote:

> Good catch! The issue with the more liberal matching of bytecodes proposed in this PR is that bytecode attributes are now also matched and treated as bytecodes, see e.g. the second last line in this screenshot:
> 
> ![bytecodes](https://user-images.githubusercontent.com/8792647/218989785-79d53c60-7e34-4680-ba51-536b7eead232.png)
> 
> Somewhere between JDK 20 b17 and JDK 20 b25 (most likely with the integration of [JDK-8292699](https://bugs.openjdk.org/browse/JDK-8292699)), the indentation in bytecode dumps produced by `BytecodeTracer::print_method_codes()` changed. The change introduced indentation for the bytecodes but did not update the indentation of their attributes, which I guess was unintended. Here is an example:
> 
> Before:
> 
> ```
> 0 nofast_aload_0
> 1 invokevirtual 478 <java/lang/String.isLatin1()Z> 
>   0   bci: 1    VirtualCallData     count(5119) nonprofiled_count(0) entries(0)
> ```
> 
> After:
> 
> ```
>    0 nofast_aload_0
>    1 invokevirtual 478 <java/lang/String.isLatin1()Z> 
>   0   bci: 1    VirtualCallData     count(5119) nonprofiled_count(0) entries(0)
> ```
> 
> I am not sure about what is the best solution to this, but ideally we would want to support the old and current indentation, and probably also fix and support the proper indentation of bytecode attributes in `BytecodeTracer::print_method_codes()`.
> 
> A possible solution from IGV side is to rule out attribute lines, e.g. likes starting with a number then the `bci` keyword such as ` 56 bci: 4 BranchData taken(0) displacement(48)` or lines starting with non-digits such as ` not taken(5119)` And so on. Another possible solution is to actually parse these attributes and display them somehow (e.g. as bytecode sub-items), since they actually convey useful information. What do you think?

You are right. I changed it such that we now support the old and new format. Now we just skip lines with the `bci:` keyword.
Regarding parsing and displaying bci information - I think this should be done in a different RFE

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

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


More information about the hotspot-compiler-dev mailing list