Mercurial > hg > truffle
comparison src/share/vm/services/management.cpp @ 17937:78bbf4d43a14
8037816: Fix for 8036122 breaks build with Xcode5/clang
8043029: Change 8037816 breaks HS build with older GCC versions which don't support diagnostic pragmas
8043164: Format warning in traceStream.hpp
Summary: Backport of main fix + two corrections, enables clang compilation, turns on format attributes, corrects/mutes warnings
Reviewed-by: kvn, coleenp, iveresov, twisti
author | drchase |
---|---|
date | Thu, 22 May 2014 15:52:41 -0400 |
parents | a034dc5e910b |
children | 52b4284cb496 ce8f6bb717c9 |
comparison
equal
deleted
inserted
replaced
17935:7384f6a12fc1 | 17937:78bbf4d43a14 |
---|---|
1 /* | 1 /* |
2 * Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved. | 2 * Copyright (c) 2003, 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. |
53 #include "services/memoryService.hpp" | 53 #include "services/memoryService.hpp" |
54 #include "services/runtimeService.hpp" | 54 #include "services/runtimeService.hpp" |
55 #include "services/threadService.hpp" | 55 #include "services/threadService.hpp" |
56 #include "utilities/macros.hpp" | 56 #include "utilities/macros.hpp" |
57 | 57 |
58 PRAGMA_FORMAT_MUTE_WARNINGS_FOR_GCC | |
59 | |
58 PerfVariable* Management::_begin_vm_creation_time = NULL; | 60 PerfVariable* Management::_begin_vm_creation_time = NULL; |
59 PerfVariable* Management::_end_vm_creation_time = NULL; | 61 PerfVariable* Management::_end_vm_creation_time = NULL; |
60 PerfVariable* Management::_vm_init_done_time = NULL; | 62 PerfVariable* Management::_vm_init_done_time = NULL; |
61 | 63 |
62 Klass* Management::_sensor_klass = NULL; | 64 Klass* Management::_sensor_klass = NULL; |
1830 succeed = CommandLineFlags::intxAtPut(name, &ivalue, Flag::MANAGEMENT); | 1832 succeed = CommandLineFlags::intxAtPut(name, &ivalue, Flag::MANAGEMENT); |
1831 } else if (flag->is_uintx()) { | 1833 } else if (flag->is_uintx()) { |
1832 uintx uvalue = (uintx)new_value.j; | 1834 uintx uvalue = (uintx)new_value.j; |
1833 | 1835 |
1834 if (strncmp(name, "MaxHeapFreeRatio", 17) == 0) { | 1836 if (strncmp(name, "MaxHeapFreeRatio", 17) == 0) { |
1835 FormatBuffer<80> err_msg(""); | 1837 FormatBuffer<80> err_msg("%s", ""); |
1836 if (!Arguments::verify_MaxHeapFreeRatio(err_msg, uvalue)) { | 1838 if (!Arguments::verify_MaxHeapFreeRatio(err_msg, uvalue)) { |
1837 THROW_MSG(vmSymbols::java_lang_IllegalArgumentException(), err_msg.buffer()); | 1839 THROW_MSG(vmSymbols::java_lang_IllegalArgumentException(), err_msg.buffer()); |
1838 } | 1840 } |
1839 } else if (strncmp(name, "MinHeapFreeRatio", 17) == 0) { | 1841 } else if (strncmp(name, "MinHeapFreeRatio", 17) == 0) { |
1840 FormatBuffer<80> err_msg(""); | 1842 FormatBuffer<80> err_msg("%s", ""); |
1841 if (!Arguments::verify_MinHeapFreeRatio(err_msg, uvalue)) { | 1843 if (!Arguments::verify_MinHeapFreeRatio(err_msg, uvalue)) { |
1842 THROW_MSG(vmSymbols::java_lang_IllegalArgumentException(), err_msg.buffer()); | 1844 THROW_MSG(vmSymbols::java_lang_IllegalArgumentException(), err_msg.buffer()); |
1843 } | 1845 } |
1844 } | 1846 } |
1845 succeed = CommandLineFlags::uintxAtPut(name, &uvalue, Flag::MANAGEMENT); | 1847 succeed = CommandLineFlags::uintxAtPut(name, &uvalue, Flag::MANAGEMENT); |