comparison src/share/vm/code/oopRecorder.cpp @ 1563:1a5913bf5e19

6951083: oops and relocations should part of nmethod not CodeBlob Summary: This moves the oops from Codeblob to nmethod. Reviewed-by: kvn, never
author twisti
date Thu, 20 May 2010 06:34:23 -0700
parents a61af66fc99e
children e9ff18c4ace7
comparison
equal deleted inserted replaced
1544:1a88d3c58e1d 1563:1a5913bf5e19
1 /* 1 /*
2 * Copyright 1998-2007 Sun Microsystems, Inc. All Rights Reserved. 2 * Copyright 1998-2010 Sun Microsystems, Inc. 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.
48 _complete = true; 48 _complete = true;
49 if (_handles == NULL) return 0; 49 if (_handles == NULL) return 0;
50 return _handles->length() * sizeof(oop); 50 return _handles->length() * sizeof(oop);
51 } 51 }
52 52
53 void OopRecorder::copy_to(CodeBlob* code) { 53 void OopRecorder::copy_to(nmethod* nm) {
54 assert(_complete, "must be frozen"); 54 assert(_complete, "must be frozen");
55 maybe_initialize(); // get non-null handles, even if we have no oops 55 maybe_initialize(); // get non-null handles, even if we have no oops
56 code->copy_oops(_handles); 56 nm->copy_oops(_handles);
57 } 57 }
58 58
59 void OopRecorder::maybe_initialize() { 59 void OopRecorder::maybe_initialize() {
60 if (_handles == NULL) { 60 if (_handles == NULL) {
61 if (_arena != NULL) { 61 if (_arena != NULL) {