< prev index next >
agent/src/share/classes/sun/jvm/hotspot/memory/Generation.java
Print this page
rev 8333 : 8077842: Remove the level parameter passed around in GenCollectedHeap
Reviewed-by:
@@ -1,7 +1,7 @@
/*
- * Copyright (c) 2000, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
@@ -46,11 +46,10 @@
public abstract class Generation extends VMObject {
private static long reservedFieldOffset;
private static long virtualSpaceFieldOffset;
- private static CIntegerField levelField;
protected static final int K = 1024;
// Fields for class StatRecord
private static Field statRecordField;
private static CIntegerField invocationField;
@@ -72,11 +71,10 @@
private static synchronized void initialize(TypeDataBase db) {
Type type = db.lookupType("Generation");
reservedFieldOffset = type.getField("_reserved").getOffset();
virtualSpaceFieldOffset = type.getField("_virtual_space").getOffset();
- levelField = type.getCIntegerField("_level");
// StatRecord
statRecordField = type.getField("_stat_record");
type = db.lookupType("Generation::StatRecord");
invocationField = type.getCIntegerField("invocations");
@@ -127,18 +125,10 @@
} else {
throw new RuntimeException("should not reach here");
}
}
- public GenerationSpec spec() {
- return ((GenCollectedHeap) VM.getVM().getUniverse().heap()).spec(level());
- }
-
- public int level() {
- return (int) levelField.getValue(addr);
- }
-
public int invocations() {
return getStatRecord().getInvocations();
}
/** The maximum number of object bytes the generation can currently
< prev index next >