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

Open
Open
Changes from all commits
Commits
File filter
Filter file types
Jump to
Jump to file
Failed to load files.

Always

Just for now

@@ -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;
}
}
@@ -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,
ProTip! Use n and p to navigate between commits in a pull request.