src/share/vm/prims/jvmtiImpl.cpp
Print this page
rev 5440 : 8025834: NPE in Parallel Scavenge with -XX:+CheckUnhandledOops
*** 162,189 ****
GrowableElement *new_e = e->clone();
_elements->append(new_e);
recache();
}
- // insert a copy of the element using lessthan()
- void GrowableCache::insert(GrowableElement* e) {
- GrowableElement *new_e = e->clone();
- _elements->append(new_e);
-
- int n = length()-2;
- for (int i=n; i>=0; i--) {
- GrowableElement *e1 = _elements->at(i);
- GrowableElement *e2 = _elements->at(i+1);
- if (e2->lessThan(e1)) {
- _elements->at_put(i+1, e1);
- _elements->at_put(i, e2);
- }
- }
-
- recache();
- }
-
// remove the element at index
void GrowableCache::remove (int index) {
GrowableElement *e = _elements->at(index);
assert(e != NULL, "e != NULL");
_elements->remove(e);
--- 162,171 ----
*** 219,258 ****
//
// class JvmtiBreakpoint
//
! JvmtiBreakpoint::JvmtiBreakpoint() {
! _method = NULL;
! _bci = 0;
! _class_loader = NULL;
! #ifdef CHECK_UNHANDLED_OOPS
! // This one is always allocated with new, but check it just in case.
! Thread *thread = Thread::current();
! if (thread->is_in_stack((address)&_method)) {
! thread->allow_unhandled_oop((oop*)&_method);
! }
! #endif // CHECK_UNHANDLED_OOPS
! }
!
! JvmtiBreakpoint::JvmtiBreakpoint(Method* m_method, jlocation location) {
! _method = m_method;
! _class_loader = _method->method_holder()->class_loader_data()->class_loader();
! assert(_method != NULL, "_method != NULL");
! _bci = (int) location;
! assert(_bci >= 0, "_bci >= 0");
! }
!
! void JvmtiBreakpoint::copy(JvmtiBreakpoint& bp) {
! _method = bp._method;
! _bci = bp._bci;
! _class_loader = bp._class_loader;
! }
!
! bool JvmtiBreakpoint::lessThan(JvmtiBreakpoint& bp) {
! Unimplemented();
! return false;
}
bool JvmtiBreakpoint::equals(JvmtiBreakpoint& bp) {
return _method == bp._method
&& _bci == bp._bci;
--- 201,217 ----
//
// class JvmtiBreakpoint
//
! JvmtiBreakpoint::JvmtiBreakpoint(Method* m_method, jlocation location) :
! _method(m_method),
! _bci((int) location),
! _class_loader(NULL),
! _class_loader_handle(_method->method_holder()->class_loader_data()->class_loader()) {
! assert(Thread::current()->is_in_stack((address) this),
! "Should only be allocated on stack");
}
bool JvmtiBreakpoint::equals(JvmtiBreakpoint& bp) {
return _method == bp._method
&& _bci == bp._bci;
*** 353,370 ****
default:
assert(false, "Unknown operation");
}
}
- void VM_ChangeBreakpoints::oops_do(OopClosure* f) {
- // The JvmtiBreakpoints in _breakpoints will be visited via
- // JvmtiExport::oops_do.
- if (_bp != NULL) {
- _bp->oops_do(f);
- }
- }
-
//
// class JvmtiBreakpoints
//
// a JVMTI internal collection of JvmtiBreakpoint
//
--- 312,321 ----