On Mon, 10 Feb 2025 02:47:58 GMT, Chris Plummer <cjplum...@openjdk.org> wrote:

>> Vladimir Kozlov has updated the pull request incrementally with one 
>> additional commit since the last revision:
>> 
>>   Fix Zero and Minimal VM builds
>
> src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/code/CodeCache.java line 
> 38:
> 
>> 36: public class CodeCache {
>> 37:   private static GrowableArray<CodeHeap> heapArray;
>> 38:   private static VirtualConstructor virtualConstructor;
> 
> What is the reason for switching from the virtualConstructor/hashMap approach 
> to using getClassFor()? The hashmap is the model for JavaThread, MetaData, 
> and CollectedHeap subtypes.

I think I found the answer. Since there is no longer a vtable, 
TypeDataBase.addressTypeIsEqualToType() will no longer work for Codeblobs. I 
was wondering if the lack of a vtable might have some negative impact. Glad to 
see you found a solution. I hope the lack of a vtable does not creep in 
elsewhere. I know it will have some negative impact on things like the "findpc" 
functionality, which will no longer be able to tell the user that an address 
points to a Codeblob instance. There's no test for this, but users might run 
across it.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/23533#discussion_r1948352958

Reply via email to