equal
deleted
inserted
replaced
1 /* |
1 /* |
2 * Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved. |
2 * Copyright (c) 1998, 2014, 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. |
631 |
631 |
632 if (TraceDerivedPointers) { |
632 if (TraceDerivedPointers) { |
633 tty->print_cr( |
633 tty->print_cr( |
634 "Add derived pointer@" INTPTR_FORMAT |
634 "Add derived pointer@" INTPTR_FORMAT |
635 " - Derived: " INTPTR_FORMAT |
635 " - Derived: " INTPTR_FORMAT |
636 " Base: " INTPTR_FORMAT " (@" INTPTR_FORMAT ") (Offset: %d)", |
636 " Base: " INTPTR_FORMAT " (@" INTPTR_FORMAT ") (Offset: " INTX_FORMAT ")", |
637 derived_loc, (address)*derived_loc, (address)*base_loc, base_loc, offset |
637 p2i(derived_loc), p2i((address)*derived_loc), p2i((address)*base_loc), p2i(base_loc), offset |
638 ); |
638 ); |
639 } |
639 } |
640 // Set derived oop location to point to base. |
640 // Set derived oop location to point to base. |
641 *derived_loc = (oop)base_loc; |
641 *derived_loc = (oop)base_loc; |
642 assert_lock_strong(DerivedPointerTableGC_lock); |
642 assert_lock_strong(DerivedPointerTableGC_lock); |
659 *derived_loc = (oop)(((address)base) + offset); |
659 *derived_loc = (oop)(((address)base) + offset); |
660 assert(value_of_loc(derived_loc) - value_of_loc(&base) == offset, "sanity check"); |
660 assert(value_of_loc(derived_loc) - value_of_loc(&base) == offset, "sanity check"); |
661 |
661 |
662 if (TraceDerivedPointers) { |
662 if (TraceDerivedPointers) { |
663 tty->print_cr("Updating derived pointer@" INTPTR_FORMAT |
663 tty->print_cr("Updating derived pointer@" INTPTR_FORMAT |
664 " - Derived: " INTPTR_FORMAT " Base: " INTPTR_FORMAT " (Offset: %d)", |
664 " - Derived: " INTPTR_FORMAT " Base: " INTPTR_FORMAT " (Offset: " INTX_FORMAT ")", |
665 derived_loc, (address)*derived_loc, (address)base, offset); |
665 p2i(derived_loc), p2i((address)*derived_loc), p2i((address)base), offset); |
666 } |
666 } |
667 |
667 |
668 // Delete entry |
668 // Delete entry |
669 delete entry; |
669 delete entry; |
670 _list->at_put(i, NULL); |
670 _list->at_put(i, NULL); |