1 /* |
1 /* |
2 * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. |
2 * Copyright (c) 2005, 2012, Oracle and/or its affiliates. All rights reserved. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
4 * |
4 * |
5 * This code is free software; you can redistribute it and/or modify it |
5 * This code is free software; you can redistribute it and/or modify it |
6 * under the terms of the GNU General Public License version 2 only, as |
6 * under the terms of the GNU General Public License version 2 only, as |
7 * published by the Free Software Foundation. |
7 * published by the Free Software Foundation. |
82 // May not be called for the current thread, as in the case of |
82 // May not be called for the current thread, as in the case of |
83 // VM_GetOrSetLocal in jvmti. |
83 // VM_GetOrSetLocal in jvmti. |
84 void UnhandledOops::allow_unhandled_oop(oop* op) { |
84 void UnhandledOops::allow_unhandled_oop(oop* op) { |
85 assert (CheckUnhandledOops, "should only be called with checking option"); |
85 assert (CheckUnhandledOops, "should only be called with checking option"); |
86 |
86 |
87 int i = _oop_list->find_at_end(op, match_oop_entry); |
87 int i = _oop_list->find_from_end(op, match_oop_entry); |
88 assert(i!=-1, "safe for gc oop not in unhandled_oop_list"); |
88 assert(i!=-1, "safe for gc oop not in unhandled_oop_list"); |
89 |
89 |
90 UnhandledOopEntry entry = _oop_list->at(i); |
90 UnhandledOopEntry entry = _oop_list->at(i); |
91 assert(!entry._ok_for_gc, "duplicate entry"); |
91 assert(!entry._ok_for_gc, "duplicate entry"); |
92 entry._ok_for_gc = true; |
92 entry._ok_for_gc = true; |
104 if (unhandled_oop_print) { |
104 if (unhandled_oop_print) { |
105 for (int i=0; i<_level; i++) tty->print(" "); |
105 for (int i=0; i<_level; i++) tty->print(" "); |
106 tty->print_cr("u "INTPTR_FORMAT, op); |
106 tty->print_cr("u "INTPTR_FORMAT, op); |
107 } |
107 } |
108 |
108 |
109 int i = _oop_list->find_at_end(op, match_oop_entry); |
109 int i = _oop_list->find_from_end(op, match_oop_entry); |
110 assert(i!=-1, "oop not in unhandled_oop_list"); |
110 assert(i!=-1, "oop not in unhandled_oop_list"); |
111 _oop_list->remove_at(i); |
111 _oop_list->remove_at(i); |
112 } |
112 } |
113 |
113 |
114 void UnhandledOops::clear_unhandled_oops() { |
114 void UnhandledOops::clear_unhandled_oops() { |