comparison src/share/vm/runtime/globals.cpp @ 8045:64d2a0a39954

8006430: TraceTypeProfile is a product flag while it should be a diagnostic flag Summary: make sure all diagnostic and experimental flag kinds are checked in Flag::is_unlocked() Reviewed-by: kvn
author kmo
date Sun, 10 Feb 2013 22:35:38 -0800
parents db9981fd3124
children 5fc51c1ecdeb b3cd8b58b798
comparison
equal deleted inserted replaced
8044:2c673161698a 8045:64d2a0a39954
1 /* 1 /*
2 * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. 2 * Copyright (c) 1997, 2013, 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.
67 strcmp(name, "UnlockExperimentalVMOptions") == 0 || 67 strcmp(name, "UnlockExperimentalVMOptions") == 0 ||
68 is_unlocker_ext(); 68 is_unlocker_ext();
69 } 69 }
70 70
71 bool Flag::is_unlocked() const { 71 bool Flag::is_unlocked() const {
72 if (strcmp(kind, "{diagnostic}") == 0) { 72 if (strcmp(kind, "{diagnostic}") == 0 ||
73 strcmp(kind, "{C2 diagnostic}") == 0 ||
74 strcmp(kind, "{ARCH diagnostic}") == 0 ||
75 strcmp(kind, "{Shark diagnostic}") == 0) {
73 if (strcmp(name, "EnableInvokeDynamic") == 0 && UnlockExperimentalVMOptions && !UnlockDiagnosticVMOptions) { 76 if (strcmp(name, "EnableInvokeDynamic") == 0 && UnlockExperimentalVMOptions && !UnlockDiagnosticVMOptions) {
74 // transitional logic to allow tests to run until they are changed 77 // transitional logic to allow tests to run until they are changed
75 static int warned; 78 static int warned;
76 if (++warned == 1) warning("Use -XX:+UnlockDiagnosticVMOptions before EnableInvokeDynamic flag"); 79 if (++warned == 1) warning("Use -XX:+UnlockDiagnosticVMOptions before EnableInvokeDynamic flag");
77 return true; 80 return true;
78 } 81 }
79 return UnlockDiagnosticVMOptions; 82 return UnlockDiagnosticVMOptions;
80 } else if (strcmp(kind, "{experimental}") == 0 || 83 } else if (strcmp(kind, "{experimental}") == 0 ||
81 strcmp(kind, "{C2 experimental}") == 0) { 84 strcmp(kind, "{C2 experimental}") == 0 ||
85 strcmp(kind, "{ARCH experimental}") == 0 ||
86 strcmp(kind, "{Shark experimental}") == 0) {
82 return UnlockExperimentalVMOptions; 87 return UnlockExperimentalVMOptions;
83 } else { 88 } else {
84 return is_unlocked_ext(); 89 return is_unlocked_ext();
85 } 90 }
86 } 91 }