mirror of
https://github.com/openjdk/jdk.git
synced 2026-05-11 14:11:36 +00:00
8076534: CollectedHeapName in SA agent incorrect
Reviewed-by: dsamersoff, sla, tschatzl
This commit is contained in:
parent
0a0a22f7ea
commit
f6e2ae001d
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2000, 2005, 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
|
||||
@ -32,7 +32,7 @@ import sun.jvm.hotspot.memory.*;
|
||||
import sun.jvm.hotspot.runtime.*;
|
||||
import sun.jvm.hotspot.types.*;
|
||||
|
||||
public class CollectedHeap extends VMObject {
|
||||
public abstract class CollectedHeap extends VMObject {
|
||||
private static long reservedFieldOffset;
|
||||
|
||||
static {
|
||||
@ -73,9 +73,7 @@ public class CollectedHeap extends VMObject {
|
||||
return reservedRegion().contains(a);
|
||||
}
|
||||
|
||||
public CollectedHeapName kind() {
|
||||
return CollectedHeapName.ABSTRACT;
|
||||
}
|
||||
public abstract CollectedHeapName kind();
|
||||
|
||||
public void print() { printOn(System.out); }
|
||||
public void printOn(PrintStream tty) {
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2000, 2011, 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
|
||||
@ -31,7 +31,6 @@ public class CollectedHeapName {
|
||||
|
||||
private CollectedHeapName(String name) { this.name = name; }
|
||||
|
||||
public static final CollectedHeapName ABSTRACT = new CollectedHeapName("abstract");
|
||||
public static final CollectedHeapName GEN_COLLECTED_HEAP = new CollectedHeapName("GenCollectedHeap");
|
||||
public static final CollectedHeapName G1_COLLECTED_HEAP = new CollectedHeapName("G1CollectedHeap");
|
||||
public static final CollectedHeapName PARALLEL_SCAVENGE_HEAP = new CollectedHeapName("ParallelScavengeHeap");
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* 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
|
||||
@ -112,11 +112,7 @@ public class Universe {
|
||||
return "";
|
||||
}
|
||||
public CollectedHeap heap() {
|
||||
try {
|
||||
return (CollectedHeap) heapConstructor.instantiateWrapperFor(collectedHeapField.getValue());
|
||||
} catch (WrongTypeException e) {
|
||||
return new CollectedHeap(collectedHeapField.getValue());
|
||||
}
|
||||
return (CollectedHeap) heapConstructor.instantiateWrapperFor(collectedHeapField.getValue());
|
||||
}
|
||||
|
||||
public static long getNarrowOopBase() {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user