< prev index next >

src/share/vm/code/codeCache.hpp

Print this page




  25 #ifndef SHARE_VM_CODE_CODECACHE_HPP
  26 #define SHARE_VM_CODE_CODECACHE_HPP
  27 
  28 #include "code/codeBlob.hpp"
  29 #include "memory/allocation.hpp"
  30 #include "memory/heap.hpp"
  31 #include "oops/instanceKlass.hpp"
  32 #include "oops/oopsHierarchy.hpp"
  33 
  34 // The CodeCache implements the code cache for various pieces of generated
  35 // code, e.g., compiled java methods, runtime stubs, transition frames, etc.
  36 // The entries in the CodeCache are all CodeBlob's.
  37 
  38 // Implementation:
  39 //   - Each CodeBlob occupies one chunk of memory.
  40 //   - Like the offset table in oldspace the zone has at table for
  41 //     locating a method given a addess of an instruction.
  42 
  43 class OopClosure;
  44 class DepChange;

  45 
  46 class CodeCache : AllStatic {
  47   friend class VMStructs;

  48  private:
  49   // CodeHeap is malloc()'ed at startup and never deleted during shutdown,
  50   // so that the generated assembly code is always there when it's needed.
  51   // This may cause memory leak, but is necessary, for now. See 4423824,
  52   // 4422213 or 4436291 for details.
  53   static CodeHeap * _heap;
  54   static int _number_of_blobs;
  55   static int _number_of_adapters;
  56   static int _number_of_nmethods;
  57   static int _number_of_nmethods_with_dependencies;
  58   static bool _needs_cache_clean;
  59   static nmethod* _scavenge_root_nmethods;  // linked via nm->scavenge_root_link()
  60 
  61   static void verify_if_often() PRODUCT_RETURN;
  62 
  63   static void mark_scavenge_root_nmethods() PRODUCT_RETURN;
  64   static void verify_perm_nmethods(CodeBlobClosure* f_or_null) PRODUCT_RETURN;
  65 
  66   static int _codemem_full_count;
  67 




  25 #ifndef SHARE_VM_CODE_CODECACHE_HPP
  26 #define SHARE_VM_CODE_CODECACHE_HPP
  27 
  28 #include "code/codeBlob.hpp"
  29 #include "memory/allocation.hpp"
  30 #include "memory/heap.hpp"
  31 #include "oops/instanceKlass.hpp"
  32 #include "oops/oopsHierarchy.hpp"
  33 
  34 // The CodeCache implements the code cache for various pieces of generated
  35 // code, e.g., compiled java methods, runtime stubs, transition frames, etc.
  36 // The entries in the CodeCache are all CodeBlob's.
  37 
  38 // Implementation:
  39 //   - Each CodeBlob occupies one chunk of memory.
  40 //   - Like the offset table in oldspace the zone has at table for
  41 //     locating a method given a addess of an instruction.
  42 
  43 class OopClosure;
  44 class DepChange;
  45 class ShenandoahParallelCodeCacheIterator;
  46 
  47 class CodeCache : AllStatic {
  48   friend class VMStructs;
  49   friend class ShenandoahParallelCodeCacheIterator;
  50  private:
  51   // CodeHeap is malloc()'ed at startup and never deleted during shutdown,
  52   // so that the generated assembly code is always there when it's needed.
  53   // This may cause memory leak, but is necessary, for now. See 4423824,
  54   // 4422213 or 4436291 for details.
  55   static CodeHeap * _heap;
  56   static int _number_of_blobs;
  57   static int _number_of_adapters;
  58   static int _number_of_nmethods;
  59   static int _number_of_nmethods_with_dependencies;
  60   static bool _needs_cache_clean;
  61   static nmethod* _scavenge_root_nmethods;  // linked via nm->scavenge_root_link()
  62 
  63   static void verify_if_often() PRODUCT_RETURN;
  64 
  65   static void mark_scavenge_root_nmethods() PRODUCT_RETURN;
  66   static void verify_perm_nmethods(CodeBlobClosure* f_or_null) PRODUCT_RETURN;
  67 
  68   static int _codemem_full_count;
  69 


< prev index next >