equal
deleted
inserted
replaced
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) { |