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

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

Issue 960493003: Remove JITCodeEvent::CODE_REMOVED (Closed) Base URL: https://chromium.googlesource.com/v8/v8@master
Patch Set: Created 5 years, 9 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
« no previous file with comments | « test/cctest/test-api.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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/simulator.h" 10 #include "src/simulator.h"
(...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after
165 CodeEntries::iterator it = code_entries_.find(event->code_start); 165 CodeEntries::iterator it = code_entries_.find(event->code_start);
166 CHECK(it != code_entries_.end()); 166 CHECK(it != code_entries_.end());
167 code_entries_.erase(it); 167 code_entries_.erase(it);
168 CodeEventEntry entry; 168 CodeEventEntry entry;
169 entry.name = std::string(event->name.str, event->name.len); 169 entry.name = std::string(event->name.str, event->name.len);
170 entry.code_start = event->new_code_start; 170 entry.code_start = event->new_code_start;
171 entry.code_len = event->code_len; 171 entry.code_len = event->code_len;
172 code_entries_.insert(std::make_pair(entry.code_start, entry)); 172 code_entries_.insert(std::make_pair(entry.code_start, entry));
173 break; 173 break;
174 } 174 }
175 case v8::JitCodeEvent::CODE_REMOVED:
176 code_entries_.erase(event->code_start);
177 break;
178 default: 175 default:
179 break; 176 break;
180 } 177 }
181 } 178 }
182 179
183 Sample sample_; 180 Sample sample_;
184 bool sample_is_taken_; 181 bool sample_is_taken_;
185 v8::Isolate* isolate_; 182 v8::Isolate* isolate_;
186 CodeEntries code_entries_; 183 CodeEntries code_entries_;
187 184
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
242 239
243 const SamplingTestHelper::CodeEventEntry* entry; 240 const SamplingTestHelper::CodeEventEntry* entry;
244 entry = helper.FindEventEntry(sample.begin()[0]); 241 entry = helper.FindEventEntry(sample.begin()[0]);
245 CHECK(entry); 242 CHECK(entry);
246 CHECK(std::string::npos != entry->name.find("test_sampler_api_inner")); 243 CHECK(std::string::npos != entry->name.find("test_sampler_api_inner"));
247 244
248 entry = helper.FindEventEntry(sample.begin()[1]); 245 entry = helper.FindEventEntry(sample.begin()[1]);
249 CHECK(entry); 246 CHECK(entry);
250 CHECK(std::string::npos != entry->name.find("test_sampler_api_outer")); 247 CHECK(std::string::npos != entry->name.find("test_sampler_api_outer"));
251 } 248 }
OLDNEW
« no previous file with comments | « test/cctest/test-api.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698