--- old/src/share/vm/prims/jvmtiImpl.cpp 2013-10-15 17:35:36.567008436 +0200 +++ new/src/share/vm/prims/jvmtiImpl.cpp 2013-10-15 17:35:36.475008440 +0200 @@ -164,24 +164,6 @@ 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); @@ -221,36 +203,13 @@ // 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; +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) { @@ -355,14 +314,6 @@ } } -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 //