6953144: Tiered compilation

Infrastructure for tiered compilation support (interpreter + c1 + c2) for 32 and 64 bit. Simple tiered policy implementation.

Reviewed-by: kvn, never, phh, twisti
This commit is contained in:
Igor Veresov 2010-09-03 17:51:07 -07:00
parent 6e78f6cb4b
commit 2c66a6c3fd
104 changed files with 7720 additions and 1701 deletions

View file

@ -1,5 +1,5 @@
/*
* Copyright (c) 1997, 2006, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -43,7 +43,6 @@ class InvocationCounter VALUE_OBJ_CLASS_SPEC {
number_of_count_bits = BitsPerInt - number_of_noncount_bits,
state_limit = nth_bit(number_of_state_bits),
count_grain = nth_bit(number_of_state_bits + number_of_carry_bits),
count_limit = nth_bit(number_of_count_bits - 1),
carry_mask = right_n_bits(number_of_carry_bits) << number_of_state_bits,
state_mask = right_n_bits(number_of_state_bits),
status_mask = right_n_bits(number_of_state_bits + number_of_carry_bits),
@ -52,18 +51,16 @@ class InvocationCounter VALUE_OBJ_CLASS_SPEC {
public:
static int InterpreterInvocationLimit; // CompileThreshold scaled for interpreter use
static int Tier1InvocationLimit; // CompileThreshold scaled for tier1 use
static int Tier1BackEdgeLimit; // BackEdgeThreshold scaled for tier1 use
static int InterpreterBackwardBranchLimit; // A separate threshold for on stack replacement
static int InterpreterProfileLimit; // Profiling threshold scaled for interpreter use
typedef address (*Action)(methodHandle method, TRAPS);
enum PublicConstants {
count_increment = count_grain, // use this value to increment the 32bit _counter word
count_mask_value = count_mask // use this value to mask the backedge counter
count_mask_value = count_mask, // use this value to mask the backedge counter
count_shift = number_of_noncount_bits,
count_limit = nth_bit(number_of_count_bits - 1)
};
enum State {
@ -79,6 +76,7 @@ class InvocationCounter VALUE_OBJ_CLASS_SPEC {
inline void set(State state, int count); // sets state and counter
inline void decay(); // decay counter (divide by two)
void set_carry(); // set the sticky carry bit
void set_carry_flag() { _counter |= carry_mask; }
// Accessors
State state() const { return (State)(_counter & state_mask); }
@ -135,3 +133,4 @@ inline void InvocationCounter::decay() {
if (c > 0 && new_count == 0) new_count = 1;
set(state(), new_count);
}