OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
4 // met: | 4 // met: |
5 // | 5 // |
6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
(...skipping 12712 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
12723 static size_t kPreambleLen = sizeof(kPreamble) - 1; | 12723 static size_t kPreambleLen = sizeof(kPreamble) - 1; |
12724 | 12724 |
12725 if (event->name.len < sizeof(kPreamble) - 1 || | 12725 if (event->name.len < sizeof(kPreamble) - 1 || |
12726 strncmp(kPreamble, event->name.str, kPreambleLen) != 0) { | 12726 strncmp(kPreamble, event->name.str, kPreambleLen) != 0) { |
12727 return false; | 12727 return false; |
12728 } | 12728 } |
12729 | 12729 |
12730 const char* tail = event->name.str + kPreambleLen; | 12730 const char* tail = event->name.str + kPreambleLen; |
12731 size_t tail_len = event->name.len - kPreambleLen; | 12731 size_t tail_len = event->name.len - kPreambleLen; |
12732 size_t expected_len = strlen(expected); | 12732 size_t expected_len = strlen(expected); |
12733 if (tail_len == expected_len + 1) { | 12733 if (tail_len > 1 && (*tail == '*' || *tail == '~')) { |
12734 if (*tail == '*' || *tail == '~') { | 12734 --tail_len; |
12735 --tail_len; | 12735 ++tail; |
12736 ++tail; | 12736 } |
12737 } else { | 12737 |
12738 return false; | 12738 // Check for tails like 'bar :1'. |
12739 } | 12739 if (tail_len > expected_len + 2 && |
| 12740 tail[expected_len] == ' ' && |
| 12741 tail[expected_len + 1] == ':' && |
| 12742 tail[expected_len + 2] && |
| 12743 !strncmp(tail, expected, expected_len)) { |
| 12744 return true; |
12740 } | 12745 } |
12741 | 12746 |
12742 if (tail_len != expected_len) | 12747 if (tail_len != expected_len) |
12743 return false; | 12748 return false; |
12744 | 12749 |
12745 return strncmp(tail, expected, expected_len) == 0; | 12750 return strncmp(tail, expected, expected_len) == 0; |
12746 } | 12751 } |
12747 | 12752 |
12748 | 12753 |
12749 static void event_handler(const v8::JitCodeEvent* event) { | 12754 static void event_handler(const v8::JitCodeEvent* event) { |
(...skipping 6944 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
19694 i::Semaphore* sem_; | 19699 i::Semaphore* sem_; |
19695 volatile int sem_value_; | 19700 volatile int sem_value_; |
19696 }; | 19701 }; |
19697 | 19702 |
19698 | 19703 |
19699 THREADED_TEST(SemaphoreInterruption) { | 19704 THREADED_TEST(SemaphoreInterruption) { |
19700 ThreadInterruptTest().RunTest(); | 19705 ThreadInterruptTest().RunTest(); |
19701 } | 19706 } |
19702 | 19707 |
19703 #endif // WIN32 | 19708 #endif // WIN32 |
OLD | NEW |