8058184: Move _highest_comp_level and _highest_osr_comp_level from MethodData to MethodCounters

Tiered policy requires highest compilation levels always available

Reviewed-by: kvn, vlivanov
This commit is contained in:
Igor Veresov 2014-09-11 00:04:50 -07:00
parent 7275456c3a
commit 6dc6f53f6a
5 changed files with 58 additions and 24 deletions

View file

@ -49,6 +49,8 @@ class MethodCounters: public MetaspaceObj {
#ifdef TIERED
float _rate; // Events (invocation and backedge counter increments) per millisecond
jlong _prev_time; // Previous time the rate was acquired
u1 _highest_comp_level; // Highest compile level this method has ever seen.
u1 _highest_osr_comp_level; // Same for OSR level
#endif
MethodCounters() : _interpreter_invocation_count(0),
@ -57,7 +59,9 @@ class MethodCounters: public MetaspaceObj {
_nmethod_age(INT_MAX)
#ifdef TIERED
, _rate(0),
_prev_time(0)
_prev_time(0),
_highest_comp_level(0),
_highest_osr_comp_level(0)
#endif
{
invocation_counter()->init();
@ -114,6 +118,11 @@ class MethodCounters: public MetaspaceObj {
void set_rate(float rate) { _rate = rate; }
#endif
int highest_comp_level() const;
void set_highest_comp_level(int level);
int highest_osr_comp_level() const;
void set_highest_osr_comp_level(int level);
// invocation counter
InvocationCounter* invocation_counter() { return &_invocation_counter; }
InvocationCounter* backedge_counter() { return &_backedge_counter; }