< prev index next >

src/hotspot/share/memory/heap.hpp

Print this page




 200                                                           (_code_blob_type == code_blob_type); }
 201   int code_blob_type() const                     { return _code_blob_type; }
 202 
 203   // Debugging / Profiling
 204   const char* name() const                       { return _name; }
 205   int         blob_count()                       { return _blob_count; }
 206   int         nmethod_count()                    { return _nmethod_count; }
 207   void    set_nmethod_count(int count)           {        _nmethod_count = count; }
 208   int         adapter_count()                    { return _adapter_count; }
 209   void    set_adapter_count(int count)           {        _adapter_count = count; }
 210   int         full_count()                       { return _full_count; }
 211   void        report_full()                      {        _full_count++; }
 212 
 213 private:
 214   size_t heap_unallocated_capacity() const;
 215 
 216 public:
 217   // Debugging
 218   void verify() PRODUCT_RETURN;
 219   void print()  PRODUCT_RETURN;











































































 220 };
 221 
 222 #endif // SHARE_VM_MEMORY_HEAP_HPP


 200                                                           (_code_blob_type == code_blob_type); }
 201   int code_blob_type() const                     { return _code_blob_type; }
 202 
 203   // Debugging / Profiling
 204   const char* name() const                       { return _name; }
 205   int         blob_count()                       { return _blob_count; }
 206   int         nmethod_count()                    { return _nmethod_count; }
 207   void    set_nmethod_count(int count)           {        _nmethod_count = count; }
 208   int         adapter_count()                    { return _adapter_count; }
 209   void    set_adapter_count(int count)           {        _adapter_count = count; }
 210   int         full_count()                       { return _full_count; }
 211   void        report_full()                      {        _full_count++; }
 212 
 213 private:
 214   size_t heap_unallocated_capacity() const;
 215 
 216 public:
 217   // Debugging
 218   void verify() PRODUCT_RETURN;
 219   void print()  PRODUCT_RETURN;
 220 
 221   //---<  BEGIN  >--- 8198691: CodeHeap State Analytics.
 222 
 223  public:
 224   enum compType {
 225     noComp = 0     // must be! due to initialization by memset to zero
 226   , c1
 227   , c2
 228   , jvmci
 229   , lastComp
 230   };
 231 
 232   enum blobType {
 233      noType = 0     // must be! due to initialization by memset to zero
 234      // The nMethod_* values correspond 1:1 to the CompiledMethod enum values.
 235    , nMethod_inuse       // executable. This is the "normal" state for a nmethod.
 236    , nMethod_notused     // assumed inactive, marked not entrant. Could be revived if necessary.
 237    , nMethod_notentrant  // no new activations allowed, marked for deoptimization. Old activations may still exist.
 238                          // Will transition to "zombie" after all activations are gone.
 239    , nMethod_zombie      // No more activations exist, ready for purge (remove from code cache).
 240    , nMethod_unloaded    // No activations exist, should not be called. Transient state on the way to "zombie".
 241    , nMethod_alive = nMethod_notentrant // Combined state: nmethod may have activations, thus can't be purged.
 242    , nMethod_dead  = nMethod_zombie     // Combined state: nmethod does not have any activations.
 243    , runtimeStub   = nMethod_unloaded + 1
 244    , ricochetStub
 245    , deoptimizationStub
 246    , uncommonTrapStub
 247    , exceptionStub
 248    , safepointStub
 249    , adapterBlob
 250    , mh_adapterBlob
 251    , bufferBlob
 252    , lastType
 253   };
 254 
 255  private:
 256   void prepare_StatArray(outputStream *out, size_t nElem, size_t granularity, const char* heapName);
 257   void prepare_FreeArray(outputStream *out, unsigned int nElem, const char* heapName);
 258   void prepare_TopSizeArray(outputStream *out, unsigned int nElem, const char* heapName);
 259   void prepare_SizeDistArray(outputStream *out, unsigned int nElem, const char* heapName);
 260   void discard_StatArray(outputStream *out);
 261   void discard_FreeArray(outputStream *out);
 262   void discard_TopSizeArray(outputStream *out);
 263   void discard_SizeDistArray(outputStream *out);
 264 
 265   void update_SizeDistArray(outputStream *out, unsigned int len);
 266 
 267   const char* get_heapName();
 268   unsigned int findHeapIndex(outputStream *out, const char *heapName);
 269   void get_HeapStatGlobals(outputStream *out, const char *heapName);
 270   void set_HeapStatGlobals(outputStream *out, const char *heapName);
 271 
 272   void printBox(outputStream* out, const char border, const char* text1, const char* text2);
 273   void print_blobType_legend(outputStream *out);
 274   void print_space_legend(outputStream *out);
 275   void print_age_legend(outputStream *out);
 276   void print_blobType_single(outputStream *ast, u2 /* blobType */ type);
 277   void print_count_single(outputStream *ast, unsigned short count);
 278   void print_space_single(outputStream *ast, unsigned short space);
 279   void print_age_single(outputStream *ast, unsigned int age);
 280   void print_line_delim(outputStream *out, bufferedStream *sst, unsigned int ix, unsigned int gpl);
 281   void print_line_delim(outputStream *out, outputStream *sst, unsigned int ix, unsigned int gpl);
 282   blobType get_cbType(CodeBlob* cb);
 283 
 284  public:
 285   void discard(outputStream *out);
 286   void aggregate(outputStream *out, const char* granularity);
 287   void print_usedSpace(outputStream *out);
 288   void print_freeSpace(outputStream *out);
 289   void print_count(outputStream *out);
 290   void print_space(outputStream *out);
 291   void print_age(outputStream *out);
 292   void print_names(outputStream *out);
 293 
 294   //---<  END  >--- 8198691: CodeHeap State Analytics.
 295 };
 296 
 297 #endif // SHARE_VM_MEMORY_HEAP_HPP
< prev index next >