equal
deleted
inserted
replaced
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 |