src/share/vm/oops/method.cpp

changeset 7203
966205f0e717
parent 7184
bc4ce33c0985
child 7333
b12a2a9b05ca
     1.1 --- a/src/share/vm/oops/method.cpp	Fri Sep 19 11:12:39 2014 -0400
     1.2 +++ b/src/share/vm/oops/method.cpp	Fri Sep 19 11:53:58 2014 -0700
     1.3 @@ -93,7 +93,7 @@
     1.4    set_hidden(false);
     1.5    set_dont_inline(false);
     1.6    set_method_data(NULL);
     1.7 -  set_method_counters(NULL);
     1.8 +  clear_method_counters();
     1.9    set_vtable_index(Method::garbage_vtable_index);
    1.10  
    1.11    // Fix and bury in Method*
    1.12 @@ -117,7 +117,7 @@
    1.13    MetadataFactory::free_metadata(loader_data, method_data());
    1.14    set_method_data(NULL);
    1.15    MetadataFactory::free_metadata(loader_data, method_counters());
    1.16 -  set_method_counters(NULL);
    1.17 +  clear_method_counters();
    1.18    // The nmethod will be gone when we get here.
    1.19    if (code() != NULL) _code = NULL;
    1.20  }
    1.21 @@ -388,9 +388,7 @@
    1.22    methodHandle mh(m);
    1.23    ClassLoaderData* loader_data = mh->method_holder()->class_loader_data();
    1.24    MethodCounters* counters = MethodCounters::allocate(loader_data, CHECK_NULL);
    1.25 -  if (mh->method_counters() == NULL) {
    1.26 -    mh->set_method_counters(counters);
    1.27 -  } else {
    1.28 +  if (!mh->init_method_counters(counters)) {
    1.29      MetadataFactory::free_metadata(loader_data, counters);
    1.30    }
    1.31    return mh->method_counters();
    1.32 @@ -852,7 +850,7 @@
    1.33    assert(!DumpSharedSpaces || _method_data == NULL, "unexpected method data?");
    1.34  
    1.35    set_method_data(NULL);
    1.36 -  set_method_counters(NULL);
    1.37 +  clear_method_counters();
    1.38  }
    1.39  
    1.40  // Called when the method_holder is getting linked. Setup entrypoints so the method

mercurial