1.1 --- a/src/share/vm/asm/codeBuffer.hpp Fri Aug 31 16:39:35 2012 -0700 1.2 +++ b/src/share/vm/asm/codeBuffer.hpp Sat Sep 01 13:25:18 2012 -0400 1.3 @@ -1,5 +1,5 @@ 1.4 /* 1.5 - * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved. 1.6 + * Copyright (c) 1997, 2012, 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 @@ -486,6 +486,9 @@ 1.11 bool insts_contains(address pc) const { return _insts.contains(pc); } 1.12 bool insts_contains2(address pc) const { return _insts.contains2(pc); } 1.13 1.14 + // Record any extra oops required to keep embedded metadata alive 1.15 + void finalize_oop_references(methodHandle method); 1.16 + 1.17 // Allocated size in all sections, when aligned and concatenated 1.18 // (this is the eventual state of the content in its final 1.19 // CodeBlob). 1.20 @@ -504,6 +507,12 @@ 1.21 return (recorder == NULL)? 0: recorder->oop_size(); 1.22 } 1.23 1.24 + // allocated size of any and all recorded metadata 1.25 + csize_t total_metadata_size() const { 1.26 + OopRecorder* recorder = oop_recorder(); 1.27 + return (recorder == NULL)? 0: recorder->metadata_size(); 1.28 + } 1.29 + 1.30 // Configuration functions, called immediately after the CB is constructed. 1.31 // The section sizes are subtracted from the original insts section. 1.32 // Note: Call them in reverse section order, because each steals from insts. 1.33 @@ -532,9 +541,9 @@ 1.34 copy_relocations_to(blob); 1.35 copy_code_to(blob); 1.36 } 1.37 - void copy_oops_to(nmethod* nm) { 1.38 + void copy_values_to(nmethod* nm) { 1.39 if (!oop_recorder()->is_unused()) { 1.40 - oop_recorder()->copy_to(nm); 1.41 + oop_recorder()->copy_values_to(nm); 1.42 } 1.43 } 1.44