1.1 --- a/src/share/vm/oops/constantPool.hpp Thu Jan 17 10:25:16 2013 -0500 1.2 +++ b/src/share/vm/oops/constantPool.hpp Thu Jan 17 13:40:31 2013 -0500 1.3 @@ -1,5 +1,5 @@ 1.4 /* 1.5 - * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. 1.6 + * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. 1.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 1.8 * 1.9 * This code is free software; you can redistribute it and/or modify it 1.10 @@ -103,8 +103,8 @@ 1.11 union { 1.12 // set for CDS to restore resolved references 1.13 int _resolved_reference_length; 1.14 - // only set to non-zero if constant pool is merged by RedefineClasses 1.15 - int _orig_length; 1.16 + // keeps version number for redefined classes (used in backtrace) 1.17 + int _version; 1.18 } _saved; 1.19 1.20 Monitor* _lock; 1.21 @@ -784,8 +784,11 @@ 1.22 static void copy_cp_to_impl(constantPoolHandle from_cp, int start_i, int end_i, constantPoolHandle to_cp, int to_i, TRAPS); 1.23 static void copy_entry_to(constantPoolHandle from_cp, int from_i, constantPoolHandle to_cp, int to_i, TRAPS); 1.24 int find_matching_entry(int pattern_i, constantPoolHandle search_cp, TRAPS); 1.25 - int orig_length() const { return _saved._orig_length; } 1.26 - void set_orig_length(int orig_length) { _saved._orig_length = orig_length; } 1.27 + int version() const { return _saved._version; } 1.28 + void set_version(int version) { _saved._version = version; } 1.29 + void increment_and_save_version(int version) { 1.30 + _saved._version = version >= 0 ? version++ : version; // keep overflow 1.31 + } 1.32 1.33 void set_resolved_reference_length(int length) { _saved._resolved_reference_length = length; } 1.34 int resolved_reference_length() const { return _saved._resolved_reference_length; }