Mercurial > hg > graal-jvmci-8
diff src/share/vm/compiler/compilerOracle.cpp @ 14704:b51e29501f30
Merged with jdk9/dev/hotspot changeset 9486a41de3b7
author | twisti |
---|---|
date | Tue, 18 Mar 2014 20:19:10 -0700 |
parents | d8041d695d19 d72cee0607a3 |
children | 92aa6797d639 |
line wrap: on
line diff
--- a/src/share/vm/compiler/compilerOracle.cpp Thu Mar 20 22:30:26 2014 +0100 +++ b/src/share/vm/compiler/compilerOracle.cpp Tue Mar 18 20:19:10 2014 -0700 @@ -374,25 +374,8 @@ "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff" #define RANGE0 "[*" RANGEBASE "]" -#define RANGEDOT "[*" RANGEBASE ".]" #define RANGESLASH "[*" RANGEBASE "/]" - -// Accept several syntaxes for these patterns -// original syntax -// cmd java.lang.String foo -// PrintCompilation syntax -// cmd java.lang.String::foo -// VM syntax -// cmd java/lang/String[. ]foo -// - -static const char* patterns[] = { - "%*[ \t]%255" RANGEDOT " " "%255" RANGE0 "%n", - "%*[ \t]%255" RANGEDOT "::" "%255" RANGE0 "%n", - "%*[ \t]%255" RANGESLASH "%*[ .]" "%255" RANGE0 "%n", -}; - static MethodMatcher::Mode check_mode(char name[], const char*& error_msg) { int match = MethodMatcher::Exact; while (name[0] == '*') { @@ -421,12 +404,10 @@ int* bytes_read, const char*& error_msg) { *bytes_read = 0; error_msg = NULL; - for (uint i = 0; i < ARRAY_SIZE(patterns); i++) { - if (2 == sscanf(line, patterns[i], class_name, method_name, bytes_read)) { - *c_mode = check_mode(class_name, error_msg); - *m_mode = check_mode(method_name, error_msg); - return *c_mode != MethodMatcher::Unknown && *m_mode != MethodMatcher::Unknown; - } + if (2 == sscanf(line, "%*[ \t]%255" RANGESLASH "%*[ ]" "%255" RANGE0 "%n", class_name, method_name, bytes_read)) { + *c_mode = check_mode(class_name, error_msg); + *m_mode = check_mode(method_name, error_msg); + return *c_mode != MethodMatcher::Unknown && *m_mode != MethodMatcher::Unknown; } return false; }