src/share/vm/runtime/advancedThresholdPolicy.cpp

changeset 3385
abcceac2f7cd
parent 3035
43f9d800f276
child 3452
20334ed5ed3c
     1.1 --- a/src/share/vm/runtime/advancedThresholdPolicy.cpp	Fri Dec 09 06:46:57 2011 -0800
     1.2 +++ b/src/share/vm/runtime/advancedThresholdPolicy.cpp	Mon Dec 12 12:44:08 2011 -0800
     1.3 @@ -156,20 +156,19 @@
     1.4  // Called with the queue locked and with at least one element
     1.5  CompileTask* AdvancedThresholdPolicy::select_task(CompileQueue* compile_queue) {
     1.6    CompileTask *max_task = NULL;
     1.7 -  methodOop max_method;
     1.8 +  methodHandle max_method;
     1.9    jlong t = os::javaTimeMillis();
    1.10    // Iterate through the queue and find a method with a maximum rate.
    1.11    for (CompileTask* task = compile_queue->first(); task != NULL;) {
    1.12      CompileTask* next_task = task->next();
    1.13 -    methodOop method = (methodOop)JNIHandles::resolve(task->method_handle());
    1.14 -    methodDataOop mdo = method->method_data();
    1.15 -    update_rate(t, method);
    1.16 +    methodHandle method = (methodOop)JNIHandles::resolve(task->method_handle());
    1.17 +    update_rate(t, method());
    1.18      if (max_task == NULL) {
    1.19        max_task = task;
    1.20        max_method = method;
    1.21      } else {
    1.22        // If a method has been stale for some time, remove it from the queue.
    1.23 -      if (is_stale(t, TieredCompileTaskTimeout, method) && !is_old(method)) {
    1.24 +      if (is_stale(t, TieredCompileTaskTimeout, method()) && !is_old(method())) {
    1.25          if (PrintTieredEvents) {
    1.26            print_event(REMOVE_FROM_QUEUE, method, method, task->osr_bci(), (CompLevel)task->comp_level());
    1.27          }
    1.28 @@ -181,7 +180,7 @@
    1.29        }
    1.30  
    1.31        // Select a method with a higher rate
    1.32 -      if (compare_methods(method, max_method)) {
    1.33 +      if (compare_methods(method(), max_method())) {
    1.34          max_task = task;
    1.35          max_method = method;
    1.36        }
    1.37 @@ -190,7 +189,7 @@
    1.38    }
    1.39  
    1.40    if (max_task->comp_level() == CompLevel_full_profile && TieredStopAtLevel > CompLevel_full_profile
    1.41 -      && is_method_profiled(max_method)) {
    1.42 +      && is_method_profiled(max_method())) {
    1.43      max_task->set_comp_level(CompLevel_limited_profile);
    1.44      if (PrintTieredEvents) {
    1.45        print_event(UPDATE_IN_QUEUE, max_method, max_method, max_task->osr_bci(), (CompLevel)max_task->comp_level());

mercurial