--- old/src/share/vm/oops/cpCache.cpp Mon Feb 4 12:54:41 2013 +++ new/src/share/vm/oops/cpCache.cpp Mon Feb 4 12:54:41 2013 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2013, 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 @@ -402,7 +402,7 @@ // RedefineClasses() API support: -// If this constantPoolCacheEntry refers to old_method then update it +// If this ConstantPoolCacheEntry refers to old_method then update it // to refer to new_method. bool ConstantPoolCacheEntry::adjust_method_entry(Method* old_method, Method* new_method, bool * trace_name_printed) { @@ -460,16 +460,24 @@ return false; } -#ifndef PRODUCT -bool ConstantPoolCacheEntry::check_no_old_entries() { +// a constant pool cache entry should never contain old or obsolete methods +bool ConstantPoolCacheEntry::check_no_old_or_obsolete_entries() { if (is_vfinal()) { + // virtual and final so _f2 contains method ptr instead of vtable index Metadata* f2 = (Metadata*)_f2; - return (f2->is_valid() && f2->is_method() && !((Method*)f2)->is_old()); - } else { - return (_f1 == NULL || (_f1->is_valid() && _f1->is_method() && !((Method*)_f1)->is_old())); + // Return false if _f2 refers to an old or an obsolete method. + // _f2 == NULL || !_f2->is_method() are just as unexpected here. + return (f2 != NULL NOT_PRODUCT(&& f2->is_valid()) && f2->is_method() && + !((Method*)f2)->is_old() && !((Method*)f2)->is_obsolete()); + } else if (_f1 == NULL || + (NOT_PRODUCT(_f1->is_valid() &&) !_f1->is_method())) { + // _f1 == NULL || !_f1->is_method() are OK here + return true; } + // return false if _f1 refers to an old or an obsolete method + return (NOT_PRODUCT(_f1->is_valid() &&) _f1->is_method() && + !((Method*)_f1)->is_old() && !((Method*)_f1)->is_obsolete()); } -#endif bool ConstantPoolCacheEntry::is_interesting_method_entry(Klass* k) { if (!is_method_entry()) { @@ -508,7 +516,8 @@ if (index == 0) st->print_cr(" -------------"); // print entry st->print("%3d ("PTR_FORMAT") ", index, (intptr_t)this); - st->print_cr("[%02x|%02x|%5d]", bytecode_2(), bytecode_1(), constant_pool_index()); + st->print_cr("[%02x|%02x|%5d]", bytecode_2(), bytecode_1(), + constant_pool_index()); st->print_cr(" [ "PTR_FORMAT"]", (intptr_t)_f1); st->print_cr(" [ "PTR_FORMAT"]", (intptr_t)_f2); st->print_cr(" [ "PTR_FORMAT"]", (intptr_t)_flags); @@ -553,7 +562,7 @@ } // RedefineClasses() API support: -// If any entry of this constantPoolCache points to any of +// If any entry of this ConstantPoolCache points to any of // old_methods, replace it with the corresponding new_method. void ConstantPoolCache::adjust_method_entries(Method** old_methods, Method** new_methods, int methods_length, bool * trace_name_printed) { @@ -572,7 +581,7 @@ continue; } - // The constantPoolCache contains entries for several different + // The ConstantPoolCache contains entries for several different // things, but we only care about methods. In fact, we only care // about methods in the same class as the one that contains the // old_methods. At this point, we have an interesting entry. @@ -591,19 +600,26 @@ } } -#ifndef PRODUCT -bool ConstantPoolCache::check_no_old_entries() { +// the constant pool cache should never contain old or obsolete methods +bool ConstantPoolCache::check_no_old_or_obsolete_entries() { for (int i = 1; i < length(); i++) { if (entry_at(i)->is_interesting_method_entry(NULL) && - !entry_at(i)->check_no_old_entries()) { + !entry_at(i)->check_no_old_or_obsolete_entries()) { return false; } } return true; } -#endif // PRODUCT +void ConstantPoolCache::dump_cache() { + for (int i = 1; i < length(); i++) { + if (entry_at(i)->is_interesting_method_entry(NULL)) { + entry_at(i)->print(tty, i); + } + } +} + // Printing void ConstantPoolCache::print_on(outputStream* st) const { --- old/src/share/vm/oops/cpCache.hpp Mon Feb 4 12:54:41 2013 +++ new/src/share/vm/oops/cpCache.hpp Mon Feb 4 12:54:41 2013 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2013, 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 @@ -338,7 +338,7 @@ static ByteSize flags_offset() { return byte_offset_of(ConstantPoolCacheEntry, _flags); } // RedefineClasses() API support: - // If this constantPoolCacheEntry refers to old_method then update it + // If this ConstantPoolCacheEntry refers to old_method then update it // to refer to new_method. // trace_name_printed is set to true if the current call has // printed the klass name so that other routines in the adjust_* @@ -345,7 +345,7 @@ // group don't print the klass name. bool adjust_method_entry(Method* old_method, Method* new_method, bool * trace_name_printed); - NOT_PRODUCT(bool check_no_old_entries();) + bool check_no_old_or_obsolete_entries(); bool is_interesting_method_entry(Klass* k); // Debugging & Printing @@ -424,7 +424,7 @@ } // RedefineClasses() API support: - // If any entry of this constantPoolCache points to any of + // If any entry of this ConstantPoolCache points to any of // old_methods, replace it with the corresponding new_method. // trace_name_printed is set to true if the current call has // printed the klass name so that other routines in the adjust_* @@ -431,7 +431,8 @@ // group don't print the klass name. void adjust_method_entries(Method** old_methods, Method** new_methods, int methods_length, bool * trace_name_printed); - NOT_PRODUCT(bool check_no_old_entries();) + bool check_no_old_or_obsolete_entries(); + void dump_cache(); // Deallocate - no fields to deallocate DEBUG_ONLY(bool on_stack() { return false; }) --- old/src/share/vm/oops/klassVtable.cpp Mon Feb 4 12:54:42 2013 +++ new/src/share/vm/oops/klassVtable.cpp Mon Feb 4 12:54:42 2013 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2013, 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 @@ -638,11 +638,38 @@ new_method->name()->as_C_string(), new_method->signature()->as_C_string())); } + // cannot 'break' here; see for-loop comment above. } } } } +// a vtable should never contain old or obsolete methods +bool klassVtable::check_no_old_or_obsolete_entries() { + for (int i = 0; i < length(); i++) { + Method* m = unchecked_method_at(i); + if (m != NULL && + (NOT_PRODUCT(!m->is_valid() ||) m->is_old() || m->is_obsolete())) { + return false; + } + } + return true; +} + +void klassVtable::dump_vtable() { + tty->print_cr("vtable dump --"); + for (int i = 0; i < length(); i++) { + Method* m = unchecked_method_at(i); + if (m != NULL) { + tty->print(" (%5d) ", i); + m->access_flags().print_on(tty); + tty->print(" -- "); + m->print_name(tty); + tty->cr(); + } + } +} + // CDS/RedefineClasses support - clear vtables so they can be reinitialized void klassVtable::clear_vtable() { for (int i = 0; i < _length; i++) table()[i].clear(); @@ -833,7 +860,7 @@ new_method->name()->as_C_string(), new_method->signature()->as_C_string())); } - // Cannot break because there might be another entry for this method + // cannot 'break' here; see for-loop comment above. } ime++; } @@ -840,7 +867,37 @@ } } +// an itable should never contain old or obsolete methods +bool klassItable::check_no_old_or_obsolete_entries() { + itableMethodEntry* ime = method_entry(0); + for (int i = 0; i < _size_method_table; i++) { + Method* m = ime->method(); + if (m != NULL && + (NOT_PRODUCT(!m->is_valid() ||) m->is_old() || m->is_obsolete())) { + return false; + } + ime++; + } + return true; +} +void klassItable::dump_itable() { + itableMethodEntry* ime = method_entry(0); + tty->print_cr("itable dump --"); + for (int i = 0; i < _size_method_table; i++) { + Method* m = ime->method(); + if (m != NULL) { + tty->print(" (%5d) ", i); + m->access_flags().print_on(tty); + tty->print(" -- "); + m->print_name(tty); + tty->cr(); + } + ime++; + } +} + + // Setup class InterfaceVisiterClosure : public StackObj { public: @@ -1126,43 +1183,6 @@ tty->print_cr("%6d bytes total", total); } -bool klassVtable::check_no_old_entries() { - // Check that there really is no entry - for (int i = 0; i < length(); i++) { - Method* m = unchecked_method_at(i); - if (m != NULL) { - if (!m->is_valid() || m->is_old()) { - return false; - } - } - } - return true; -} - -void klassVtable::dump_vtable() { - tty->print_cr("vtable dump --"); - for (int i = 0; i < length(); i++) { - Method* m = unchecked_method_at(i); - if (m != NULL) { - tty->print(" (%5d) ", i); - m->access_flags().print_on(tty); - tty->print(" -- "); - m->print_name(tty); - tty->cr(); - } - } -} - -bool klassItable::check_no_old_entries() { - itableMethodEntry* ime = method_entry(0); - for(int i = 0; i < _size_method_table; i++) { - Method* m = ime->method(); - if (m != NULL && (!m->is_valid() || m->is_old())) return false; - ime++; - } - return true; -} - int klassItable::_total_classes; // Total no. of classes with itables long klassItable::_total_size; // Total no. of bytes used for itables --- old/src/share/vm/oops/klassVtable.hpp Mon Feb 4 12:54:43 2013 +++ new/src/share/vm/oops/klassVtable.hpp Mon Feb 4 12:54:42 2013 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2013, 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 @@ -98,6 +98,8 @@ // group don't print the klass name. void adjust_method_entries(Method** old_methods, Method** new_methods, int methods_length, bool * trace_name_printed); + bool check_no_old_or_obsolete_entries(); + void dump_vtable(); // Debugging code void print() PRODUCT_RETURN; @@ -104,11 +106,6 @@ void verify(outputStream* st, bool force = false); static void print_statistics() PRODUCT_RETURN; -#ifndef PRODUCT - bool check_no_old_entries(); - void dump_vtable(); -#endif - protected: friend class vtableEntry; private: @@ -283,6 +280,8 @@ // group don't print the klass name. void adjust_method_entries(Method** old_methods, Method** new_methods, int methods_length, bool * trace_name_printed); + bool check_no_old_or_obsolete_entries(); + void dump_itable(); // Setup of itable static int compute_itable_size(Array* transitive_interfaces); @@ -307,11 +306,6 @@ NOT_PRODUCT(static long _total_size;) // Total no. of bytes used for itables static void update_stats(int size) PRODUCT_RETURN NOT_PRODUCT({ _total_classes++; _total_size += size; }) - - public: -#ifndef PRODUCT - bool check_no_old_entries(); -#endif }; #endif // SHARE_VM_OOPS_KLASSVTABLE_HPP --- old/src/share/vm/oops/method.cpp Mon Feb 4 12:54:43 2013 +++ new/src/share/vm/oops/method.cpp Mon Feb 4 12:54:43 2013 @@ -1385,10 +1385,6 @@ } -//----------------------------------------------------------------------------------- -// Non-product code - -#ifndef PRODUCT class SignatureTypePrinter : public SignatureTypeNames { private: outputStream* _st; @@ -1425,6 +1421,10 @@ } +//----------------------------------------------------------------------------------- +// Non-product code + +#ifndef PRODUCT void Method::print_codes_on(outputStream* st) const { print_codes_on(0, code_size(), st); } --- old/src/share/vm/oops/method.hpp Mon Feb 4 12:54:44 2013 +++ new/src/share/vm/oops/method.hpp Mon Feb 4 12:54:44 2013 @@ -800,8 +800,8 @@ static bool has_unloaded_classes_in_signature(methodHandle m, TRAPS); // Printing - void print_short_name(outputStream* st = tty) /*PRODUCT_RETURN*/; // prints as klassname::methodname; Exposed so field engineers can debug VM - void print_name(outputStream* st = tty) PRODUCT_RETURN; // prints as "virtual void foo(int)" + void print_short_name(outputStream* st = tty); // prints as klassname::methodname; Exposed so field engineers can debug VM + void print_name(outputStream* st = tty); // prints as "virtual void foo(int)"; exposed for TraceRedefineClasses // Helper routine used for method sorting static void sort_methods(Array* methods, --- old/src/share/vm/prims/jvmtiRedefineClasses.cpp Mon Feb 4 12:54:44 2013 +++ new/src/share/vm/prims/jvmtiRedefineClasses.cpp Mon Feb 4 12:54:44 2013 @@ -154,9 +154,16 @@ // See jvmtiExport.hpp for detailed explanation. JvmtiExport::set_has_redefined_a_class(); -#ifdef ASSERT - SystemDictionary::classes_do(check_class, thread); +// check_class() is optionally called for product bits, but is +// always called for non-product bits. +#ifdef PRODUCT + if (RC_TRACE_ENABLED(0x00004000)) { #endif + RC_TRACE_WITH_THREAD(0x00004000, thread, ("calling check_class")); + SystemDictionary::classes_do(check_class, thread); +#ifdef PRODUCT + } +#endif } void VM_RedefineClasses::doit_epilogue() { @@ -1585,9 +1592,9 @@ bcp, cp_index, new_index)); // Rewriter::rewrite_method() uses put_native_u2() in this // situation because it is reusing the constant pool index - // location for a native index into the constantPoolCache. + // location for a native index into the ConstantPoolCache. // Since we are updating the constant pool index prior to - // verification and constantPoolCache initialization, we + // verification and ConstantPoolCache initialization, we // need to keep the new index in Java byte order. Bytes::put_Java_u2(p, new_index); } @@ -3392,7 +3399,6 @@ } } -#ifndef PRODUCT void VM_RedefineClasses::check_class(Klass* k_oop, ClassLoaderData* initiating_loader, TRAPS) { @@ -3400,82 +3406,110 @@ if (k->oop_is_instance()) { HandleMark hm(THREAD); InstanceKlass *ik = (InstanceKlass *) k; + bool no_old_methods = true; // be optimistic + ResourceMark rm(THREAD); - if (ik->vtable_length() > 0) { - ResourceMark rm(THREAD); - if (!ik->vtable()->check_no_old_entries()) { - tty->print_cr("klassVtable::check_no_old_entries failure -- OLD method found -- class: %s", ik->signature_name()); + // a vtable should never contain old or obsolete methods + if (ik->vtable_length() > 0 && + !ik->vtable()->check_no_old_or_obsolete_entries()) { + if (RC_TRACE_ENABLED(0x00004000)) { + RC_TRACE_WITH_THREAD(0x00004000, THREAD, + ("klassVtable::check_no_old_or_obsolete_entries failure" + " -- OLD or OBSOLETE method found -- class: %s", + ik->signature_name())); ik->vtable()->dump_vtable(); - assert(false, "OLD method found"); } + no_old_methods = false; } - if (ik->itable_length() > 0) { - ResourceMark rm(THREAD); - if (!ik->itable()->check_no_old_entries()) { - tty->print_cr("klassItable::check_no_old_entries failure -- OLD method found -- class: %s", ik->signature_name()); - assert(false, "OLD method found"); + + // an itable should never contain old or obsolete methods + if (ik->itable_length() > 0 && + !ik->itable()->check_no_old_or_obsolete_entries()) { + if (RC_TRACE_ENABLED(0x00004000)) { + RC_TRACE_WITH_THREAD(0x00004000, THREAD, + ("klassItable::check_no_old_or_obsolete_entries failure" + " -- OLD or OBSOLETE method found -- class: %s", + ik->signature_name())); + ik->itable()->dump_itable(); } + no_old_methods = false; } - // Check that the constant pool cache has no deleted entries. + + // the constant pool cache should never contain old or obsolete methods if (ik->constants() != NULL && ik->constants()->cache() != NULL && - !ik->constants()->cache()->check_no_old_entries()) { - tty->print_cr("klassVtable::check_no_old_entries failure -- OLD method found -- class: %s", ik->signature_name()); - assert(false, "OLD method found"); + !ik->constants()->cache()->check_no_old_or_obsolete_entries()) { + if (RC_TRACE_ENABLED(0x00004000)) { + RC_TRACE_WITH_THREAD(0x00004000, THREAD, + ("cp-cache::check_no_old_or_obsolete_entries failure" + " -- OLD or OBSOLETE method found -- class: %s", + ik->signature_name())); + ik->constants()->cache()->dump_cache(); + } + no_old_methods = false; } + + if (!no_old_methods) { + if (RC_TRACE_ENABLED(0x00004000)) { + dump_methods(); + } else { + tty->print_cr("INFO: use the '-XX:TraceRedefineClasses=16384' option " + "to see more info about the following guarantee() failure."); + } + guarantee(false, "OLD and/or OBSOLETE method(s) found"); + } } } void VM_RedefineClasses::dump_methods() { - int j; - tty->print_cr("_old_methods --"); - for (j = 0; j < _old_methods->length(); ++j) { - Method* m = _old_methods->at(j); - tty->print("%4d (%5d) ", j, m->vtable_index()); - m->access_flags().print_on(tty); - tty->print(" -- "); - m->print_name(tty); - tty->cr(); - } - tty->print_cr("_new_methods --"); - for (j = 0; j < _new_methods->length(); ++j) { - Method* m = _new_methods->at(j); - tty->print("%4d (%5d) ", j, m->vtable_index()); - m->access_flags().print_on(tty); - tty->print(" -- "); - m->print_name(tty); - tty->cr(); - } - tty->print_cr("_matching_(old/new)_methods --"); - for (j = 0; j < _matching_methods_length; ++j) { - Method* m = _matching_old_methods[j]; - tty->print("%4d (%5d) ", j, m->vtable_index()); - m->access_flags().print_on(tty); - tty->print(" -- "); - m->print_name(tty); - tty->cr(); - m = _matching_new_methods[j]; - tty->print(" (%5d) ", m->vtable_index()); - m->access_flags().print_on(tty); - tty->cr(); - } - tty->print_cr("_deleted_methods --"); - for (j = 0; j < _deleted_methods_length; ++j) { - Method* m = _deleted_methods[j]; - tty->print("%4d (%5d) ", j, m->vtable_index()); - m->access_flags().print_on(tty); - tty->print(" -- "); - m->print_name(tty); - tty->cr(); - } - tty->print_cr("_added_methods --"); - for (j = 0; j < _added_methods_length; ++j) { - Method* m = _added_methods[j]; - tty->print("%4d (%5d) ", j, m->vtable_index()); - m->access_flags().print_on(tty); - tty->print(" -- "); - m->print_name(tty); - tty->cr(); - } + int j; + RC_TRACE(0x00004000, ("_old_methods --")); + for (j = 0; j < _old_methods->length(); ++j) { + Method* m = _old_methods->at(j); + RC_TRACE_NO_CR(0x00004000, ("%4d (%5d) ", j, m->vtable_index())); + m->access_flags().print_on(tty); + tty->print(" -- "); + m->print_name(tty); + tty->cr(); + } + RC_TRACE(0x00004000, ("_new_methods --")); + for (j = 0; j < _new_methods->length(); ++j) { + Method* m = _new_methods->at(j); + RC_TRACE_NO_CR(0x00004000, ("%4d (%5d) ", j, m->vtable_index())); + m->access_flags().print_on(tty); + tty->print(" -- "); + m->print_name(tty); + tty->cr(); + } + RC_TRACE(0x00004000, ("_matching_(old/new)_methods --")); + for (j = 0; j < _matching_methods_length; ++j) { + Method* m = _matching_old_methods[j]; + RC_TRACE_NO_CR(0x00004000, ("%4d (%5d) ", j, m->vtable_index())); + m->access_flags().print_on(tty); + tty->print(" -- "); + m->print_name(tty); + tty->cr(); + m = _matching_new_methods[j]; + RC_TRACE_NO_CR(0x00004000, (" (%5d) ", m->vtable_index())); + m->access_flags().print_on(tty); + tty->cr(); + } + RC_TRACE(0x00004000, ("_deleted_methods --")); + for (j = 0; j < _deleted_methods_length; ++j) { + Method* m = _deleted_methods[j]; + RC_TRACE_NO_CR(0x00004000, ("%4d (%5d) ", j, m->vtable_index())); + m->access_flags().print_on(tty); + tty->print(" -- "); + m->print_name(tty); + tty->cr(); + } + RC_TRACE(0x00004000, ("_added_methods --")); + for (j = 0; j < _added_methods_length; ++j) { + Method* m = _added_methods[j]; + RC_TRACE_NO_CR(0x00004000, ("%4d (%5d) ", j, m->vtable_index())); + m->access_flags().print_on(tty); + tty->print(" -- "); + m->print_name(tty); + tty->cr(); + } } -#endif --- old/src/share/vm/prims/jvmtiRedefineClasses.hpp Mon Feb 4 12:54:45 2013 +++ new/src/share/vm/prims/jvmtiRedefineClasses.hpp Mon Feb 4 12:54:45 2013 @@ -467,10 +467,10 @@ void flush_dependent_code(instanceKlassHandle k_h, TRAPS); - static void check_class(Klass* k_oop, ClassLoaderData* initiating_loader, TRAPS) PRODUCT_RETURN; + static void check_class(Klass* k_oop, ClassLoaderData* initiating_loader, + TRAPS); + static void dump_methods(); - static void dump_methods() PRODUCT_RETURN; - public: VM_RedefineClasses(jint class_count, const jvmtiClassDefinition *class_defs, --- old/src/share/vm/prims/jvmtiRedefineClassesTrace.hpp Mon Feb 4 12:54:46 2013 +++ new/src/share/vm/prims/jvmtiRedefineClassesTrace.hpp Mon Feb 4 12:54:45 2013 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2003, 2013, 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 @@ -54,7 +54,7 @@ // 0x00000800 | 2048 - previous class breakpoint mgmt // 0x00001000 | 4096 - detect calls to obsolete methods // 0x00002000 | 8192 - fail a guarantee() in addition to detection -// 0x00004000 | 16384 - unused +// 0x00004000 | 16384 - detect old/obsolete methods in metadata // 0x00008000 | 32768 - old/new method matching/add/delete // 0x00010000 | 65536 - impl details: CP size info // 0x00020000 | 131072 - impl details: CP merge pass info @@ -82,6 +82,13 @@ tty->print_cr args; \ } while (0) +#define RC_TRACE_NO_CR(level, args) \ + if ((TraceRedefineClasses & level) != 0) { \ + ResourceMark rm; \ + tty->print("RedefineClasses-0x%x: ", level); \ + tty->print args; \ + } while (0) + #define RC_TRACE_WITH_THREAD(level, thread, args) \ if ((TraceRedefineClasses & level) != 0) { \ ResourceMark rm(thread); \ --- old/src/share/vm/utilities/accessFlags.cpp Mon Feb 4 12:54:46 2013 +++ new/src/share/vm/utilities/accessFlags.cpp Mon Feb 4 12:54:46 2013 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2013, 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 @@ -59,8 +59,6 @@ } while(f != old_flags); } -#ifndef PRODUCT - void AccessFlags::print_on(outputStream* st) const { if (is_public ()) st->print("public " ); if (is_private ()) st->print("private " ); @@ -80,8 +78,6 @@ if (on_stack ()) st->print("{on_stack} " ); } -#endif - void accessFlags_init() { assert(sizeof(AccessFlags) == sizeof(jint), "just checking size of flags"); } --- old/src/share/vm/utilities/accessFlags.hpp Mon Feb 4 12:54:47 2013 +++ new/src/share/vm/utilities/accessFlags.hpp Mon Feb 4 12:54:46 2013 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2013, 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 @@ -239,7 +239,7 @@ inline friend AccessFlags accessFlags_from(jint flags); // Printing/debugging - void print_on(outputStream* st) const PRODUCT_RETURN; + void print_on(outputStream* st) const; }; inline AccessFlags accessFlags_from(jint flags) {