< prev index next >

src/share/vm/oops/methodData.cpp

Print this page




 917   object_size += extra_data_count * DataLayout::compute_size_in_bytes(0);
 918 
 919   // Add a cell to record information about modified arguments.
 920   int arg_size = method->size_of_parameters();
 921   object_size += DataLayout::compute_size_in_bytes(arg_size+1);
 922 
 923   // Reserve room for an area of the MDO dedicated to profiling of
 924   // parameters
 925   int args_cell = ParametersTypeData::compute_cell_count(method());
 926   if (args_cell > 0) {
 927     object_size += DataLayout::compute_size_in_bytes(args_cell);
 928   }
 929   return object_size;
 930 }
 931 
 932 // Compute the size of the MethodData* necessary to store
 933 // profiling information about a given method.  Size is in words
 934 int MethodData::compute_allocation_size_in_words(const methodHandle& method) {
 935   int byte_size = compute_allocation_size_in_bytes(method);
 936   int word_size = align_size_up(byte_size, BytesPerWord) / BytesPerWord;
 937   return align_object_size(word_size);
 938 }
 939 
 940 // Initialize an individual data segment.  Returns the size of
 941 // the segment in bytes.
 942 int MethodData::initialize_data(BytecodeStream* stream,
 943                                        int data_index) {
 944 #if defined(COMPILER1) && !(defined(COMPILER2) || INCLUDE_JVMCI)
 945   return 0;
 946 #else
 947   int cell_count = -1;
 948   int tag = DataLayout::no_tag;
 949   DataLayout* data_layout = data_layout_at(data_index);
 950   Bytecodes::Code c = stream->code();
 951   switch (c) {
 952   case Bytecodes::_checkcast:
 953   case Bytecodes::_instanceof:
 954   case Bytecodes::_aastore:
 955     if (TypeProfileCasts) {
 956       cell_count = ReceiverTypeData::static_cell_count();
 957       tag = DataLayout::receiver_type_data_tag;




 917   object_size += extra_data_count * DataLayout::compute_size_in_bytes(0);
 918 
 919   // Add a cell to record information about modified arguments.
 920   int arg_size = method->size_of_parameters();
 921   object_size += DataLayout::compute_size_in_bytes(arg_size+1);
 922 
 923   // Reserve room for an area of the MDO dedicated to profiling of
 924   // parameters
 925   int args_cell = ParametersTypeData::compute_cell_count(method());
 926   if (args_cell > 0) {
 927     object_size += DataLayout::compute_size_in_bytes(args_cell);
 928   }
 929   return object_size;
 930 }
 931 
 932 // Compute the size of the MethodData* necessary to store
 933 // profiling information about a given method.  Size is in words
 934 int MethodData::compute_allocation_size_in_words(const methodHandle& method) {
 935   int byte_size = compute_allocation_size_in_bytes(method);
 936   int word_size = align_size_up(byte_size, BytesPerWord) / BytesPerWord;
 937   return align_metadata_size(word_size);
 938 }
 939 
 940 // Initialize an individual data segment.  Returns the size of
 941 // the segment in bytes.
 942 int MethodData::initialize_data(BytecodeStream* stream,
 943                                        int data_index) {
 944 #if defined(COMPILER1) && !(defined(COMPILER2) || INCLUDE_JVMCI)
 945   return 0;
 946 #else
 947   int cell_count = -1;
 948   int tag = DataLayout::no_tag;
 949   DataLayout* data_layout = data_layout_at(data_index);
 950   Bytecodes::Code c = stream->code();
 951   switch (c) {
 952   case Bytecodes::_checkcast:
 953   case Bytecodes::_instanceof:
 954   case Bytecodes::_aastore:
 955     if (TypeProfileCasts) {
 956       cell_count = ReceiverTypeData::static_cell_count();
 957       tag = DataLayout::receiver_type_data_tag;


< prev index next >