RFR: 8273684: Unnecessary Stack usage

Andrey Turbanov github.com+741251+turbanoff at openjdk.java.net
Wed Sep 15 10:56:43 UTC 2021


On Tue, 14 Sep 2021 17:52:03 GMT, Chris Plummer <cjplummer at openjdk.org> wrote:

>> Usage of thread-safe collection Stack is unnecessary. It's recommended to use ArrayDequeue if a thread-safe implementation is not needed.
>
> src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/CommandProcessor.java line 988:
> 
>> 986:                 // Make sure the types are emitted in an order than can be read back in
>> 987:                 HashSet<String> emitted = new HashSet<>();
>> 988:                 ArrayDeque<Type> pending = new ArrayDeque<>();
> 
> Have you run the clhsdb vmstructsdump command to make sure the ordering hasn't changed?

Checked.
Ordering is the same.
![изображение](https://user-images.githubusercontent.com/741251/133420954-67404798-b56d-4d6f-98ee-c457622d58f4.png)

[with_fixes_java_vmstructsdump.txt](https://github.com/openjdk/jdk/files/7169440/with_fixes_java_vmstructsdump.txt)
[without_fixes_java_vmstructsdump.txt](https://github.com/openjdk/jdk/files/7169441/without_fixes_java_vmstructsdump.txt)

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

PR: https://git.openjdk.java.net/jdk/pull/5294



More information about the client-libs-dev mailing list