RFR: JDK-8298908: Instrument Metaspace for ASan [v12]

Thomas Stuefe stuefe at openjdk.org
Mon Jan 16 10:11:12 UTC 2023


On Fri, 13 Jan 2023 05:50:10 GMT, Ioi Lam <iklam at openjdk.org> wrote:

>> To be enlarged chunk belongs to the class loader already, and we are inside the class loader metaspace lock.
>
> If there's no particular reason to do it outside of the lock, I would prefer to have the ASAN call while holding the lock. That way you don't need to worry about race conditions.
> 
> 
> MutexLocker fcl(Metaspace_lock, Mutex::_no_safepoint_check_flag);
> old_level = c->level();
> enlarged = c->vsnode()->attempt_enlarge_chunk(c, &_chunks);
> ASAN_UNPOISON_MEMORY_REGION(....);

Sure, why not. The reason would be reducing time inside the lock, but I'm unemotional. Probably does not matter much.

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

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


More information about the hotspot-runtime-dev mailing list