comparison src/share/vm/opto/compile.hpp @ 14442:1174c8abbdb6

Merge
author kvn
date Thu, 05 Dec 2013 15:13:12 -0800
parents 41b780b43b74 86e6d691f2e1
children ad6695638a35
comparison
equal deleted inserted replaced
14441:e7cbc95179c4 14442:1174c8abbdb6
40 #include "opto/phase.hpp" 40 #include "opto/phase.hpp"
41 #include "opto/regmask.hpp" 41 #include "opto/regmask.hpp"
42 #include "runtime/deoptimization.hpp" 42 #include "runtime/deoptimization.hpp"
43 #include "runtime/vmThread.hpp" 43 #include "runtime/vmThread.hpp"
44 #include "trace/tracing.hpp" 44 #include "trace/tracing.hpp"
45 #include "utilities/ticks.hpp"
45 46
46 class Block; 47 class Block;
47 class Bundle; 48 class Bundle;
48 class C2Compiler; 49 class C2Compiler;
49 class CallGenerator; 50 class CallGenerator;
596 597
597 // JSR 292 598 // JSR 292
598 bool has_method_handle_invokes() const { return _has_method_handle_invokes; } 599 bool has_method_handle_invokes() const { return _has_method_handle_invokes; }
599 void set_has_method_handle_invokes(bool z) { _has_method_handle_invokes = z; } 600 void set_has_method_handle_invokes(bool z) { _has_method_handle_invokes = z; }
600 601
601 jlong _latest_stage_start_counter; 602 Ticks _latest_stage_start_counter;
602 603
603 void begin_method() { 604 void begin_method() {
604 #ifndef PRODUCT 605 #ifndef PRODUCT
605 if (_printer) _printer->begin_method(this); 606 if (_printer) _printer->begin_method(this);
606 #endif 607 #endif
607 C->_latest_stage_start_counter = os::elapsed_counter(); 608 C->_latest_stage_start_counter.stamp();
608 } 609 }
609 610
610 void print_method(CompilerPhaseType cpt, int level = 1) { 611 void print_method(CompilerPhaseType cpt, int level = 1) {
611 EventCompilerPhase event(UNTIMED); 612 EventCompilerPhase event;
612 if (event.should_commit()) { 613 if (event.should_commit()) {
613 event.set_starttime(C->_latest_stage_start_counter); 614 event.set_starttime(C->_latest_stage_start_counter);
614 event.set_endtime(os::elapsed_counter());
615 event.set_phase((u1) cpt); 615 event.set_phase((u1) cpt);
616 event.set_compileID(C->_compile_id); 616 event.set_compileID(C->_compile_id);
617 event.set_phaseLevel(level); 617 event.set_phaseLevel(level);
618 event.commit(); 618 event.commit();
619 } 619 }
620 620
621 621
622 #ifndef PRODUCT 622 #ifndef PRODUCT
623 if (_printer) _printer->print_method(this, CompilerPhaseTypeHelper::to_string(cpt), level); 623 if (_printer) _printer->print_method(this, CompilerPhaseTypeHelper::to_string(cpt), level);
624 #endif 624 #endif
625 C->_latest_stage_start_counter = os::elapsed_counter(); 625 C->_latest_stage_start_counter.stamp();
626 } 626 }
627 627
628 void end_method(int level = 1) { 628 void end_method(int level = 1) {
629 EventCompilerPhase event(UNTIMED); 629 EventCompilerPhase event;
630 if (event.should_commit()) { 630 if (event.should_commit()) {
631 event.set_starttime(C->_latest_stage_start_counter); 631 event.set_starttime(C->_latest_stage_start_counter);
632 event.set_endtime(os::elapsed_counter());
633 event.set_phase((u1) PHASE_END); 632 event.set_phase((u1) PHASE_END);
634 event.set_compileID(C->_compile_id); 633 event.set_compileID(C->_compile_id);
635 event.set_phaseLevel(level); 634 event.set_phaseLevel(level);
636 event.commit(); 635 event.commit();
637 } 636 }