Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

JDK-8261238: NMT should not limit baselining by size threshold #2428

Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 6 additions & 4 deletions src/hotspot/share/services/memBaseline.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -95,15 +95,15 @@ 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;
} else {
return false; // OOM
}
} else {
// malloc site does not meet threshold, ignore and continue
// Ignore empty sites.
return true;
}
}
Expand All @@ -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() {
Expand Down
3 changes: 0 additions & 3 deletions src/hotspot/share/services/memBaseline.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down