Print this page


Split Close
Expand all
Collapse all
          --- old/src/share/vm/code/codeCache.cpp
          +++ new/src/share/vm/code/codeCache.cpp
   1    1  /*
   2      - * Copyright 1997-2007 Sun Microsystems, Inc.  All Rights Reserved.
        2 + * Copyright 1997-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 ↓ 264 lines elided ↑ open up ↑
 277  277      debug_only(cur->clear_scavenge_root_marked());
 278  278      assert(cur->scavenge_root_not_marked(), "");
 279  279      assert(cur->on_scavenge_root_list(), "else shouldn't be on this list");
 280  280  
 281  281      bool is_live = (!cur->is_zombie() && !cur->is_unloaded());
 282  282  #ifndef PRODUCT
 283  283      if (TraceScavenge) {
 284  284        cur->print_on(tty, is_live ? "scavenge root" : "dead scavenge root"); tty->cr();
 285  285      }
 286  286  #endif //PRODUCT
 287      -    if (is_live)
      287 +    if (is_live) {
 288  288        // Perform cur->oops_do(f), maybe just once per nmethod.
 289  289        f->do_code_blob(cur);
      290 +      cur->fix_oop_relocations();
      291 +    }
 290  292    }
 291  293  
 292  294    // Check for stray marks.
 293  295    debug_only(verify_perm_nmethods(NULL));
 294  296  }
 295  297  
 296  298  void CodeCache::add_scavenge_root_nmethod(nmethod* nm) {
 297  299    assert_locked_or_safepoint(CodeCache_lock);
 298  300    nm->set_on_scavenge_root_list();
 299  301    nm->set_scavenge_root_link(_scavenge_root_nmethods);
↓ open down ↓ 582 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX