Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(11)

Side by Side Diff: test/cctest/test-api.cc

Issue 18058008: CPUProfiler: Improve line numbers support in profiler. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 12653 matching lines...) Expand 10 before | Expand all | Expand 10 after
12664 static size_t kPreambleLen = sizeof(kPreamble) - 1; 12664 static size_t kPreambleLen = sizeof(kPreamble) - 1;
12665 12665
12666 if (event->name.len < sizeof(kPreamble) - 1 || 12666 if (event->name.len < sizeof(kPreamble) - 1 ||
12667 strncmp(kPreamble, event->name.str, kPreambleLen) != 0) { 12667 strncmp(kPreamble, event->name.str, kPreambleLen) != 0) {
12668 return false; 12668 return false;
12669 } 12669 }
12670 12670
12671 const char* tail = event->name.str + kPreambleLen; 12671 const char* tail = event->name.str + kPreambleLen;
12672 size_t tail_len = event->name.len - kPreambleLen; 12672 size_t tail_len = event->name.len - kPreambleLen;
12673 size_t expected_len = strlen(expected); 12673 size_t expected_len = strlen(expected);
12674 if (tail_len == expected_len + 1) { 12674 if (tail_len > 1 && (*tail == '*' || *tail == '~')) {
12675 if (*tail == '*' || *tail == '~') { 12675 --tail_len;
12676 --tail_len; 12676 ++tail;
12677 ++tail; 12677 }
12678 } else { 12678
12679 return false; 12679 // Check for tails like 'bar :1'.
12680 } 12680 if (tail_len > expected_len + 2 &&
12681 tail[expected_len] == ' ' &&
12682 tail[expected_len + 1] == ':' &&
12683 tail[expected_len + 2] &&
12684 !strncmp(tail, expected, expected_len)) {
12685 return true;
12681 } 12686 }
12682 12687
12683 if (tail_len != expected_len) 12688 if (tail_len != expected_len)
12684 return false; 12689 return false;
12685 12690
12686 return strncmp(tail, expected, expected_len) == 0; 12691 return strncmp(tail, expected, expected_len) == 0;
12687 } 12692 }
12688 12693
12689 12694
12690 static void event_handler(const v8::JitCodeEvent* event) { 12695 static void event_handler(const v8::JitCodeEvent* event) {
(...skipping 6911 matching lines...) Expand 10 before | Expand all | Expand 10 after
19602 i::Semaphore* sem_; 19607 i::Semaphore* sem_;
19603 volatile int sem_value_; 19608 volatile int sem_value_;
19604 }; 19609 };
19605 19610
19606 19611
19607 THREADED_TEST(SemaphoreInterruption) { 19612 THREADED_TEST(SemaphoreInterruption) {
19608 ThreadInterruptTest().RunTest(); 19613 ThreadInterruptTest().RunTest();
19609 } 19614 }
19610 19615
19611 #endif // WIN32 19616 #endif // WIN32
OLDNEW
« src/log.cc ('K') | « src/log.cc ('k') | test/cctest/test-profile-generator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698