src/share/vm/c1/c1_Compilation.cpp

changeset 2349
5ddfcf4b079e
parent 2314
f95d63e2154a
child 2421
2f9d59b0fa5c
     1.1 --- a/src/share/vm/c1/c1_Compilation.cpp	Thu Dec 02 01:02:55 2010 -0800
     1.2 +++ b/src/share/vm/c1/c1_Compilation.cpp	Thu Dec 02 17:21:12 2010 -0800
     1.3 @@ -298,8 +298,8 @@
     1.4  
     1.5    CHECK_BAILOUT_(no_frame_size);
     1.6  
     1.7 -  if (is_profiling()) {
     1.8 -    method()->build_method_data();
     1.9 +  if (is_profiling() && !method()->ensure_method_data()) {
    1.10 +    BAILOUT_("mdo allocation failed", no_frame_size);
    1.11    }
    1.12  
    1.13    {
    1.14 @@ -484,11 +484,11 @@
    1.15      if (is_profiling()) {
    1.16        // Compilation failed, create MDO, which would signal the interpreter
    1.17        // to start profiling on its own.
    1.18 -      _method->build_method_data();
    1.19 +      _method->ensure_method_data();
    1.20      }
    1.21    } else if (is_profiling() && _would_profile) {
    1.22 -    ciMethodData *md = method->method_data();
    1.23 -    assert (md != NULL, "Should have MDO");
    1.24 +    ciMethodData *md = method->method_data_or_null();
    1.25 +    assert(md != NULL, "Sanity");
    1.26      md->set_would_profile(_would_profile);
    1.27    }
    1.28  }

mercurial