File tree Expand file tree Collapse file tree 5 files changed +18
-17
lines changed
substratevm/src/com.oracle.svm.core.genscavenge/src/com/oracle/svm/core/genscavenge Expand file tree Collapse file tree 5 files changed +18
-17
lines changed Original file line number Diff line number Diff line change @@ -48,12 +48,12 @@ public CompleteGarbageCollectorMXBean() {
4848
4949 @ Override
5050 public long getCollectionCount () {
51- return HeapImpl .getHeapImpl (). getGCImpl ().getAccounting ().getCompleteCollectionCount ();
51+ return HeapImpl .getGCImpl ().getAccounting ().getCompleteCollectionCount ();
5252 }
5353
5454 @ Override
5555 public long getCollectionTime () {
56- long nanos = HeapImpl .getHeapImpl (). getGCImpl ().getAccounting ().getCompleteCollectionTotalNanos ();
56+ long nanos = HeapImpl .getGCImpl ().getAccounting ().getCompleteCollectionTotalNanos ();
5757 return TimeUtils .roundNanosToMillis (nanos );
5858 }
5959
Original file line number Diff line number Diff line change @@ -515,7 +515,7 @@ static boolean runtimeAssertions() {
515515
516516 @ Fold
517517 public static GCImpl getGCImpl () {
518- GCImpl gcImpl = HeapImpl .getHeapImpl (). getGCImpl ();
518+ GCImpl gcImpl = HeapImpl .getGCImpl ();
519519 assert gcImpl != null ;
520520 return gcImpl ;
521521 }
@@ -1290,7 +1290,7 @@ protected void operate(NativeVMOperationData data) {
12901290 */
12911291 ImplicitExceptions .activateImplicitExceptionsAreFatal ();
12921292 try {
1293- HeapImpl .getHeapImpl (). getGCImpl ().collectOperation ((CollectionVMOperationData ) data );
1293+ HeapImpl .getGCImpl ().collectOperation ((CollectionVMOperationData ) data );
12941294 } catch (Throwable t ) {
12951295 throw VMError .shouldNotReachHere (t );
12961296 } finally {
@@ -1301,7 +1301,7 @@ protected void operate(NativeVMOperationData data) {
13011301 @ Override
13021302 protected boolean hasWork (NativeVMOperationData data ) {
13031303 CollectionVMOperationData d = (CollectionVMOperationData ) data ;
1304- return HeapImpl .getHeapImpl (). getGCImpl ().getCollectionEpoch ().equal (d .getRequestingEpoch ());
1304+ return HeapImpl .getGCImpl ().getCollectionEpoch ().equal (d .getRequestingEpoch ());
13051305 }
13061306 }
13071307
Original file line number Diff line number Diff line change @@ -213,14 +213,20 @@ public ObjectHeader getObjectHeader() {
213213 return objectHeaderImpl ;
214214 }
215215
216- ObjectHeaderImpl getObjectHeaderImpl () {
217- return objectHeaderImpl ;
216+ @ Fold
217+ static ObjectHeaderImpl getObjectHeaderImpl () {
218+ return getHeapImpl ().objectHeaderImpl ;
218219 }
219220
220221 @ Fold
221222 @ Override
222223 public GC getGC () {
223- return getGCImpl ();
224+ return getHeapImpl ().gcImpl ;
225+ }
226+
227+ @ Fold
228+ static GCImpl getGCImpl () {
229+ return getHeapImpl ().gcImpl ;
224230 }
225231
226232 @ Fold
@@ -234,11 +240,6 @@ public HeapAccounting getAccounting() {
234240 return accounting ;
235241 }
236242
237- @ Fold
238- GCImpl getGCImpl () {
239- return gcImpl ;
240- }
241-
242243 @ Override
243244 @ Uninterruptible (reason = "Called from uninterruptible code." , mayBeInlined = true )
244245 public boolean isAllocationDisallowed () {
@@ -699,7 +700,7 @@ public void dirtyAllReferencesOf(Object obj) {
699700
700701 @ Override
701702 public long getMillisSinceLastWholeHeapExamined () {
702- return getGCImpl ().getMillisSinceLastWholeHeapExamined ();
703+ return HeapImpl . getGCImpl ().getMillisSinceLastWholeHeapExamined ();
703704 }
704705
705706 @ Override
Original file line number Diff line number Diff line change @@ -48,12 +48,12 @@ public IncrementalGarbageCollectorMXBean() {
4848
4949 @ Override
5050 public long getCollectionCount () {
51- return HeapImpl .getHeapImpl (). getGCImpl ().getAccounting ().getIncrementalCollectionCount ();
51+ return HeapImpl .getGCImpl ().getAccounting ().getIncrementalCollectionCount ();
5252 }
5353
5454 @ Override
5555 public long getCollectionTime () {
56- long nanos = HeapImpl .getHeapImpl (). getGCImpl ().getAccounting ().getIncrementalCollectionTotalNanos ();
56+ long nanos = HeapImpl .getGCImpl ().getAccounting ().getIncrementalCollectionTotalNanos ();
5757 return TimeUtils .roundNanosToMillis (nanos );
5858 }
5959
Original file line number Diff line number Diff line change @@ -104,7 +104,7 @@ public final class ObjectHeaderImpl extends ObjectHeader {
104104
105105 @ Fold
106106 public static ObjectHeaderImpl getObjectHeaderImpl () {
107- ObjectHeaderImpl oh = HeapImpl .getHeapImpl (). getObjectHeaderImpl ();
107+ ObjectHeaderImpl oh = HeapImpl .getObjectHeaderImpl ();
108108 assert oh != null ;
109109 return oh ;
110110 }
You can’t perform that action at this time.
0 commit comments