src/share/vm/memory/universe.cpp

changeset 5097
92ef81e2f571
parent 5018
b06ac540229e
child 5191
0def34ab1c98
child 5249
ce9ecec70f99
     1.1 --- a/src/share/vm/memory/universe.cpp	Wed May 08 21:06:46 2013 -0400
     1.2 +++ b/src/share/vm/memory/universe.cpp	Fri May 10 08:27:30 2013 -0700
     1.3 @@ -1425,25 +1425,25 @@
     1.4  }
     1.5  
     1.6  
     1.7 -void ActiveMethodOopsCache::add_previous_version(Method* const method) {
     1.8 +void ActiveMethodOopsCache::add_previous_version(Method* method) {
     1.9    assert(Thread::current()->is_VM_thread(),
    1.10      "only VMThread can add previous versions");
    1.11  
    1.12    // Only append the previous method if it is executing on the stack.
    1.13    if (method->on_stack()) {
    1.14  
    1.15 -  if (_prev_methods == NULL) {
    1.16 -    // This is the first previous version so make some space.
    1.17 -    // Start with 2 elements under the assumption that the class
    1.18 -    // won't be redefined much.
    1.19 +    if (_prev_methods == NULL) {
    1.20 +      // This is the first previous version so make some space.
    1.21 +      // Start with 2 elements under the assumption that the class
    1.22 +      // won't be redefined much.
    1.23        _prev_methods = new (ResourceObj::C_HEAP, mtClass) GrowableArray<Method*>(2, true);
    1.24 -  }
    1.25 +    }
    1.26  
    1.27 -  // RC_TRACE macro has an embedded ResourceMark
    1.28 -  RC_TRACE(0x00000100,
    1.29 -    ("add: %s(%s): adding prev version ref for cached method @%d",
    1.30 -    method->name()->as_C_string(), method->signature()->as_C_string(),
    1.31 -    _prev_methods->length()));
    1.32 +    // RC_TRACE macro has an embedded ResourceMark
    1.33 +    RC_TRACE(0x00000100,
    1.34 +      ("add: %s(%s): adding prev version ref for cached method @%d",
    1.35 +        method->name()->as_C_string(), method->signature()->as_C_string(),
    1.36 +        _prev_methods->length()));
    1.37  
    1.38      _prev_methods->append(method);
    1.39    }
    1.40 @@ -1464,16 +1464,17 @@
    1.41        MetadataFactory::free_metadata(method->method_holder()->class_loader_data(), method);
    1.42      } else {
    1.43        // RC_TRACE macro has an embedded ResourceMark
    1.44 -      RC_TRACE(0x00000400, ("add: %s(%s): previous cached method @%d is alive",
    1.45 -        method->name()->as_C_string(), method->signature()->as_C_string(), i));
    1.46 +      RC_TRACE(0x00000400,
    1.47 +        ("add: %s(%s): previous cached method @%d is alive",
    1.48 +         method->name()->as_C_string(), method->signature()->as_C_string(), i));
    1.49      }
    1.50    }
    1.51  } // end add_previous_version()
    1.52  
    1.53  
    1.54 -bool ActiveMethodOopsCache::is_same_method(Method* const method) const {
    1.55 +bool ActiveMethodOopsCache::is_same_method(const Method* method) const {
    1.56    InstanceKlass* ik = InstanceKlass::cast(klass());
    1.57 -  Method* check_method = ik->method_with_idnum(method_idnum());
    1.58 +  const Method* check_method = ik->method_with_idnum(method_idnum());
    1.59    assert(check_method != NULL, "sanity check");
    1.60    if (check_method == method) {
    1.61      // done with the easy case

mercurial