8146850: Remove TraceHandleAllocation rather than converting to UL
8149850: Remove HandleAllocationLimit and TotalHandleAllocationLimit when removing TraceHandleAllocation Removed TraceHandleAllocation, HandleAllocationLimit and TotalHandleAllocationLimit flags Reviewed-by: coleenp, dholmes
This commit is contained in:
parent
af21a0d3e3
commit
0d4da45ca7
@ -891,9 +891,6 @@ public:
|
||||
notproduct(bool, VerifyLastFrame, false, \
|
||||
"Verify oops on last frame on entry to VM") \
|
||||
\
|
||||
develop(bool, TraceHandleAllocation, false, \
|
||||
"Print out warnings when suspiciously many handles are allocated")\
|
||||
\
|
||||
product(bool, FailOverToOldVerifier, true, \
|
||||
"Fail over to old verifier when split verifier fails") \
|
||||
\
|
||||
@ -3024,14 +3021,6 @@ public:
|
||||
notproduct(ccstrlist, SuppressErrorAt, "", \
|
||||
"List of assertions (file:line) to muzzle") \
|
||||
\
|
||||
notproduct(size_t, HandleAllocationLimit, 1024, \
|
||||
"Threshold for HandleMark allocation when +TraceHandleAllocation "\
|
||||
"is used") \
|
||||
\
|
||||
develop(size_t, TotalHandleAllocationLimit, 1024, \
|
||||
"Threshold for total handle allocation when " \
|
||||
"+TraceHandleAllocation is used") \
|
||||
\
|
||||
develop(intx, StackPrintLimit, 100, \
|
||||
"number of stack frames to print in VM-level stack dump") \
|
||||
\
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -129,14 +129,6 @@ void HandleArea::oops_do(OopClosure* f) {
|
||||
k = k->next();
|
||||
}
|
||||
|
||||
// The thread local handle areas should not get very large
|
||||
if (TraceHandleAllocation && (size_t)handles_visited > TotalHandleAllocationLimit) {
|
||||
#ifdef ASSERT
|
||||
warning("%d: Visited in HandleMark : " SIZE_FORMAT, _nof_handlemarks, handles_visited);
|
||||
#else
|
||||
warning("Visited in HandleMark : " SIZE_FORMAT, handles_visited);
|
||||
#endif
|
||||
}
|
||||
if (_prev != NULL) _prev->oops_do(f);
|
||||
}
|
||||
|
||||
@ -165,31 +157,6 @@ HandleMark::~HandleMark() {
|
||||
assert(area->_handle_mark_nesting > 0, "must stack allocate HandleMarks" );
|
||||
debug_only(area->_handle_mark_nesting--);
|
||||
|
||||
// Debug code to trace the number of handles allocated per mark/
|
||||
#ifdef ASSERT
|
||||
if (TraceHandleAllocation) {
|
||||
size_t handles = 0;
|
||||
Chunk *c = _chunk->next();
|
||||
if (c == NULL) {
|
||||
handles = area->_hwm - _hwm; // no new chunk allocated
|
||||
} else {
|
||||
handles = _max - _hwm; // add rest in first chunk
|
||||
while(c != NULL) {
|
||||
handles += c->length();
|
||||
c = c->next();
|
||||
}
|
||||
handles -= area->_max - area->_hwm; // adjust for last trunk not full
|
||||
}
|
||||
handles /= sizeof(void *); // Adjust for size of a handle
|
||||
if (handles > HandleAllocationLimit) {
|
||||
// Note: _nof_handlemarks is only set in debug mode
|
||||
warning("%d: Allocated in HandleMark : " SIZE_FORMAT, _nof_handlemarks, handles);
|
||||
}
|
||||
|
||||
tty->print_cr("Handles " SIZE_FORMAT, handles);
|
||||
}
|
||||
#endif
|
||||
|
||||
// Delete later chunks
|
||||
if( _chunk->next() ) {
|
||||
// reset arena size before delete chunks. Otherwise, the total
|
||||
|
Loading…
Reference in New Issue
Block a user