[foreign-memaccess+abi] RFR: 8277657: OptimizedEntryBlob should extend RuntimeBlob directly

Jorn Vernee jvernee at openjdk.java.net
Thu Nov 25 14:50:47 UTC 2021


On Thu, 25 Nov 2021 14:42:25 GMT, Jorn Vernee <jvernee at openjdk.org> wrote:

> This small refactoring makes OptimizedEntryBlob extend RuntimeBlob instead of BufferBlob.
> 
> The motivation for doing this is that we don't want to inherit behavior from BufferBlob by accident which is not appropriate for OptimizedEntryBlob, which has happened in the past.
> 
> This patch also reverts an earlier fix by Nick which made BufferBlob sub classes pass their header size through the BufferBlob constructor to RuntimeBlob's constructor, since this is no longer needed with this patch.

src/hotspot/share/code/codeBlob.cpp line 172:

> 170:   // Track memory usage statistic after releasing CodeCache_lock
> 171:   MemoryService::track_code_cache_memory_usage();
> 172: }

Note that this is just the implementation of BufferBlob::free. Now both BufferBlob::free and OptimizedEntryBlob::free delegate to this function.

src/hotspot/share/code/codeBlob.cpp line 776:

> 774: 
> 775: void OptimizedEntryBlob::preserve_callee_argument_oops(frame fr, const RegisterMap* reg_map, OopClosure* f) {
> 776:   // do nothing for now

Will implement this in a followup, for review simplicity.

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

PR: https://git.openjdk.java.net/panama-foreign/pull/617


More information about the panama-dev mailing list