Mercurial > hg > truffle
comparison 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 |
comparison
equal
deleted
inserted
replaced
14647:8f483e200405 | 14704:b51e29501f30 |
---|---|
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 ".]" | |
378 #define RANGESLASH "[*" RANGEBASE "/]" | 377 #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 }; | |
395 | 378 |
396 static MethodMatcher::Mode check_mode(char name[], const char*& error_msg) { | 379 static MethodMatcher::Mode check_mode(char name[], const char*& error_msg) { |
397 int match = MethodMatcher::Exact; | 380 int match = MethodMatcher::Exact; |
398 while (name[0] == '*') { | 381 while (name[0] == '*') { |
399 match |= MethodMatcher::Suffix; | 382 match |= MethodMatcher::Suffix; |
419 char class_name[], MethodMatcher::Mode* c_mode, | 402 char class_name[], MethodMatcher::Mode* c_mode, |
420 char method_name[], MethodMatcher::Mode* m_mode, | 403 char method_name[], MethodMatcher::Mode* m_mode, |
421 int* bytes_read, const char*& error_msg) { | 404 int* bytes_read, const char*& error_msg) { |
422 *bytes_read = 0; | 405 *bytes_read = 0; |
423 error_msg = NULL; | 406 error_msg = NULL; |
424 for (uint i = 0; i < ARRAY_SIZE(patterns); i++) { | 407 if (2 == sscanf(line, "%*[ \t]%255" RANGESLASH "%*[ ]" "%255" RANGE0 "%n", class_name, method_name, bytes_read)) { |
425 if (2 == sscanf(line, patterns[i], class_name, method_name, bytes_read)) { | 408 *c_mode = check_mode(class_name, error_msg); |
426 *c_mode = check_mode(class_name, error_msg); | 409 *m_mode = check_mode(method_name, error_msg); |
427 *m_mode = check_mode(method_name, error_msg); | 410 return *c_mode != MethodMatcher::Unknown && *m_mode != MethodMatcher::Unknown; |
428 return *c_mode != MethodMatcher::Unknown && *m_mode != MethodMatcher::Unknown; | |
429 } | |
430 } | 411 } |
431 return false; | 412 return false; |
432 } | 413 } |
433 | 414 |
434 | 415 |