< prev index next >

src/hotspot/share/runtime/advancedThresholdPolicy.cpp

Print this page




   8  *
   9  * This code is distributed in the hope that it will be useful, but WITHOUT
  10  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  11  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  12  * version 2 for more details (a copy is included in the LICENSE file that
  13  * accompanied this code).
  14  *
  15  * You should have received a copy of the GNU General Public License version
  16  * 2 along with this work; if not, write to the Free Software Foundation,
  17  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  18  *
  19  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  20  * or visit www.oracle.com if you need additional information or have any
  21  * questions.
  22  *
  23  */
  24 
  25 #include "precompiled.hpp"
  26 #include "code/codeCache.hpp"
  27 #include "runtime/advancedThresholdPolicy.hpp"

  28 #include "runtime/simpleThresholdPolicy.inline.hpp"
  29 #if INCLUDE_JVMCI
  30 #include "jvmci/jvmciRuntime.hpp"
  31 #endif
  32 
  33 #ifdef TIERED
  34 // Print an event.
  35 void AdvancedThresholdPolicy::print_specific(EventType type, const methodHandle& mh, const methodHandle& imh,
  36                                              int bci, CompLevel level) {
  37   tty->print(" rate=");
  38   if (mh->prev_time() == 0) tty->print("n/a");
  39   else tty->print("%f", mh->rate());
  40 
  41   tty->print(" k=%.2lf,%.2lf", threshold_scale(CompLevel_full_profile, Tier3LoadFeedback),
  42                                threshold_scale(CompLevel_full_optimization, Tier4LoadFeedback));
  43 
  44 }
  45 
  46 void AdvancedThresholdPolicy::initialize() {
  47   int count = CICompilerCount;




   8  *
   9  * This code is distributed in the hope that it will be useful, but WITHOUT
  10  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  11  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  12  * version 2 for more details (a copy is included in the LICENSE file that
  13  * accompanied this code).
  14  *
  15  * You should have received a copy of the GNU General Public License version
  16  * 2 along with this work; if not, write to the Free Software Foundation,
  17  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  18  *
  19  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  20  * or visit www.oracle.com if you need additional information or have any
  21  * questions.
  22  *
  23  */
  24 
  25 #include "precompiled.hpp"
  26 #include "code/codeCache.hpp"
  27 #include "runtime/advancedThresholdPolicy.hpp"
  28 #include "runtime/handles.inline.hpp"
  29 #include "runtime/simpleThresholdPolicy.inline.hpp"
  30 #if INCLUDE_JVMCI
  31 #include "jvmci/jvmciRuntime.hpp"
  32 #endif
  33 
  34 #ifdef TIERED
  35 // Print an event.
  36 void AdvancedThresholdPolicy::print_specific(EventType type, const methodHandle& mh, const methodHandle& imh,
  37                                              int bci, CompLevel level) {
  38   tty->print(" rate=");
  39   if (mh->prev_time() == 0) tty->print("n/a");
  40   else tty->print("%f", mh->rate());
  41 
  42   tty->print(" k=%.2lf,%.2lf", threshold_scale(CompLevel_full_profile, Tier3LoadFeedback),
  43                                threshold_scale(CompLevel_full_optimization, Tier4LoadFeedback));
  44 
  45 }
  46 
  47 void AdvancedThresholdPolicy::initialize() {
  48   int count = CICompilerCount;


< prev index next >