On Wed, 3 Apr 2024 15:01:22 GMT, Stefan Karlsson <stef...@openjdk.org> wrote:

>> Vladimir Kozlov has updated the pull request incrementally with one 
>> additional commit since the last revision:
>> 
>>   Removed not_used state of nmethod
>
> src/hotspot/share/code/codeCache.cpp line 1009:
> 
>> 1007: int CodeCache::nmethod_count() {
>> 1008:   int count = 0;
>> 1009:   for (GrowableArrayIterator<CodeHeap*> heap = 
>> _nmethod_heaps->begin(); heap != _nmethod_heaps->end(); ++heap) {
> 
> Is there a reason why FOR_ALL_NMETHOD_HEAPS wasn't good fit here? I'm 
> wondering since the similar `CodeCache::blob_count()` still uses one of these 
> macros.

No,  `CodeCache::blob_count()` uses different macro `FOR_ALL_HEAPS(heap)` 
because it looks for all code blobs, not only nmethods.

`CodeCache::nmethod_count()` is the only place where `FOR_ALL_NMETHOD_HEAPS ` 
was used. So I decided to remove the macro.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/18554#discussion_r1550087255

Reply via email to