Mercurial > hg > truffle
comparison src/share/vm/runtime/globals.cpp @ 4107:cd00eaeebef6
7117389: Add a framework for vendor-specific command line switch extensions to Hotspot
Summary: Add a file, globals_ext.hpp, containing a null interface, to be replaced by a vendor in altsrc as needed.
Reviewed-by: coleenp, kamg, dholmes, johnc, jrose
author | phh |
---|---|
date | Mon, 05 Dec 2011 12:50:00 -0500 |
parents | 358eca91be48 |
children | 6c995c08526c |
comparison
equal
deleted
inserted
replaced
4088:358eca91be48 | 4107:cd00eaeebef6 |
---|---|
1 /* | 1 /* |
2 * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. | 2 * Copyright (c) 1997, 2011, 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 | 53 |
54 RUNTIME_OS_FLAGS(MATERIALIZE_DEVELOPER_FLAG, MATERIALIZE_PD_DEVELOPER_FLAG, \ | 54 RUNTIME_OS_FLAGS(MATERIALIZE_DEVELOPER_FLAG, MATERIALIZE_PD_DEVELOPER_FLAG, \ |
55 MATERIALIZE_PRODUCT_FLAG, MATERIALIZE_PD_PRODUCT_FLAG, \ | 55 MATERIALIZE_PRODUCT_FLAG, MATERIALIZE_PD_PRODUCT_FLAG, \ |
56 MATERIALIZE_DIAGNOSTIC_FLAG, MATERIALIZE_NOTPRODUCT_FLAG) | 56 MATERIALIZE_DIAGNOSTIC_FLAG, MATERIALIZE_NOTPRODUCT_FLAG) |
57 | 57 |
58 MATERIALIZE_FLAGS_EXT | |
59 | |
60 | |
58 bool Flag::is_unlocker() const { | 61 bool Flag::is_unlocker() const { |
59 return strcmp(name, "UnlockDiagnosticVMOptions") == 0 || | 62 return strcmp(name, "UnlockDiagnosticVMOptions") == 0 || |
60 strcmp(name, "UnlockExperimentalVMOptions") == 0; | 63 strcmp(name, "UnlockExperimentalVMOptions") == 0 || |
61 | 64 is_unlocker_ext(); |
62 } | 65 } |
63 | 66 |
64 bool Flag::is_unlocked() const { | 67 bool Flag::is_unlocked() const { |
65 if (strcmp(kind, "{diagnostic}") == 0) { | 68 if (strcmp(kind, "{diagnostic}") == 0) { |
66 if (strcmp(name, "EnableInvokeDynamic") == 0 && UnlockExperimentalVMOptions && !UnlockDiagnosticVMOptions) { | 69 if (strcmp(name, "EnableInvokeDynamic") == 0 && UnlockExperimentalVMOptions && !UnlockDiagnosticVMOptions) { |
72 return UnlockDiagnosticVMOptions; | 75 return UnlockDiagnosticVMOptions; |
73 } else if (strcmp(kind, "{experimental}") == 0 || | 76 } else if (strcmp(kind, "{experimental}") == 0 || |
74 strcmp(kind, "{C2 experimental}") == 0) { | 77 strcmp(kind, "{C2 experimental}") == 0) { |
75 return UnlockExperimentalVMOptions; | 78 return UnlockExperimentalVMOptions; |
76 } else { | 79 } else { |
77 return true; | 80 return is_unlocked_ext(); |
78 } | 81 } |
79 } | 82 } |
80 | 83 |
81 bool Flag::is_writeable() const { | 84 bool Flag::is_writeable() const { |
82 return (strcmp(kind, "{manageable}") == 0 || strcmp(kind, "{product rw}") == 0); | 85 return (strcmp(kind, "{manageable}") == 0 || strcmp(kind, "{product rw}") == 0); |
239 C2_FLAGS(C2_DEVELOP_FLAG_STRUCT, C2_PD_DEVELOP_FLAG_STRUCT, C2_PRODUCT_FLAG_STRUCT, C2_PD_PRODUCT_FLAG_STRUCT, C2_DIAGNOSTIC_FLAG_STRUCT, C2_EXPERIMENTAL_FLAG_STRUCT, C2_NOTPRODUCT_FLAG_STRUCT) | 242 C2_FLAGS(C2_DEVELOP_FLAG_STRUCT, C2_PD_DEVELOP_FLAG_STRUCT, C2_PRODUCT_FLAG_STRUCT, C2_PD_PRODUCT_FLAG_STRUCT, C2_DIAGNOSTIC_FLAG_STRUCT, C2_EXPERIMENTAL_FLAG_STRUCT, C2_NOTPRODUCT_FLAG_STRUCT) |
240 #endif | 243 #endif |
241 #ifdef SHARK | 244 #ifdef SHARK |
242 SHARK_FLAGS(SHARK_DEVELOP_FLAG_STRUCT, SHARK_PD_DEVELOP_FLAG_STRUCT, SHARK_PRODUCT_FLAG_STRUCT, SHARK_PD_PRODUCT_FLAG_STRUCT, SHARK_DIAGNOSTIC_FLAG_STRUCT, SHARK_NOTPRODUCT_FLAG_STRUCT) | 245 SHARK_FLAGS(SHARK_DEVELOP_FLAG_STRUCT, SHARK_PD_DEVELOP_FLAG_STRUCT, SHARK_PRODUCT_FLAG_STRUCT, SHARK_PD_PRODUCT_FLAG_STRUCT, SHARK_DIAGNOSTIC_FLAG_STRUCT, SHARK_NOTPRODUCT_FLAG_STRUCT) |
243 #endif | 246 #endif |
247 FLAGTABLE_EXT | |
244 {0, NULL, NULL} | 248 {0, NULL, NULL} |
245 }; | 249 }; |
246 | 250 |
247 Flag* Flag::flags = flagTable; | 251 Flag* Flag::flags = flagTable; |
248 size_t Flag::numFlags = (sizeof(flagTable) / sizeof(Flag)); | 252 size_t Flag::numFlags = (sizeof(flagTable) / sizeof(Flag)); |