Skip to content
This repository has been archived by the owner. It is now read-only.
Permalink
Browse files
8251303: C2: remove unused _site_invoke_ratio and related code from I…
…nlineTree

Reviewed-by: vlivanov, thartmann
  • Loading branch information
Charlie Gracie authored and Vladimir Ivanov committed Aug 10, 2020
1 parent 1408a8f commit 14bc361d40117fe7653050bca6628ad37ba7fbaa
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 24 deletions.
@@ -42,13 +42,12 @@
InlineTree::InlineTree(Compile* c,
const InlineTree *caller_tree, ciMethod* callee,
JVMState* caller_jvms, int caller_bci,
float site_invoke_ratio, int max_inline_level) :
int max_inline_level) :
C(c),
_caller_jvms(caller_jvms),
_method(callee),
_caller_tree((InlineTree*) caller_tree),
_count_inline_bcs(method()->code_size_for_inlining()),
_site_invoke_ratio(site_invoke_ratio),
_max_inline_level(max_inline_level),
_subtrees(c->comp_arena(), 2, 0, NULL),
_msg(NULL)
@@ -646,21 +645,8 @@ WarmCallInfo* InlineTree::ok_to_inline(ciMethod* callee_method, JVMState* jvms,
return NULL;
}

//------------------------------compute_callee_frequency-----------------------
float InlineTree::compute_callee_frequency( int caller_bci ) const {
int count = method()->interpreter_call_site_count(caller_bci);
int invcnt = method()->interpreter_invocation_count();
float freq = (float)count/(float)invcnt;
// Call-site count / interpreter invocation count, scaled recursively.
// Always between 0.0 and 1.0. Represents the percentage of the method's
// total execution time used at this call site.

return freq;
}

//------------------------------build_inline_tree_for_callee-------------------
InlineTree *InlineTree::build_inline_tree_for_callee( ciMethod* callee_method, JVMState* caller_jvms, int caller_bci) {
float recur_frequency = _site_invoke_ratio * compute_callee_frequency(caller_bci);
// Attempt inlining.
InlineTree* old_ilt = callee_at(caller_bci, callee_method);
if (old_ilt != NULL) {
@@ -685,7 +671,7 @@ InlineTree *InlineTree::build_inline_tree_for_callee( ciMethod* callee_method, J
}
}
// Allocate in the comp_arena to make sure the InlineTree is live when dumping a replay compilation file
InlineTree* ilt = new (C->comp_arena()) InlineTree(C, this, callee_method, caller_jvms, caller_bci, recur_frequency, _max_inline_level + max_inline_level_adjust);
InlineTree* ilt = new (C->comp_arena()) InlineTree(C, this, callee_method, caller_jvms, caller_bci, _max_inline_level + max_inline_level_adjust);
_subtrees.append(ilt);

NOT_PRODUCT( _count_inlines += 1; )
@@ -711,7 +697,7 @@ InlineTree *InlineTree::build_inline_tree_root() {
Compile* C = Compile::current();

// Root of inline tree
InlineTree* ilt = new InlineTree(C, NULL, C->method(), NULL, -1, 1.0F, MaxInlineLevel);
InlineTree* ilt = new InlineTree(C, NULL, C->method(), NULL, -1, MaxInlineLevel);

return ilt;
}
@@ -48,12 +48,7 @@ class InlineTree : public ResourceObj {
ciMethod* _method; // method being called by the caller_jvms
InlineTree* _caller_tree;
uint _count_inline_bcs; // Accumulated count of inlined bytecodes
// Call-site count / interpreter invocation count, scaled recursively.
// Always between 0.0 and 1.0. Represents the percentage of the method's
// total execution time used at this call site.
const float _site_invoke_ratio;
const int _max_inline_level; // the maximum inline level for this sub-tree (may be adjusted)
float compute_callee_frequency( int caller_bci ) const;

GrowableArray<InlineTree*> _subtrees;

@@ -67,7 +62,6 @@ class InlineTree : public ResourceObj {
ciMethod* callee_method,
JVMState* caller_jvms,
int caller_bci,
float site_invoke_ratio,
int max_inline_level);
InlineTree *build_inline_tree_for_callee(ciMethod* callee_method,
JVMState* caller_jvms,
@@ -125,7 +119,6 @@ class InlineTree : public ResourceObj {
ciMethod *method() const { return _method; }
int caller_bci() const { return _caller_jvms ? _caller_jvms->bci() : InvocationEntryBci; }
uint count_inline_bcs() const { return _count_inline_bcs; }
float site_invoke_ratio() const { return _site_invoke_ratio; };

#ifndef PRODUCT
private:

0 comments on commit 14bc361

Please sign in to comment.