< prev index next >

src/share/vm/code/codeBlob.cpp

Print this page




  24 
  25 #include "precompiled.hpp"
  26 #include "code/codeBlob.hpp"
  27 #include "code/codeCache.hpp"
  28 #include "code/relocInfo.hpp"
  29 #include "compiler/disassembler.hpp"
  30 #include "interpreter/bytecode.hpp"
  31 #include "memory/allocation.inline.hpp"
  32 #include "memory/heap.hpp"
  33 #include "memory/resourceArea.hpp"
  34 #include "oops/oop.inline.hpp"
  35 #include "prims/forte.hpp"
  36 #include "prims/jvm.h"
  37 #include "runtime/handles.inline.hpp"
  38 #include "runtime/interfaceSupport.hpp"
  39 #include "runtime/mutexLocker.hpp"
  40 #include "runtime/safepoint.hpp"
  41 #include "runtime/sharedRuntime.hpp"
  42 #include "runtime/vframe.hpp"
  43 #include "services/memoryService.hpp"

  44 #ifdef COMPILER1
  45 #include "c1/c1_Runtime1.hpp"
  46 #endif
  47 
  48 const char* CodeBlob::compiler_name() const {
  49   return compilertype2name(_type);
  50 }
  51 
  52 unsigned int CodeBlob::align_code_offset(int offset) {
  53   // align the size to CodeEntryAlignment
  54   return
  55     ((offset + (int)CodeHeap::header_size() + (CodeEntryAlignment-1)) & ~(CodeEntryAlignment-1))
  56     - (int)CodeHeap::header_size();
  57 }
  58 
  59 
  60 // This must be consistent with the CodeBlob constructor's layout actions.
  61 unsigned int CodeBlob::allocation_size(CodeBuffer* cb, int header_size) {
  62   unsigned int size = header_size;
  63   size += align_up(cb->total_relocation_size(), oopSize);




  24 
  25 #include "precompiled.hpp"
  26 #include "code/codeBlob.hpp"
  27 #include "code/codeCache.hpp"
  28 #include "code/relocInfo.hpp"
  29 #include "compiler/disassembler.hpp"
  30 #include "interpreter/bytecode.hpp"
  31 #include "memory/allocation.inline.hpp"
  32 #include "memory/heap.hpp"
  33 #include "memory/resourceArea.hpp"
  34 #include "oops/oop.inline.hpp"
  35 #include "prims/forte.hpp"
  36 #include "prims/jvm.h"
  37 #include "runtime/handles.inline.hpp"
  38 #include "runtime/interfaceSupport.hpp"
  39 #include "runtime/mutexLocker.hpp"
  40 #include "runtime/safepoint.hpp"
  41 #include "runtime/sharedRuntime.hpp"
  42 #include "runtime/vframe.hpp"
  43 #include "services/memoryService.hpp"
  44 #include "utilities/align.hpp"
  45 #ifdef COMPILER1
  46 #include "c1/c1_Runtime1.hpp"
  47 #endif
  48 
  49 const char* CodeBlob::compiler_name() const {
  50   return compilertype2name(_type);
  51 }
  52 
  53 unsigned int CodeBlob::align_code_offset(int offset) {
  54   // align the size to CodeEntryAlignment
  55   return
  56     ((offset + (int)CodeHeap::header_size() + (CodeEntryAlignment-1)) & ~(CodeEntryAlignment-1))
  57     - (int)CodeHeap::header_size();
  58 }
  59 
  60 
  61 // This must be consistent with the CodeBlob constructor's layout actions.
  62 unsigned int CodeBlob::allocation_size(CodeBuffer* cb, int header_size) {
  63   unsigned int size = header_size;
  64   size += align_up(cb->total_relocation_size(), oopSize);


< prev index next >