src/share/vm/runtime/simpleThresholdPolicy.cpp

changeset 4037
da91efe96a93
parent 3452
20334ed5ed3c
child 4111
9191895df19d
     1.1 --- a/src/share/vm/runtime/simpleThresholdPolicy.cpp	Fri Aug 31 16:39:35 2012 -0700
     1.2 +++ b/src/share/vm/runtime/simpleThresholdPolicy.cpp	Sat Sep 01 13:25:18 2012 -0400
     1.3 @@ -1,5 +1,5 @@
     1.4  /*
     1.5 - * Copyright (c) 2010, 2011, Oracle and/or its affiliates. All rights reserved.
     1.6 + * Copyright (c) 2010, 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 @@ -34,10 +34,10 @@
    1.11  void SimpleThresholdPolicy::print_counters(const char* prefix, methodHandle mh) {
    1.12    int invocation_count = mh->invocation_count();
    1.13    int backedge_count = mh->backedge_count();
    1.14 -  methodDataHandle mdh = mh->method_data();
    1.15 +  MethodData* mdh = mh->method_data();
    1.16    int mdo_invocations = 0, mdo_backedges = 0;
    1.17    int mdo_invocations_start = 0, mdo_backedges_start = 0;
    1.18 -  if (mdh() != NULL) {
    1.19 +  if (mdh != NULL) {
    1.20      mdo_invocations = mdh->invocation_count();
    1.21      mdo_backedges = mdh->backedge_count();
    1.22      mdo_invocations_start = mdh->invocation_count_start();
    1.23 @@ -147,10 +147,10 @@
    1.24  }
    1.25  
    1.26  // Set carry flags on the counters if necessary
    1.27 -void SimpleThresholdPolicy::handle_counter_overflow(methodOop method) {
    1.28 +void SimpleThresholdPolicy::handle_counter_overflow(Method* method) {
    1.29    set_carry_if_necessary(method->invocation_counter());
    1.30    set_carry_if_necessary(method->backedge_counter());
    1.31 -  methodDataOop mdo = method->method_data();
    1.32 +  MethodData* mdo = method->method_data();
    1.33    if (mdo != NULL) {
    1.34      set_carry_if_necessary(mdo->invocation_counter());
    1.35      set_carry_if_necessary(mdo->backedge_counter());
    1.36 @@ -168,7 +168,7 @@
    1.37        methodHandle mh(sd->method());
    1.38        print_event(REPROFILE, mh, mh, InvocationEntryBci, CompLevel_none);
    1.39      }
    1.40 -    methodDataOop mdo = sd->method()->method_data();
    1.41 +    MethodData* mdo = sd->method()->method_data();
    1.42      if (mdo != NULL) {
    1.43        mdo->reset_start_counters();
    1.44      }
    1.45 @@ -272,9 +272,9 @@
    1.46  }
    1.47  
    1.48  // Determine is a method is mature.
    1.49 -bool SimpleThresholdPolicy::is_mature(methodOop method) {
    1.50 +bool SimpleThresholdPolicy::is_mature(Method* method) {
    1.51    if (is_trivial(method)) return true;
    1.52 -  methodDataOop mdo = method->method_data();
    1.53 +  MethodData* mdo = method->method_data();
    1.54    if (mdo != NULL) {
    1.55      int i = mdo->invocation_count();
    1.56      int b = mdo->backedge_count();
    1.57 @@ -286,7 +286,7 @@
    1.58  }
    1.59  
    1.60  // Common transition function. Given a predicate determines if a method should transition to another level.
    1.61 -CompLevel SimpleThresholdPolicy::common(Predicate p, methodOop method, CompLevel cur_level) {
    1.62 +CompLevel SimpleThresholdPolicy::common(Predicate p, Method* method, CompLevel cur_level) {
    1.63    CompLevel next_level = cur_level;
    1.64    int i = method->invocation_count();
    1.65    int b = method->backedge_count();
    1.66 @@ -306,7 +306,7 @@
    1.67      case CompLevel_limited_profile:
    1.68      case CompLevel_full_profile:
    1.69        {
    1.70 -        methodDataOop mdo = method->method_data();
    1.71 +        MethodData* mdo = method->method_data();
    1.72          if (mdo != NULL) {
    1.73            if (mdo->would_profile()) {
    1.74              int mdo_i = mdo->invocation_count_delta();
    1.75 @@ -326,7 +326,7 @@
    1.76  }
    1.77  
    1.78  // Determine if a method should be compiled with a normal entry point at a different level.
    1.79 -CompLevel SimpleThresholdPolicy::call_event(methodOop method,  CompLevel cur_level) {
    1.80 +CompLevel SimpleThresholdPolicy::call_event(Method* method,  CompLevel cur_level) {
    1.81    CompLevel osr_level = MIN2((CompLevel) method->highest_osr_comp_level(),
    1.82                               common(&SimpleThresholdPolicy::loop_predicate, method, cur_level));
    1.83    CompLevel next_level = common(&SimpleThresholdPolicy::call_predicate, method, cur_level);
    1.84 @@ -335,7 +335,7 @@
    1.85    // equalized by raising the regular method level in order to avoid OSRs during each
    1.86    // invocation of the method.
    1.87    if (osr_level == CompLevel_full_optimization && cur_level == CompLevel_full_profile) {
    1.88 -    methodDataOop mdo = method->method_data();
    1.89 +    MethodData* mdo = method->method_data();
    1.90      guarantee(mdo != NULL, "MDO should not be NULL");
    1.91      if (mdo->invocation_count() >= 1) {
    1.92        next_level = CompLevel_full_optimization;
    1.93 @@ -348,7 +348,7 @@
    1.94  }
    1.95  
    1.96  // Determine if we should do an OSR compilation of a given method.
    1.97 -CompLevel SimpleThresholdPolicy::loop_event(methodOop method, CompLevel cur_level) {
    1.98 +CompLevel SimpleThresholdPolicy::loop_event(Method* method, CompLevel cur_level) {
    1.99    CompLevel next_level = common(&SimpleThresholdPolicy::loop_predicate, method, cur_level);
   1.100    if (cur_level == CompLevel_none) {
   1.101      // If there is a live OSR method that means that we deopted to the interpreter

mercurial