RFR: 8290705: StringConcat::validate_mem_flow asserts with "unexpected user: StoreI" [v2]

Tobias Hartmann thartmann at openjdk.org
Fri Jul 22 05:38:06 UTC 2022


On Thu, 21 Jul 2022 16:43:11 GMT, Vladimir Kozlov <kvn at openjdk.org> wrote:

>> Tobias Hartmann has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   Modified debug printing code
>
> src/hotspot/share/opto/stringopts.cpp line 1032:
> 
>> 1030:           if (PrintOptimizeStringConcat) {
>> 1031:             tty->print_cr("unexpected control use of Initialize");
>> 1032:             use->dump(2);
> 
> What output of `dump(2)` you got in your case? It could be more than needed if `use` has a lot of inputs.
> How about next to output only interesting info?:
> 
> ptr->in(0)->dump(); // Initialize node
> use->dump(1);
> tty->cr();

It prints:

considering toString call in  SideEffectBeforeConstructor::test @ bci:16
unexpected control use of Initialize
  49  ConI  === 0  [[ 50 ]]  #int:1
  48  LoadI  === _ 7 47  [[ 50 ]]  @java/lang/Class:exact+112 *, name=result, idx=11; #int !jvms: SideEffectBeforeConstructor::test @ bci:4
  46  ConL  === 0  [[ 47 ]]  #long:112
  45  ConP  === 0  [[ 47 47 ]]  #java/lang/Class:exact *  Oop:java/lang/Class:exact *
   3  Start  === 3 0  [[ 3 5 6 7 8 9 10 ]]  #{0:control, 1:abIO, 2:memory, 3:rawptr:BotPTR, 4:return_address, 5:java/lang/String:exact *}
  38  Initialize  === 30 1 41 1 1 37  [[ 39 40 ]]  !jvms: SideEffectBeforeConstructor::test @ bci:0
  50  AddI  === _ 48 49  [[ 52 ]]  !jvms: SideEffectBeforeConstructor::test @ bci:8
  47  AddP  === _ 45 45 46  [[ 48 52 ]]   Oop:java/lang/Class:exact+112 * !jvms: SideEffectBeforeConstructor::test @ bci:4
   7  Parm  === 3  [[ 52 48 41 41 24 25 72 41 41 41 ]] Memory  Memory: @BotPTR *+bot, idx=Bot; !jvms: SideEffectBeforeConstructor::test @ bci:-1
  39  Proj  === 38  [[ 53 42 52 ]] #0 !jvms: SideEffectBeforeConstructor::test @ bci:0
  52  StoreI  === 39 7 47 50  [[ 24 ]]  @java/lang/Class:exact+112 *, name=result, idx=11;  Memory: @java/lang/Class:exact+112 *, name=result, idx=11; !jvms: SideEffectBeforeConstructor::test @ bci:9

You are right, `dump(1)` is sufficient:


considering toString call in  SideEffectBeforeConstructor::test @ bci:16
unexpected control use of Initialize
  38  Initialize  === 30 1 41 1 1 37  [[ 39 40 ]]  !jvms: SideEffectBeforeConstructor::test @ bci:0
  50  AddI  === _ 48 49  [[ 52 ]]  !jvms: SideEffectBeforeConstructor::test @ bci:8
  47  AddP  === _ 45 45 46  [[ 48 52 ]]   Oop:java/lang/Class:exact+112 * !jvms: SideEffectBeforeConstructor::test @ bci:4
   7  Parm  === 3  [[ 52 48 41 41 24 25 72 41 41 41 ]] Memory  Memory: @BotPTR *+bot, idx=Bot; !jvms: SideEffectBeforeConstructor::test @ bci:-1
  39  Proj  === 38  [[ 53 42 52 ]] #0 !jvms: SideEffectBeforeConstructor::test @ bci:0
  52  StoreI  === 39 7 47 50  [[ 24 ]]  @java/lang/Class:exact+112 *, name=result, idx=11;  Memory: @java/lang/Class:exact+112 *, name=result, idx=11; !jvms: SideEffectBeforeConstructor::test @ bci:9
``` 
The `tty->cr();` is not needed because it's printed by this code just below:
https://github.com/openjdk/jdk/blob/3582fd9e93d9733c6fdf1f3848e0a093d44f6865/src/hotspot/share/opto/stringopts.cpp#L1075-L1077

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

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


More information about the hotspot-compiler-dev mailing list