< prev index next >

src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/gc/shenandoah/ShenandoahHeap.java

Print this page




  47         });
  48     }
  49 
  50     static private synchronized void initialize(TypeDataBase db) {
  51         Type type = db.lookupType("ShenandoahHeap");
  52         numRegions = type.getCIntegerField("_num_regions");
  53         used = type.getCIntegerField("_used");
  54         committed = type.getCIntegerField("_committed");
  55     }
  56 
  57     @Override
  58     public CollectedHeapName kind() {
  59         return CollectedHeapName.SHENANDOAH;
  60     }
  61 
  62     public long numOfRegions() {
  63         return numRegions.getValue(addr);
  64     }
  65 
  66     @Override






  67     public long used() {
  68         return used.getValue(addr);
  69     }
  70 
  71     public long committed() {
  72         return committed.getValue(addr);
  73     }
  74 
  75     @Override
  76     public void printOn(PrintStream tty) {
  77         MemRegion mr = reservedRegion();
  78         tty.print("Shenandoah heap");
  79         tty.print(" [" + mr.start() + ", " + mr.end() + "]");
  80         tty.println(" region size " + ShenandoahHeapRegion.regionSizeBytes() / 1024 + " K");
  81     }
  82 
  83     public ShenandoahHeap(Address addr) {
  84         super(addr);
  85     }
  86 }


  47         });
  48     }
  49 
  50     static private synchronized void initialize(TypeDataBase db) {
  51         Type type = db.lookupType("ShenandoahHeap");
  52         numRegions = type.getCIntegerField("_num_regions");
  53         used = type.getCIntegerField("_used");
  54         committed = type.getCIntegerField("_committed");
  55     }
  56 
  57     @Override
  58     public CollectedHeapName kind() {
  59         return CollectedHeapName.SHENANDOAH;
  60     }
  61 
  62     public long numOfRegions() {
  63         return numRegions.getValue(addr);
  64     }
  65 
  66     @Override
  67     public long capacity() {
  68         // FIXME
  69         return 0;
  70     }
  71 
  72     @Override
  73     public long used() {
  74         return used.getValue(addr);
  75     }
  76 
  77     public long committed() {
  78         return committed.getValue(addr);
  79     }
  80 
  81     @Override
  82     public void printOn(PrintStream tty) {
  83         MemRegion mr = reservedRegion();
  84         tty.print("Shenandoah heap");
  85         tty.print(" [" + mr.start() + ", " + mr.end() + "]");
  86         tty.println(" region size " + ShenandoahHeapRegion.regionSizeBytes() / 1024 + " K");
  87     }
  88 
  89     public ShenandoahHeap(Address addr) {
  90         super(addr);
  91     }
  92 }
< prev index next >