5 * This code is free software; you can redistribute it and/or modify it 6 * under the terms of the GNU General Public License version 2 only, as 7 * published by the Free Software Foundation. 8 * 9 * This code is distributed in the hope that it will be useful, but WITHOUT 10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 12 * version 2 for more details (a copy is included in the LICENSE file that 13 * accompanied this code). 14 * 15 * You should have received a copy of the GNU General Public License version 16 * 2 along with this work; if not, write to the Free Software Foundation, 17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 18 * 19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 20 * or visit www.oracle.com if you need additional information or have any 21 * questions. 22 * 23 */ 24 25 # include "incls/_precompiled.incl" 26 # include "incls/_methodDataOop.cpp.incl" 27 28 // ================================================================== 29 // DataLayout 30 // 31 // Overlay for generic profiling data. 32 33 // Some types of data layouts need a length field. 34 bool DataLayout::needs_array_len(u1 tag) { 35 return (tag == multi_branch_data_tag) || (tag == arg_info_data_tag); 36 } 37 38 // Perform generic initialization of the data. More specific 39 // initialization occurs in overrides of ProfileData::post_initialize. 40 void DataLayout::initialize(u1 tag, u2 bci, int cell_count) { 41 _header._bits = (intptr_t)0; 42 _header._struct._tag = tag; 43 _header._struct._bci = bci; 44 for (int i = 0; i < cell_count; i++) { 45 set_cell_at(i, (intptr_t)0); 46 } | 5 * This code is free software; you can redistribute it and/or modify it 6 * under the terms of the GNU General Public License version 2 only, as 7 * published by the Free Software Foundation. 8 * 9 * This code is distributed in the hope that it will be useful, but WITHOUT 10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 12 * version 2 for more details (a copy is included in the LICENSE file that 13 * accompanied this code). 14 * 15 * You should have received a copy of the GNU General Public License version 16 * 2 along with this work; if not, write to the Free Software Foundation, 17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 18 * 19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 20 * or visit www.oracle.com if you need additional information or have any 21 * questions. 22 * 23 */ 24 25 #include "precompiled.hpp" 26 #include "classfile/systemDictionary.hpp" 27 #include "gc_implementation/shared/markSweep.inline.hpp" 28 #include "interpreter/bytecode.hpp" 29 #include "interpreter/bytecodeStream.hpp" 30 #include "interpreter/linkResolver.hpp" 31 #include "oops/methodDataOop.hpp" 32 #include "oops/oop.inline.hpp" 33 #include "runtime/compilationPolicy.hpp" 34 #include "runtime/deoptimization.hpp" 35 #include "runtime/handles.inline.hpp" 36 37 // ================================================================== 38 // DataLayout 39 // 40 // Overlay for generic profiling data. 41 42 // Some types of data layouts need a length field. 43 bool DataLayout::needs_array_len(u1 tag) { 44 return (tag == multi_branch_data_tag) || (tag == arg_info_data_tag); 45 } 46 47 // Perform generic initialization of the data. More specific 48 // initialization occurs in overrides of ProfileData::post_initialize. 49 void DataLayout::initialize(u1 tag, u2 bci, int cell_count) { 50 _header._bits = (intptr_t)0; 51 _header._struct._tag = tag; 52 _header._struct._bci = bci; 53 for (int i = 0; i < cell_count; i++) { 54 set_cell_at(i, (intptr_t)0); 55 } |