hotspot/test/gc/metaspace/PerfCounters.java
changeset 38089 9e58203ef0e2
parent 36508 5f9eee6b383b
child 40631 ed82623d7831
equal deleted inserted replaced
38082:4819f68a93a6 38089:9e58203ef0e2
    38 public class PerfCounters {
    38 public class PerfCounters {
    39     private final static MonitoredVm vm;
    39     private final static MonitoredVm vm;
    40 
    40 
    41     static {
    41     static {
    42         try {
    42         try {
    43             String pid = Integer.toString(ProcessTools.getProcessId());
    43             String pid = Long.toString(ProcessTools.getProcessId());
    44             VmIdentifier vmId = new VmIdentifier(pid);
    44             VmIdentifier vmId = new VmIdentifier(pid);
    45             MonitoredHost host = MonitoredHost.getMonitoredHost(vmId);
    45             MonitoredHost host = MonitoredHost.getMonitoredHost(vmId);
    46             vm = host.getMonitoredVm(vmId);
    46             vm = host.getMonitoredVm(vmId);
    47         } catch (Exception e) {
    47         } catch (Exception e) {
    48             throw new RuntimeException("Could not connect to the VM");
    48             throw new RuntimeException("Could not connect to the VM");