vmSymbols.cpp revision 1472
2362N/A * Copyright (c) 1997, 2009, Oracle and/or its affiliates. All rights reserved. 0N/A * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 0N/A * This code is free software; you can redistribute it and/or modify it 0N/A * under the terms of the GNU General Public License version 2 only, as 0N/A * published by the Free Software Foundation. 0N/A * This code is distributed in the hope that it will be useful, but WITHOUT 0N/A * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 0N/A * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 0N/A * version 2 for more details (a copy is included in the LICENSE file that 0N/A * accompanied this code). 2362N/A * You should have received a copy of the GNU General Public License version 0N/A * 2 along with this work; if not, write to the Free Software Foundation, 0N/A * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 0N/A * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 0N/A#
include "incls/_precompiled.incl" 4378N/A // follow the natural address order: 0N/A// Put all the VM symbol strings in one place. 0N/A// Makes for a more compact libjvm. 0N/A // no single signatures for T_OBJECT or T_ARRAY 0N/A // Check for duplicates: 0N/A tty->
print(
"*** Duplicate VM symbol SIDs %s(%d) and %s(%d): \"",
0N/A // Create an index for find_id: 0N/A // Spot-check correspondence between strings, symbols, and enums: 0N/A // Make sure find_sid produces the right answer in each case. 0N/A // Note: If there are duplicates, this assert will fail. 0N/A // A "Duplicate VM symbol" message will have already been printed. 0N/A // The string "format" happens (at the moment) not to be a vmSymbol, 0N/A // though it is a method name in java.lang.String. 0N/A// (Typical counts are calls=7000 and probes=17000.) 0N/A // Handle the majority of misses by a bounds check. 0N/A // Then, use a binary search over the index. 0N/A // Expected trip count is less than log2_SID_LIMIT, about eight. 0N/A // This is slow but acceptable, given that calls are not 0N/A // dynamically common. (methodOop::intrinsic_id has a cache.) 0N/A if (
cmp1 <= 0) {
// before the first 0N/A // After checking the extremes, do a binary search. 0N/A // Pick a new probe point: 0N/A // Perform the exhaustive self-check the first 1000 calls, 0N/A // and every 100 calls thereafter. 0N/A // Make sure this is the right answer, using linear search. 0N/A // (We have already proven that there are no duplicates in the list.) 0N/A // Unless it's a duplicate, assert that the sids are the same. string +=
1;
// skip trailing null return "(unknown intrinsic)";
// These are flag-matching functions: // These are for forming case labels: // Let the C compiler build the decision tree. case F_Y:
fname =
"synchronized ";
break;
// These are to get information about intrinsics. // verify_method performs an extra check on a matched intrinsic method return (m->
name() == n &&
// Here are a few special cases in StrictMath not declared in vmSymbols.hpp. tty->
print_cr(
"*** misidentified method; %s(%d) should be %s(%d):",