hotspot/src/share/vm/code/oopRecorder.cpp
changeset 5686 5435e77aa3df
parent 1 489c9b5090e2
child 5702 201c5cde25bb
equal deleted inserted replaced
5539:261ecc5bb65e 5686:5435e77aa3df
     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) {