src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/tools/JMap.java
changeset 52810 a2500cf11ee5
parent 47216 71c04702a3d5
child 58389 31524b016783
equal deleted inserted replaced
52809:7edc56620d42 52810:a2500cf11ee5
     1 /*
     1 /*
     2  * Copyright (c) 2004, 2013, Oracle and/or its affiliates. All rights reserved.
     2  * Copyright (c) 2004, 2018, Oracle and/or its affiliates. All rights reserved.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     4  *
     4  *
     5  * This code is free software; you can redistribute it and/or modify it
     5  * This code is free software; you can redistribute it and/or modify it
     6  * under the terms of the GNU General Public License version 2 only, as
     6  * under the terms of the GNU General Public License version 2 only, as
     7  * published by the Free Software Foundation.
     7  * published by the Free Software Foundation.
   180         try {
   180         try {
   181             HeapGraphWriter hgw = new HeapHprofBinWriter();
   181             HeapGraphWriter hgw = new HeapHprofBinWriter();
   182             hgw.write(fileName);
   182             hgw.write(fileName);
   183             System.out.println("heap written to " + fileName);
   183             System.out.println("heap written to " + fileName);
   184             return true;
   184             return true;
   185         } catch (IOException exp) {
   185         } catch (IOException | RuntimeException exp) {
   186             System.err.println(exp.getMessage());
   186             System.err.println(exp.getMessage());
   187             return false;
   187             return false;
   188         }
   188         }
   189     }
   189     }
   190 
   190