@@ -1974,7 +1974,6 @@ class MethodData : public Metadata {
19741974 friend class VMStructs ;
19751975 friend class JVMCIVMStructs ;
19761976
1977- int _creation_mileage; // method mileage at MDO creation
19781977 uint _nof_decompiles; // count of all nmethod removals
19791978 uint _nof_overflow_recompiles; // recompile count, excluding recomp. bits
19801979 uint _nof_overflow_traps; // trap count, excluding _trap_hist
@@ -1983,16 +1982,12 @@ class MethodData : public Metadata {
19831982 u1 _array[JVMCI_ONLY (2 *) MethodData::_trap_hist_limit];
19841983 } _trap_hist;
19851984
1986- CompilerCounters (int current_mileage) : _creation_mileage(current_mileage), _nof_decompiles(0 ), _nof_overflow_recompiles(0 ), _nof_overflow_traps(0 ) {
1985+ public:
1986+ CompilerCounters () : _nof_decompiles(0 ), _nof_overflow_recompiles(0 ), _nof_overflow_traps(0 ) {
19871987 static_assert (sizeof (_trap_hist) % HeapWordSize == 0 , " align" );
19881988 uint size_in_words = sizeof (_trap_hist) / HeapWordSize;
19891989 Copy::zero_to_words ((HeapWord*) &_trap_hist, size_in_words);
19901990 }
1991- public:
1992- CompilerCounters (Method* m) : CompilerCounters(MethodData::mileage_of(m)) {}
1993- CompilerCounters () : CompilerCounters(0 ) {} // for ciMethodData
1994-
1995- int creation_mileage () const { return _creation_mileage; }
19961991
19971992 // Return (uint)-1 for overflow.
19981993 uint trap_count (int reason) const {
@@ -2044,6 +2039,8 @@ class MethodData : public Metadata {
20442039 intx _arg_stack; // bit set of stack-allocatable arguments
20452040 intx _arg_returned; // bit set of returned arguments
20462041
2042+ int _creation_mileage; // method mileage at MDO creation
2043+
20472044 // How many invocations has this MDO seen?
20482045 // These counters are used to determine the exact age of MDO.
20492046 // We need those because in tiered a method can be concurrently
@@ -2188,7 +2185,8 @@ class MethodData : public Metadata {
21882185 int size_in_bytes () const { return _size; }
21892186 int size () const { return align_metadata_size (align_up (_size, BytesPerWord)/BytesPerWord); }
21902187
2191- int creation_mileage () const { return _compiler_counters.creation_mileage (); }
2188+ int creation_mileage () const { return _creation_mileage; }
2189+ void set_creation_mileage (int x) { _creation_mileage = x; }
21922190
21932191 int invocation_count () {
21942192 if (invocation_counter ()->carry ()) {
0 commit comments