8261238: NMT should not limit baselining by size threshold

Reviewed-by: zgu, mdoerr
This commit is contained in:
Thomas Stuefe 2021-04-26 04:56:31 +00:00
parent 3bf4c904fb
commit 578a0b3c3d
2 changed files with 6 additions and 7 deletions
src/hotspot/share/services

@ -95,7 +95,7 @@ class MallocAllocationSiteWalker : public MallocSiteWalker {
}
bool do_malloc_site(const MallocSite* site) {
if (site->size() >= MemBaseline::SIZE_THRESHOLD) {
if (site->size() > 0) {
if (_malloc_sites.add(*site) != NULL) {
_count++;
return true;
@ -103,7 +103,7 @@ class MallocAllocationSiteWalker : public MallocSiteWalker {
return false; // OOM
}
} else {
// malloc site does not meet threshold, ignore and continue
// Ignore empty sites.
return true;
}
}
@ -125,15 +125,17 @@ class VirtualMemoryAllocationWalker : public VirtualMemoryWalker {
VirtualMemoryAllocationWalker() : _count(0) { }
bool do_allocation_site(const ReservedMemoryRegion* rgn) {
if (rgn->size() >= MemBaseline::SIZE_THRESHOLD) {
if (rgn->size() > 0) {
if (_virtual_memory_regions.add(*rgn) != NULL) {
_count ++;
return true;
} else {
return false;
}
} else {
// Ignore empty sites.
return true;
}
return true;
}
LinkedList<ReservedMemoryRegion>* virtual_memory_allocations() {

@ -43,9 +43,6 @@ typedef LinkedListIterator<ReservedMemoryRegion> VirtualMemoryAllocation
*/
class MemBaseline {
public:
enum BaselineThreshold {
SIZE_THRESHOLD = K // Only allocation size over this threshold will be baselined.
};
enum BaselineType {
Not_baselined,