Skip to content

Commit 0425889

Browse files
author
Igor Veresov
committed
8255429: Remove C2-based profiling
Reviewed-by: kvn, neliasso, vlivanov
1 parent aaf4f69 commit 0425889

File tree

9 files changed

+40
-469
lines changed

9 files changed

+40
-469
lines changed

src/hotspot/share/opto/compile.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -929,8 +929,6 @@ void Compile::Init(int aliaslevel) {
929929
set_max_inline_size(MaxInlineSize);
930930
set_freq_inline_size(FreqInlineSize);
931931
set_do_scheduling(OptoScheduling);
932-
set_do_count_invocations(false);
933-
set_do_method_data_update(false);
934932

935933
set_do_vector_loop(false);
936934

src/hotspot/share/opto/compile.hpp

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -282,8 +282,6 @@ class Compile : public Phase {
282282
bool _do_inlining; // True if we intend to do inlining
283283
bool _do_scheduling; // True if we intend to do scheduling
284284
bool _do_freq_based_layout; // True if we intend to do frequency based block layout
285-
bool _do_count_invocations; // True if we generate code to count invocations
286-
bool _do_method_data_update; // True if we generate code to update MethodData*s
287285
bool _do_vector_loop; // True if allowed to execute loop in parallel iterations
288286
bool _use_cmove; // True if CMove should be used without profitability analysis
289287
bool _age_code; // True if we need to profile code age (decrement the aging counter)
@@ -571,10 +569,6 @@ class Compile : public Phase {
571569
void set_do_scheduling(bool z) { _do_scheduling = z; }
572570
bool do_freq_based_layout() const{ return _do_freq_based_layout; }
573571
void set_do_freq_based_layout(bool z){ _do_freq_based_layout = z; }
574-
bool do_count_invocations() const{ return _do_count_invocations; }
575-
void set_do_count_invocations(bool z){ _do_count_invocations = z; }
576-
bool do_method_data_update() const { return _do_method_data_update; }
577-
void set_do_method_data_update(bool z) { _do_method_data_update = z; }
578572
bool do_vector_loop() const { return _do_vector_loop; }
579573
void set_do_vector_loop(bool z) { _do_vector_loop = z; }
580574
bool use_cmove() const { return _use_cmove; }

src/hotspot/share/opto/doCall.cpp

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -643,10 +643,6 @@ void Parse::do_call() {
643643
receiver = record_profiled_receiver_for_speculation(receiver);
644644
}
645645

646-
// Bump method data counters (We profile *before* the call is made
647-
// because exceptions don't return to the call site.)
648-
profile_call(receiver);
649-
650646
JVMState* new_jvms = cg->generate(jvms);
651647
if (new_jvms == NULL) {
652648
// When inlining attempt fails (e.g., too many arguments),

src/hotspot/share/opto/parse.hpp

Lines changed: 3 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -330,8 +330,6 @@ class Parse : public GraphKit {
330330
bool _wrote_volatile; // Did we write a volatile field?
331331
bool _wrote_stable; // Did we write a @Stable field?
332332
bool _wrote_fields; // Did we write any field?
333-
bool _count_invocations; // update and test invocation counter
334-
bool _method_data_update; // update method data oop
335333
Node* _alloc_with_final; // An allocation node with final field
336334

337335
// Variables which track Java semantics during bytecode parsing:
@@ -377,8 +375,6 @@ class Parse : public GraphKit {
377375
void set_wrote_stable(bool z) { _wrote_stable = z; }
378376
bool wrote_fields() const { return _wrote_fields; }
379377
void set_wrote_fields(bool z) { _wrote_fields = z; }
380-
bool count_invocations() const { return _count_invocations; }
381-
bool method_data_update() const { return _method_data_update; }
382378
Node* alloc_with_final() const { return _alloc_with_final; }
383379
void set_alloc_with_final(Node* n) {
384380
assert((_alloc_with_final == NULL) || (_alloc_with_final == n), "different init objects?");
@@ -500,9 +496,6 @@ class Parse : public GraphKit {
500496
// Helper function to uncommon-trap or bailout for non-compilable call-sites
501497
bool can_not_compile_call_site(ciMethod *dest_method, ciInstanceKlass *klass);
502498

503-
// Helper function to setup for type-profile based inlining
504-
bool prepare_type_profile_inline(ciInstanceKlass* prof_klass, ciMethod* prof_method);
505-
506499
// Helper functions for type checking bytecodes:
507500
void do_checkcast();
508501
void do_instanceof();
@@ -555,9 +548,9 @@ class Parse : public GraphKit {
555548
void maybe_add_predicate_after_if(Block* path);
556549
IfNode* jump_if_fork_int(Node* a, Node* b, BoolTest::mask mask, float prob, float cnt);
557550
Node* jump_if_join(Node* iffalse, Node* iftrue);
558-
void jump_if_true_fork(IfNode *ifNode, int dest_bci_if_true, int prof_table_index, bool unc);
559-
void jump_if_false_fork(IfNode *ifNode, int dest_bci_if_false, int prof_table_index, bool unc);
560-
void jump_if_always_fork(int dest_bci_if_true, int prof_table_index, bool unc);
551+
void jump_if_true_fork(IfNode *ifNode, int dest_bci_if_true, bool unc);
552+
void jump_if_false_fork(IfNode *ifNode, int dest_bci_if_false, bool unc);
553+
void jump_if_always_fork(int dest_bci_if_true, bool unc);
561554

562555
friend class SwitchRange;
563556
void do_tableswitch();
@@ -567,23 +560,6 @@ class Parse : public GraphKit {
567560
void linear_search_switch_ranges(Node* key_val, SwitchRange*& lo, SwitchRange*& hi);
568561

569562
void decrement_age();
570-
// helper functions for methodData style profiling
571-
void test_counter_against_threshold(Node* cnt, int limit);
572-
void increment_and_test_invocation_counter(int limit);
573-
void test_for_osr_md_counter_at(ciMethodData* md, ciProfileData* data, ByteSize offset, int limit);
574-
Node* method_data_addressing(ciMethodData* md, ciProfileData* data, ByteSize offset, Node* idx = NULL, uint stride = 0);
575-
void increment_md_counter_at(ciMethodData* md, ciProfileData* data, ByteSize offset, Node* idx = NULL, uint stride = 0);
576-
void set_md_flag_at(ciMethodData* md, ciProfileData* data, int flag_constant);
577-
578-
void profile_method_entry();
579-
void profile_taken_branch(int target_bci, bool force_update = false);
580-
void profile_not_taken_branch(bool force_update = false);
581-
void profile_call(Node* receiver);
582-
void profile_generic_call();
583-
void profile_receiver_type(Node* receiver);
584-
void profile_ret(int target_bci);
585-
void profile_null_checkcast();
586-
void profile_switch_case(int table_index);
587563

588564
// helper function for call statistics
589565
void count_compiled_calls(bool at_method_entry, bool is_inline) PRODUCT_RETURN;

src/hotspot/share/opto/parse1.cpp

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -483,9 +483,6 @@ Parse::Parse(JVMState* caller, ciMethod* parse_method, float expected_uses)
483483
// Accumulate total sum of decompilations, also.
484484
C->set_decompile_count(C->decompile_count() + md->decompile_count());
485485

486-
_count_invocations = C->do_count_invocations();
487-
_method_data_update = C->do_method_data_update();
488-
489486
if (log != NULL && method()->has_exception_handlers()) {
490487
log->elem("observe that='has_exception_handlers'");
491488
}
@@ -1228,10 +1225,6 @@ void Parse::do_method_entry() {
12281225
// Feed profiling data for parameters to the type system so it can
12291226
// propagate it as speculative types
12301227
record_profiled_parameters_for_speculation();
1231-
1232-
if (depth() == 1) {
1233-
increment_and_test_invocation_counter(Tier2CompileThreshold);
1234-
}
12351228
}
12361229

12371230
//------------------------------init_blocks------------------------------------

0 commit comments

Comments
 (0)