0 /*
1 * Copyright (c) 2001, 2015, Oracle and/or its affiliates. All rights reserved.
2 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3 *
4 * This code is free software; you can redistribute it and/or modify it
5 * under the terms of the GNU General Public License version 2 only, as
6 * published by the Free Software Foundation.
7 *
8 * This code is distributed in the hope that it will be useful, but WITHOUT
9 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
10 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
11 * version 2 for more details (a copy is included in the LICENSE file that
12 * accompanied this code).
13 *
14 * You should have received a copy of the GNU General Public License version
15 * 2 along with this work; if not, write to the Free Software Foundation,
16 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
17 *
18 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
19 * or visit www.oracle.com if you need additional information or have any
20 * questions.
|
0 /*
1 * Copyright (c) 2001, 2018, Oracle and/or its affiliates. All rights reserved.
2 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3 *
4 * This code is free software; you can redistribute it and/or modify it
5 * under the terms of the GNU General Public License version 2 only, as
6 * published by the Free Software Foundation.
7 *
8 * This code is distributed in the hope that it will be useful, but WITHOUT
9 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
10 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
11 * version 2 for more details (a copy is included in the LICENSE file that
12 * accompanied this code).
13 *
14 * You should have received a copy of the GNU General Public License version
15 * 2 along with this work; if not, write to the Free Software Foundation,
16 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
17 *
18 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
19 * or visit www.oracle.com if you need additional information or have any
20 * questions.
|
737
738 // SP when bytecode needs to be reexecuted.
739 virtual int reexecute_sp() { return sp(); }
740
741 // Report if there were too many traps at the current method and bci.
742 // Report if a trap was recorded, and/or PerMethodTrapLimit was exceeded.
743 // If there is no MDO at all, report no trap unless told to assume it.
744 bool too_many_traps(Deoptimization::DeoptReason reason) {
745 return C->too_many_traps(method(), bci(), reason);
746 }
747
748 // Report if there were too many recompiles at the current method and bci.
749 bool too_many_recompiles(Deoptimization::DeoptReason reason) {
750 return C->too_many_recompiles(method(), bci(), reason);
751 }
752
753 // Returns the object (if any) which was created the moment before.
754 Node* just_allocated_object(Node* current_control);
755
756 static bool use_ReduceInitialCardMarks() {
757 return (ReduceInitialCardMarks
758 && Universe::heap()->can_elide_tlab_store_barriers());
759 }
760
761 // Sync Ideal and Graph kits.
762 void sync_kit(IdealKit& ideal);
763 void final_sync(IdealKit& ideal);
764
765 // vanilla/CMS post barrier
766 void write_barrier_post(Node *store, Node* obj,
767 Node* adr, uint adr_idx, Node* val, bool use_precise);
768
769 // Allow reordering of pre-barrier with oop store and/or post-barrier.
770 // Used for load_store operations which loads old value.
771 bool can_move_pre_barrier() const;
772
773 // G1 pre/post barriers
774 void g1_write_barrier_pre(bool do_load,
775 Node* obj,
776 Node* adr,
777 uint alias_idx,
|
737
738 // SP when bytecode needs to be reexecuted.
739 virtual int reexecute_sp() { return sp(); }
740
741 // Report if there were too many traps at the current method and bci.
742 // Report if a trap was recorded, and/or PerMethodTrapLimit was exceeded.
743 // If there is no MDO at all, report no trap unless told to assume it.
744 bool too_many_traps(Deoptimization::DeoptReason reason) {
745 return C->too_many_traps(method(), bci(), reason);
746 }
747
748 // Report if there were too many recompiles at the current method and bci.
749 bool too_many_recompiles(Deoptimization::DeoptReason reason) {
750 return C->too_many_recompiles(method(), bci(), reason);
751 }
752
753 // Returns the object (if any) which was created the moment before.
754 Node* just_allocated_object(Node* current_control);
755
756 static bool use_ReduceInitialCardMarks() {
757 BarrierSet *bs = Universe::heap()->barrier_set();
758 return bs->is_a(BarrierSet::CardTableModRef)
759 && barrier_set_cast<CardTableModRefBS>(bs)->can_elide_tlab_store_barriers()
760 && ReduceInitialCardMarks;
761 }
762
763 // Sync Ideal and Graph kits.
764 void sync_kit(IdealKit& ideal);
765 void final_sync(IdealKit& ideal);
766
767 // vanilla/CMS post barrier
768 void write_barrier_post(Node *store, Node* obj,
769 Node* adr, uint adr_idx, Node* val, bool use_precise);
770
771 // Allow reordering of pre-barrier with oop store and/or post-barrier.
772 // Used for load_store operations which loads old value.
773 bool can_move_pre_barrier() const;
774
775 // G1 pre/post barriers
776 void g1_write_barrier_pre(bool do_load,
777 Node* obj,
778 Node* adr,
779 uint alias_idx,
|