/*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*
*/
#include "precompiled.hpp"
#include "gc_interface/collectedHeap.hpp"
#include "memory/gcLocker.inline.hpp"
#include "memory/universe.hpp"
#include "oops/oop.inline.hpp"
#include "runtime/thread.hpp"
#include "runtime/unhandledOops.hpp"
#include "utilities/globalDefinitions.hpp"
#ifdef CHECK_UNHANDLED_OOPS
_level = 0;
}
UnhandledOops::~UnhandledOops() {
delete _oop_list;
}
}
}
// For debugging unhandled oop detector _in the debugger_
// You don't want to turn it on in compiled code here.
static bool unhandled_oop_print=0;
return;
_level ++;
if (unhandled_oop_print) {
}
}
}
// Mark unhandled oop as okay for GC - the containing struct has an oops_do and
// for some reason the oop has to be on the stack.
// May not be called for the current thread, as in the case of
// VM_GetOrSetLocal in jvmti.
entry._ok_for_gc = true;
}
// Called by the oop destructor to remove unhandled oop from the thread's
// oop list. All oops given are assumed to be on the list. If not,
// there's a bug in the unhandled oop detector.
_level --;
if (unhandled_oop_print) {
}
}
if (_thread->is_gc_locked_out()) {
return;
}
// If an entry is on the unhandled oop list but isn't on the stack
// anymore, it must not have gotten unregistered properly and it's a bug
// in the unhandled oop generator.
assert(false, "heap is corrupted by the unhandled oop detector");
}
// Set unhandled oops to a pattern that will crash distinctively
}
}
#endif // CHECK_UNHANDLED_OOPS