RFR: 8317266: Move nmethod::check_all_dependencies to codeCache.cpp and mark it NOT_PRODUCT

Vladimir Kozlov kvn at openjdk.org
Thu Oct 12 01:09:21 UTC 2023


On Wed, 11 Oct 2023 14:12:52 GMT, Evgeny Astigeevich <eastigeevich at openjdk.org> wrote:

> `nmethod::check_all_dependencies` goes over live nmethods and checks if any of nmethod's dependencies have been invalidated. It is public static and does not use any private/protected members of nmethod. There are no other uses of `nmethod::check_all_dependencies` but in `CodeCache::mark_for_deoptimization` of codeCache.cpp. The use is in NOT_PRODUCT code. The function has not-product code which disables logging dependencies. In a release build, the code will not be available and there will be significant performance impact. See https://bugs.openjdk.org/browse/JDK-7194669 for details.
> 
> As the function is only used in debug builds, depends on not-product code, does not use any specifics of nmethods and has only one use, it is reasonable to move it to codeCache.cpp and to make it a standalone static function guarded by `#ifndef PRODUCT`
> 
> Tested with fastdebug and release builds:
> - [x] gtest
> - [x] tier1

Agree.

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

Marked as reviewed by kvn (Reviewer).

PR Review: https://git.openjdk.org/jdk/pull/16152#pullrequestreview-1672810780


More information about the hotspot-compiler-dev mailing list