OLD | NEW |
1 // Copyright 2014 the V8 project authors. All rights reserved. | 1 // Copyright 2014 the V8 project authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 // | 4 // |
5 // Tests the sampling API in include/v8.h | 5 // Tests the sampling API in include/v8.h |
6 | 6 |
7 #include <map> | 7 #include <map> |
8 #include <string> | 8 #include <string> |
9 #include "include/v8.h" | 9 #include "include/v8.h" |
| 10 #include "src/flags.h" |
10 #include "src/simulator.h" | 11 #include "src/simulator.h" |
11 #include "test/cctest/cctest.h" | 12 #include "test/cctest/cctest.h" |
12 | 13 |
13 namespace { | 14 namespace { |
14 | 15 |
15 class Sample { | 16 class Sample { |
16 public: | 17 public: |
17 enum { kFramesLimit = 255 }; | 18 enum { kFramesLimit = 255 }; |
18 | 19 |
19 Sample() {} | 20 Sample() {} |
(...skipping 228 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
248 | 249 |
249 const SamplingTestHelper::CodeEventEntry* entry; | 250 const SamplingTestHelper::CodeEventEntry* entry; |
250 entry = helper.FindEventEntry(sample.begin()[0]); | 251 entry = helper.FindEventEntry(sample.begin()[0]); |
251 CHECK(entry); | 252 CHECK(entry); |
252 CHECK(std::string::npos != entry->name.find("test_sampler_api_inner")); | 253 CHECK(std::string::npos != entry->name.find("test_sampler_api_inner")); |
253 | 254 |
254 entry = helper.FindEventEntry(sample.begin()[1]); | 255 entry = helper.FindEventEntry(sample.begin()[1]); |
255 CHECK(entry); | 256 CHECK(entry); |
256 CHECK(std::string::npos != entry->name.find("test_sampler_api_outer")); | 257 CHECK(std::string::npos != entry->name.find("test_sampler_api_outer")); |
257 } | 258 } |
OLD | NEW |