< prev index next >

src/hotspot/share/runtime/unhandledOops.cpp

Print this page
rev 58071 : imported patch v1

@@ -1,7 +1,7 @@
 /*
- * Copyright (c) 2005, 2019, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 2020, 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
  * under the terms of the GNU General Public License version 2 only, as
  * published by the Free Software Foundation.

@@ -56,11 +56,11 @@
 // For debugging unhandled oop detector _in the debugger_
 // You don't want to turn it on in compiled code here.
 static Thread* unhandled_oop_print = NULL;
 
 void UnhandledOops::register_unhandled_oop(oop* op, address pc) {
-  if (!_thread->is_in_stack((address)op))
+  if (!_thread->is_in_live_stack((address)op))
     return;
 
   _level++;
   if (unhandled_oop_print == _thread) {
     for (int i=0; i < _level; i++) tty->print(" ");

@@ -94,11 +94,11 @@
 
 // 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.
 void UnhandledOops::unregister_unhandled_oop(oop* op) {
-  if (!_thread->is_in_stack((address)op)) return;
+  if (!_thread->is_in_live_stack((address)op)) return;
 
   if (unhandled_oop_print == _thread) {
     for (int i=0; i < _level; i++) tty->print(" ");
     tty->print_cr("u " INTPTR_FORMAT, p2i(op));
   }

@@ -115,11 +115,11 @@
   for (int k = 0; k < _oop_list->length(); k++) {
     UnhandledOopEntry entry = _oop_list->at(k);
     // 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.
-    if(!_thread->is_in_stack((address)entry._oop_ptr)) {
+    if(!_thread->is_in_live_stack((address)entry._oop_ptr)) {
       tty->print_cr("oop_ptr is " INTPTR_FORMAT, p2i(entry._oop_ptr));
       tty->print_cr("thread is " INTPTR_FORMAT " from pc " INTPTR_FORMAT,
                      p2i(_thread), p2i(entry._pc));
       assert(false, "heap is corrupted by the unhandled oop detector");
     }
< prev index next >