Mercurial > hg > graal-compiler
comparison src/share/vm/c1/c1_Compilation.cpp @ 14422:2b8e28fdf503
Merge
author | kvn |
---|---|
date | Tue, 05 Nov 2013 17:38:04 -0800 |
parents | d13d7aba8c12 |
children | de6a9e811145 |
comparison
equal
deleted
inserted
replaced
14421:3068270ba476 | 14422:2b8e28fdf503 |
---|---|
72 | 72 |
73 class PhaseTraceTime: public TraceTime { | 73 class PhaseTraceTime: public TraceTime { |
74 private: | 74 private: |
75 JavaThread* _thread; | 75 JavaThread* _thread; |
76 CompileLog* _log; | 76 CompileLog* _log; |
77 TimerName _timer; | |
77 | 78 |
78 public: | 79 public: |
79 PhaseTraceTime(TimerName timer) | 80 PhaseTraceTime(TimerName timer) |
80 : TraceTime("", &timers[timer], CITime || CITimeEach, Verbose), _log(NULL) { | 81 : TraceTime("", &timers[timer], CITime || CITimeEach, Verbose), |
82 _log(NULL), _timer(timer) | |
83 { | |
81 if (Compilation::current() != NULL) { | 84 if (Compilation::current() != NULL) { |
82 _log = Compilation::current()->log(); | 85 _log = Compilation::current()->log(); |
83 } | 86 } |
84 | 87 |
85 if (_log != NULL) { | 88 if (_log != NULL) { |
86 _log->begin_head("phase name='%s'", timer_name[timer]); | 89 _log->begin_head("phase name='%s'", timer_name[_timer]); |
87 _log->stamp(); | 90 _log->stamp(); |
88 _log->end_head(); | 91 _log->end_head(); |
89 } | 92 } |
90 } | 93 } |
91 | 94 |
92 ~PhaseTraceTime() { | 95 ~PhaseTraceTime() { |
93 if (_log != NULL) | 96 if (_log != NULL) |
94 _log->done("phase"); | 97 _log->done("phase name='%s'", timer_name[_timer]); |
95 } | 98 } |
96 }; | 99 }; |
97 | 100 |
98 // Implementation of Compilation | 101 // Implementation of Compilation |
99 | 102 |
596 if (PrintCompilation || PrintBailouts) tty->print_cr("compilation bailout: %s", msg); | 599 if (PrintCompilation || PrintBailouts) tty->print_cr("compilation bailout: %s", msg); |
597 _bailout_msg = msg; | 600 _bailout_msg = msg; |
598 } | 601 } |
599 } | 602 } |
600 | 603 |
604 ciKlass* Compilation::cha_exact_type(ciType* type) { | |
605 if (type != NULL && type->is_loaded() && type->is_instance_klass()) { | |
606 ciInstanceKlass* ik = type->as_instance_klass(); | |
607 assert(ik->exact_klass() == NULL, "no cha for final klass"); | |
608 if (DeoptC1 && UseCHA && !(ik->has_subklass() || ik->is_interface())) { | |
609 dependency_recorder()->assert_leaf_type(ik); | |
610 return ik; | |
611 } | |
612 } | |
613 return NULL; | |
614 } | |
601 | 615 |
602 void Compilation::print_timers() { | 616 void Compilation::print_timers() { |
603 // tty->print_cr(" Native methods : %6.3f s, Average : %2.3f", CompileBroker::_t_native_compilation.seconds(), CompileBroker::_t_native_compilation.seconds() / CompileBroker::_total_native_compile_count); | 617 // tty->print_cr(" Native methods : %6.3f s, Average : %2.3f", CompileBroker::_t_native_compilation.seconds(), CompileBroker::_t_native_compilation.seconds() / CompileBroker::_total_native_compile_count); |
604 float total = timers[_t_setup].seconds() + timers[_t_buildIR].seconds() + timers[_t_emit_lir].seconds() + timers[_t_lir_schedule].seconds() + timers[_t_codeemit].seconds() + timers[_t_codeinstall].seconds(); | 618 float total = timers[_t_setup].seconds() + timers[_t_buildIR].seconds() + timers[_t_emit_lir].seconds() + timers[_t_lir_schedule].seconds() + timers[_t_codeemit].seconds() + timers[_t_codeinstall].seconds(); |
605 | 619 |