Print this page


Split Close
Expand all
Collapse all
          --- old/src/share/vm/code/oopRecorder.cpp
          +++ new/src/share/vm/code/oopRecorder.cpp
   1    1  /*
   2      - * Copyright 1998-2007 Sun Microsystems, Inc.  All Rights Reserved.
        2 + * Copyright 1998-2010 Sun Microsystems, Inc.  All Rights Reserved.
   3    3   * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
   4    4   *
   5    5   * This code is free software; you can redistribute it and/or modify it
   6    6   * under the terms of the GNU General Public License version 2 only, as
   7    7   * published by the Free Software Foundation.
   8    8   *
   9    9   * This code is distributed in the hope that it will be useful, but WITHOUT
  10   10   * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  11   11   * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  12   12   * version 2 for more details (a copy is included in the LICENSE file that
↓ open down ↓ 30 lines elided ↑ open up ↑
  43   43    assert(first_index > 0, "initial zero state of cache must be invalid index");
  44   44    Copy::zero_to_bytes(&_cache[0], sizeof(_cache));
  45   45  }
  46   46  
  47   47  int OopRecorder::oop_size() {
  48   48    _complete = true;
  49   49    if (_handles == NULL)  return 0;
  50   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   54    assert(_complete, "must be frozen");
  55   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   59  void OopRecorder::maybe_initialize() {
  60   60    if (_handles == NULL) {
  61   61      if (_arena != NULL) {
  62   62        _handles  = new(_arena) GrowableArray<jobject>(_arena, 10, 0, 0);
  63   63        _no_finds = new(_arena) GrowableArray<int>(    _arena, 10, 0, 0);
  64   64      } else {
  65   65        _handles  = new GrowableArray<jobject>(10, 0, 0);
  66   66        _no_finds = new GrowableArray<int>(    10, 0, 0);
↓ open down ↓ 90 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX