comparison src/share/vm/compiler/compilerOracle.cpp @ 14726:92aa6797d639

Backed out merge changeset: b51e29501f30 Backed out merge revision to its first parent (8f483e200405)
author Doug Simon <doug.simon@oracle.com>
date Mon, 24 Mar 2014 21:30:43 +0100
parents b51e29501f30
children
comparison
equal deleted inserted replaced
14719:0bdd0d157040 14726:92aa6797d639
372 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf" \ 372 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf" \
373 "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7\xe8\xe9\xea\xeb\xec\xed\xee\xef" \ 373 "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7\xe8\xe9\xea\xeb\xec\xed\xee\xef" \
374 "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff" 374 "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff"
375 375
376 #define RANGE0 "[*" RANGEBASE "]" 376 #define RANGE0 "[*" RANGEBASE "]"
377 #define RANGEDOT "[*" RANGEBASE ".]"
377 #define RANGESLASH "[*" RANGEBASE "/]" 378 #define RANGESLASH "[*" RANGEBASE "/]"
379
380
381 // Accept several syntaxes for these patterns
382 // original syntax
383 // cmd java.lang.String foo
384 // PrintCompilation syntax
385 // cmd java.lang.String::foo
386 // VM syntax
387 // cmd java/lang/String[. ]foo
388 //
389
390 static const char* patterns[] = {
391 "%*[ \t]%255" RANGEDOT " " "%255" RANGE0 "%n",
392 "%*[ \t]%255" RANGEDOT "::" "%255" RANGE0 "%n",
393 "%*[ \t]%255" RANGESLASH "%*[ .]" "%255" RANGE0 "%n",
394 };
378 395
379 static MethodMatcher::Mode check_mode(char name[], const char*& error_msg) { 396 static MethodMatcher::Mode check_mode(char name[], const char*& error_msg) {
380 int match = MethodMatcher::Exact; 397 int match = MethodMatcher::Exact;
381 while (name[0] == '*') { 398 while (name[0] == '*') {
382 match |= MethodMatcher::Suffix; 399 match |= MethodMatcher::Suffix;
402 char class_name[], MethodMatcher::Mode* c_mode, 419 char class_name[], MethodMatcher::Mode* c_mode,
403 char method_name[], MethodMatcher::Mode* m_mode, 420 char method_name[], MethodMatcher::Mode* m_mode,
404 int* bytes_read, const char*& error_msg) { 421 int* bytes_read, const char*& error_msg) {
405 *bytes_read = 0; 422 *bytes_read = 0;
406 error_msg = NULL; 423 error_msg = NULL;
407 if (2 == sscanf(line, "%*[ \t]%255" RANGESLASH "%*[ ]" "%255" RANGE0 "%n", class_name, method_name, bytes_read)) { 424 for (uint i = 0; i < ARRAY_SIZE(patterns); i++) {
408 *c_mode = check_mode(class_name, error_msg); 425 if (2 == sscanf(line, patterns[i], class_name, method_name, bytes_read)) {
409 *m_mode = check_mode(method_name, error_msg); 426 *c_mode = check_mode(class_name, error_msg);
410 return *c_mode != MethodMatcher::Unknown && *m_mode != MethodMatcher::Unknown; 427 *m_mode = check_mode(method_name, error_msg);
428 return *c_mode != MethodMatcher::Unknown && *m_mode != MethodMatcher::Unknown;
429 }
411 } 430 }
412 return false; 431 return false;
413 } 432 }
414 433
415 434