[foreign-memaccess+abi] RFR: Prevent maxAlign virtual calls for polluted accesses [v2]
Paul Sandoz
psandoz at openjdk.org
Tue Aug 16 19:30:38 UTC 2022
On Tue, 16 Aug 2022 19:23:29 GMT, Radoslaw Smogura <duke at openjdk.org> wrote:
>> Expanding the profiling to for method names starting with "loadFrom" and "storeInto" seems reasonable, given the most other access methods are also profiled (although not all the read-modify-write methods are).
>>
>> I think we should separate out the comparison of method names thereby we don't inadvertently profile other methods just in case new methods get added. Plus we can add some comments to the class doc of `Unsafe` and `ScopedMemoryAccess` to indicate such methods are profiled. Ideally I would prefer an HotSpot-specific annotation indicated that all arguments of an annotated method should be profiled.
>>
>> The profiling of all arguments is a blunter hammer that necessary in this case but so be it.
>
> Adding annotation for this could be useful for profiling other methods too. I'll try to find some time and prepare some draft.
>
> One thing I see that adding such annotation could consume one bit here (still there will be 5 spare):
> https://github.com/openjdk/jdk/blob/master/src/hotspot/share/oops/method.hpp#L98
Ok. I think it may be better to propose the more focused fix to JDK 20, and then use that PR as the opportunity to ask the question to the HotSpot devs whether they think an annotation would be useful before diving in.
-------------
PR: https://git.openjdk.org/panama-foreign/pull/700
More information about the panama-dev
mailing list