Skip to content

Commit 473251d

Browse files
Cesar Soares LucasTobiHartmann
authored andcommitted
8353593: MethodData "mileage_*" methods and fields aren't used and can be removed
Reviewed-by: phh, thartmann
1 parent 743d1c6 commit 473251d

File tree

2 files changed

+2
-15
lines changed

2 files changed

+2
-15
lines changed

src/hotspot/share/oops/methodData.cpp

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1257,7 +1257,6 @@ void MethodData::initialize() {
12571257
ResourceMark rm(thread);
12581258

12591259
init();
1260-
set_creation_mileage(mileage_of(method()));
12611260

12621261
// Go through the bytecodes and allocate and initialize the
12631262
// corresponding data cells.
@@ -1364,11 +1363,6 @@ void MethodData::init() {
13641363
clear_escape_info();
13651364
}
13661365

1367-
// Get a measure of how much mileage the method has on it.
1368-
int MethodData::mileage_of(Method* method) {
1369-
return MAX2(method->invocation_count(), method->backedge_count());
1370-
}
1371-
13721366
bool MethodData::is_mature() const {
13731367
return CompilationPolicy::is_mature(_method);
13741368
}

src/hotspot/share/oops/methodData.hpp

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -56,8 +56,7 @@ class BytecodeStream;
5656
// counter overflow, multiprocessor races during data collection, space
5757
// limitations, missing MDO blocks, etc. Bad or missing data will degrade
5858
// optimization quality but will not affect correctness. Also, each MDO
59-
// is marked with its birth-date ("creation_mileage") which can be used
60-
// to assess the quality ("maturity") of its data.
59+
// can be checked for its "maturity" by calling is_mature().
6160
//
6261
// Short (<32-bit) counters are designed to overflow to a known "saturated"
6362
// state. Also, certain recorded per-BCI events are given one-bit counters
@@ -2061,8 +2060,6 @@ class MethodData : public Metadata {
20612060
intx _arg_stack; // bit set of stack-allocatable arguments
20622061
intx _arg_returned; // bit set of returned arguments
20632062

2064-
int _creation_mileage; // method mileage at MDO creation
2065-
20662063
// How many invocations has this MDO seen?
20672064
// These counters are used to determine the exact age of MDO.
20682065
// We need those because in tiered a method can be concurrently
@@ -2225,9 +2222,6 @@ class MethodData : public Metadata {
22252222
int size_in_bytes() const { return _size; }
22262223
int size() const { return align_metadata_size(align_up(_size, BytesPerWord)/BytesPerWord); }
22272224

2228-
int creation_mileage() const { return _creation_mileage; }
2229-
void set_creation_mileage(int x) { _creation_mileage = x; }
2230-
22312225
int invocation_count() {
22322226
if (invocation_counter()->carry()) {
22332227
return InvocationCounter::count_limit;
@@ -2280,8 +2274,7 @@ class MethodData : public Metadata {
22802274
int num_blocks() const { return _num_blocks; }
22812275
void set_num_blocks(short n) { _num_blocks = n; }
22822276

2283-
bool is_mature() const; // consult mileage and ProfileMaturityPercentage
2284-
static int mileage_of(Method* m);
2277+
bool is_mature() const;
22852278

22862279
// Support for interprocedural escape analysis, from Thomas Kotzmann.
22872280
enum EscapeFlag {

0 commit comments

Comments
 (0)