< prev index next >

src/share/vm/oops/methodData.cpp

Print this page




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




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


< prev index next >