Mercurial > hg > truffle
comparison src/share/vm/services/heapDumper.cpp @ 18041:52b4284cb496
Merge with jdk8u20-b26
author | Gilles Duboscq <duboscq@ssw.jku.at> |
---|---|
date | Wed, 15 Oct 2014 16:02:50 +0200 |
parents | 4ca6dc0799b6 78bbf4d43a14 |
children |
comparison
equal
deleted
inserted
replaced
17606:45d7b2c7029d | 18041:52b4284cb496 |
---|---|
1 /* | 1 /* |
2 * Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved. | 2 * Copyright (c) 2005, 2014, 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. |
1828 } | 1828 } |
1829 } | 1829 } |
1830 } | 1830 } |
1831 | 1831 |
1832 // dump the heap to given path. | 1832 // dump the heap to given path. |
1833 PRAGMA_FORMAT_NONLITERAL_IGNORED_EXTERNAL | |
1833 int HeapDumper::dump(const char* path) { | 1834 int HeapDumper::dump(const char* path) { |
1834 assert(path != NULL && strlen(path) > 0, "path missing"); | 1835 assert(path != NULL && strlen(path) > 0, "path missing"); |
1835 | 1836 |
1836 // print message in interactive case | 1837 // print message in interactive case |
1837 if (print_to_tty()) { | 1838 if (print_to_tty()) { |
1868 timer()->stop(); | 1869 timer()->stop(); |
1869 if (error() == NULL) { | 1870 if (error() == NULL) { |
1870 char msg[256]; | 1871 char msg[256]; |
1871 sprintf(msg, "Heap dump file created [%s bytes in %3.3f secs]", | 1872 sprintf(msg, "Heap dump file created [%s bytes in %3.3f secs]", |
1872 JLONG_FORMAT, timer()->seconds()); | 1873 JLONG_FORMAT, timer()->seconds()); |
1874 PRAGMA_DIAG_PUSH | |
1875 PRAGMA_FORMAT_NONLITERAL_IGNORED_INTERNAL | |
1873 tty->print_cr(msg, writer.bytes_written()); | 1876 tty->print_cr(msg, writer.bytes_written()); |
1877 PRAGMA_DIAG_POP | |
1874 } else { | 1878 } else { |
1875 tty->print_cr("Dump file is incomplete: %s", writer.error()); | 1879 tty->print_cr("Dump file is incomplete: %s", writer.error()); |
1876 } | 1880 } |
1877 } | 1881 } |
1878 | 1882 |