1 /* |
1 /* |
2 * Copyright (c) 2000, 2014, Oracle and/or its affiliates. All rights reserved. |
2 * Copyright (c) 2000, 2018, Oracle and/or its affiliates. All rights reserved. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
4 * |
4 * |
5 * This code is free software; you can redistribute it and/or modify it |
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 |
6 * under the terms of the GNU General Public License version 2 only, as |
7 * published by the Free Software Foundation. |
7 * published by the Free Software Foundation. |
679 |
679 |
680 MethodData* MethodData::allocate(ClassLoaderData* loader_data, methodHandle method, TRAPS) { |
680 MethodData* MethodData::allocate(ClassLoaderData* loader_data, methodHandle method, TRAPS) { |
681 int size = MethodData::compute_allocation_size_in_words(method); |
681 int size = MethodData::compute_allocation_size_in_words(method); |
682 |
682 |
683 return new (loader_data, size, false, MetaspaceObj::MethodDataType, THREAD) |
683 return new (loader_data, size, false, MetaspaceObj::MethodDataType, THREAD) |
684 MethodData(method(), size, CHECK_NULL); |
684 MethodData(method(), size, THREAD); |
685 } |
685 } |
686 |
686 |
687 int MethodData::bytecode_cell_count(Bytecodes::Code code) { |
687 int MethodData::bytecode_cell_count(Bytecodes::Code code) { |
688 #if defined(COMPILER1) && !defined(COMPILER2) |
688 #if defined(COMPILER1) && !defined(COMPILER2) |
689 return no_profile_data; |
689 return no_profile_data; |