RFR: 8295023: Interpreter(AArch64): Implement -XX:+PrintBytecodeHistogram and -XX:+PrintBytecodePairHistogram options [v2]

Andrew Haley aph at openjdk.org
Wed Oct 12 08:11:07 UTC 2022


On Wed, 12 Oct 2022 02:01:29 GMT, Hao Sun <haosun at openjdk.org> wrote:

>> src/hotspot/cpu/aarch64/templateInterpreterGenerator_aarch64.cpp line 1981:
>> 
>>> 1979: 
>>> 1980: void TemplateInterpreterGenerator::count_bytecode() {
>>> 1981:   Register rscratch3 = r10;
>> 
>> Please pass the scratch register to use as an argument to `TemplateInterpreterGenerator::generate_trace_code`
>
> Thanks for your review. But I'm afraid I didn't fully understand it.
> 
> Why `generate_trace_code` is involved? I guess you mean `count_bytecode()`?
> But `count_bytecode()` is invoked [here](https://github.com/openjdk/jdk/blob/master/src/hotspot/share/interpreter/templateInterpreterGenerator.cpp#L362), and I don't think it's a proper site to pass arch-specific register `r10` to the general `count_bytecode()`.
> 
> Please correct me if I misunderstood. Thanks.

Ah, I see what you mean.
OK, just delete the name `rscratch3` and pass `r10` to `atomic_addw`. That simplifies the code to good effect.

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

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


More information about the hotspot-dev mailing list