comparison src/share/vm/opto/compile.cpp @ 17795:a9becfeecd1b

Merge
author kvn
date Wed, 22 Jan 2014 17:42:23 -0800
parents 849eb7bfceac 41b780b43b74
children 45467c53f178
comparison
equal deleted inserted replaced
17794:3514ee402842 17795:a9becfeecd1b
23 */ 23 */
24 24
25 #include "precompiled.hpp" 25 #include "precompiled.hpp"
26 #include "asm/macroAssembler.hpp" 26 #include "asm/macroAssembler.hpp"
27 #include "asm/macroAssembler.inline.hpp" 27 #include "asm/macroAssembler.inline.hpp"
28 #include "ci/ciReplay.hpp"
28 #include "classfile/systemDictionary.hpp" 29 #include "classfile/systemDictionary.hpp"
29 #include "code/exceptionHandlerTable.hpp" 30 #include "code/exceptionHandlerTable.hpp"
30 #include "code/nmethod.hpp" 31 #include "code/nmethod.hpp"
31 #include "compiler/compileLog.hpp" 32 #include "compiler/compileLog.hpp"
32 #include "compiler/disassembler.hpp" 33 #include "compiler/disassembler.hpp"
649 _trace_opto_output(TraceOptoOutput || method()->has_option("TraceOptoOutput")), 650 _trace_opto_output(TraceOptoOutput || method()->has_option("TraceOptoOutput")),
650 _in_dump_cnt(0), 651 _in_dump_cnt(0),
651 _printer(IdealGraphPrinter::printer()), 652 _printer(IdealGraphPrinter::printer()),
652 #endif 653 #endif
653 _congraph(NULL), 654 _congraph(NULL),
655 _replay_inline_data(NULL),
654 _late_inlines(comp_arena(), 2, 0, NULL), 656 _late_inlines(comp_arena(), 2, 0, NULL),
655 _string_late_inlines(comp_arena(), 2, 0, NULL), 657 _string_late_inlines(comp_arena(), 2, 0, NULL),
656 _boxing_late_inlines(comp_arena(), 2, 0, NULL), 658 _boxing_late_inlines(comp_arena(), 2, 0, NULL),
657 _late_inlines_pos(0), 659 _late_inlines_pos(0),
658 _number_of_mh_late_inlines(0), 660 _number_of_mh_late_inlines(0),
682 print_opto_assembly = true; 684 print_opto_assembly = true;
683 } 685 }
684 } 686 }
685 set_print_assembly(print_opto_assembly); 687 set_print_assembly(print_opto_assembly);
686 set_parsed_irreducible_loop(false); 688 set_parsed_irreducible_loop(false);
689
690 if (method()->has_option("ReplayInline")) {
691 _replay_inline_data = ciReplay::load_inline_data(method(), entry_bci(), ci_env->comp_level());
692 }
687 #endif 693 #endif
688 set_print_inlining(PrintInlining || method()->has_option("PrintInlining") NOT_PRODUCT( || PrintOptoInlining)); 694 set_print_inlining(PrintInlining || method()->has_option("PrintInlining") NOT_PRODUCT( || PrintOptoInlining));
689 set_print_intrinsics(PrintIntrinsics || method()->has_option("PrintIntrinsics")); 695 set_print_intrinsics(PrintIntrinsics || method()->has_option("PrintIntrinsics"));
690 696
691 if (ProfileTraps) { 697 if (ProfileTraps) {
851 } 857 }
852 } 858 }
853 #endif 859 #endif
854 860
855 NOT_PRODUCT( verify_barriers(); ) 861 NOT_PRODUCT( verify_barriers(); )
862
863 // Dump compilation data to replay it.
864 if (method()->has_option("DumpReplay")) {
865 env()->dump_replay_data(_compile_id);
866 }
867 if (method()->has_option("DumpInline") && (ilt() != NULL)) {
868 env()->dump_inline_data(_compile_id);
869 }
870
856 // Now that we know the size of all the monitors we can add a fixed slot 871 // Now that we know the size of all the monitors we can add a fixed slot
857 // for the original deopt pc. 872 // for the original deopt pc.
858 873
859 _orig_pc_slot = fixed_slots(); 874 _orig_pc_slot = fixed_slots();
860 int next_slot = _orig_pc_slot + (sizeof(address) / VMRegImpl::stack_slot_size); 875 int next_slot = _orig_pc_slot + (sizeof(address) / VMRegImpl::stack_slot_size);
945 _printer(NULL), 960 _printer(NULL),
946 #endif 961 #endif
947 _dead_node_list(comp_arena()), 962 _dead_node_list(comp_arena()),
948 _dead_node_count(0), 963 _dead_node_count(0),
949 _congraph(NULL), 964 _congraph(NULL),
965 _replay_inline_data(NULL),
950 _number_of_mh_late_inlines(0), 966 _number_of_mh_late_inlines(0),
951 _inlining_progress(false), 967 _inlining_progress(false),
952 _inlining_incrementally(false), 968 _inlining_incrementally(false),
953 _print_inlining_list(NULL), 969 _print_inlining_list(NULL),
954 _print_inlining_idx(0), 970 _print_inlining_idx(0),
3784 tty->print(_print_inlining_list->adr_at(i)->ss()->as_string()); 3800 tty->print(_print_inlining_list->adr_at(i)->ss()->as_string());
3785 } 3801 }
3786 } 3802 }
3787 } 3803 }
3788 3804
3805 // Dump inlining replay data to the stream.
3806 // Don't change thread state and acquire any locks.
3807 void Compile::dump_inline_data(outputStream* out) {
3808 InlineTree* inl_tree = ilt();
3809 if (inl_tree != NULL) {
3810 out->print(" inline %d", inl_tree->count());
3811 inl_tree->dump_replay_data(out);
3812 }
3813 }
3814
3789 int Compile::cmp_expensive_nodes(Node* n1, Node* n2) { 3815 int Compile::cmp_expensive_nodes(Node* n1, Node* n2) {
3790 if (n1->Opcode() < n2->Opcode()) return -1; 3816 if (n1->Opcode() < n2->Opcode()) return -1;
3791 else if (n1->Opcode() > n2->Opcode()) return 1; 3817 else if (n1->Opcode() > n2->Opcode()) return 1;
3792 3818
3793 assert(n1->req() == n2->req(), err_msg_res("can't compare %s nodes: n1->req() = %d, n2->req() = %d", NodeClassNames[n1->Opcode()], n1->req(), n2->req())); 3819 assert(n1->req() == n2->req(), err_msg_res("can't compare %s nodes: n1->req() = %d, n2->req() = %d", NodeClassNames[n1->Opcode()], n1->req(), n2->req()));