src/share/vm/classfile/classLoader.cpp

changeset 4037
da91efe96a93
parent 3900
d2a62e0f25eb
child 4261
6cb0d32b828b
     1.1 --- a/src/share/vm/classfile/classLoader.cpp	Fri Aug 31 16:39:35 2012 -0700
     1.2 +++ b/src/share/vm/classfile/classLoader.cpp	Sat Sep 01 13:25:18 2012 -0400
     1.3 @@ -1,5 +1,5 @@
     1.4  /*
     1.5 - * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
     1.6 + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved.
     1.7   * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     1.8   *
     1.9   * This code is free software; you can redistribute it and/or modify it
    1.10 @@ -37,7 +37,6 @@
    1.11  #include "memory/generation.hpp"
    1.12  #include "memory/oopFactory.hpp"
    1.13  #include "memory/universe.inline.hpp"
    1.14 -#include "oops/constantPoolKlass.hpp"
    1.15  #include "oops/instanceKlass.hpp"
    1.16  #include "oops/instanceRefKlass.hpp"
    1.17  #include "oops/oop.inline.hpp"
    1.18 @@ -904,7 +903,7 @@
    1.19      }
    1.20    }
    1.21  
    1.22 -  instanceKlassHandle h(THREAD, klassOop(NULL));
    1.23 +  instanceKlassHandle h;
    1.24    if (stream != NULL) {
    1.25  
    1.26      // class file found, parse it
    1.27 @@ -1192,10 +1191,7 @@
    1.28      if (PENDING_EXCEPTION->is_a(SystemDictionary::OutOfMemoryError_klass())) {
    1.29        CLEAR_PENDING_EXCEPTION;
    1.30        tty->print_cr("\nCompileTheWorld : Ran out of memory\n");
    1.31 -      size_t used = Universe::heap()->permanent_used();
    1.32 -      size_t capacity = Universe::heap()->permanent_capacity();
    1.33 -      tty->print_cr("Permanent generation used %dK of %dK", used/K, capacity/K);
    1.34 -      tty->print_cr("Increase size by setting e.g. -XX:MaxPermSize=%dK\n", capacity*2/K);
    1.35 +      tty->print_cr("Increase class metadata storage if a limit was set");
    1.36      } else {
    1.37        tty->print_cr("\nCompileTheWorld : Unexpected exception occurred\n");
    1.38      }
    1.39 @@ -1318,7 +1314,7 @@
    1.40        // Construct name without extension
    1.41        TempNewSymbol sym = SymbolTable::new_symbol(buffer, CHECK);
    1.42        // Use loader to load and initialize class
    1.43 -      klassOop ik = SystemDictionary::resolve_or_null(sym, loader, Handle(), THREAD);
    1.44 +      Klass* ik = SystemDictionary::resolve_or_null(sym, loader, Handle(), THREAD);
    1.45        instanceKlassHandle k (THREAD, ik);
    1.46        if (k.not_null() && !HAS_PENDING_EXCEPTION) {
    1.47          k->initialize(THREAD);
    1.48 @@ -1326,7 +1322,7 @@
    1.49        bool exception_occurred = HAS_PENDING_EXCEPTION;
    1.50        clear_pending_exception_if_not_oom(CHECK);
    1.51        if (CompileTheWorldPreloadClasses && k.not_null()) {
    1.52 -        constantPoolKlass::preload_and_initialize_all_classes(k->constants(), THREAD);
    1.53 +        ConstantPool::preload_and_initialize_all_classes(k->constants(), THREAD);
    1.54          if (HAS_PENDING_EXCEPTION) {
    1.55            // If something went wrong in preloading we just ignore it
    1.56            clear_pending_exception_if_not_oom(CHECK);
    1.57 @@ -1343,7 +1339,7 @@
    1.58            // Preload all classes to get around uncommon traps
    1.59            // Iterate over all methods in class
    1.60            for (int n = 0; n < k->methods()->length(); n++) {
    1.61 -            methodHandle m (THREAD, methodOop(k->methods()->obj_at(n)));
    1.62 +            methodHandle m (THREAD, k->methods()->at(n));
    1.63              if (CompilationPolicy::can_be_compiled(m)) {
    1.64  
    1.65                if (++_codecache_sweep_counter == CompileTheWorldSafepointInterval) {

mercurial