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

Side by Side Diff: src/profiler/profile-generator.h

Issue 2369963002: [base] Remove PointersMatch, making a separate std::equals hashmap (Closed)
Patch Set: Fix the other simulators Created 4 years, 2 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 | « src/profiler/heap-snapshot-generator.cc ('k') | src/profiler/strings-storage.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2011 the V8 project authors. All rights reserved. 1 // Copyright 2011 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 #ifndef V8_PROFILER_PROFILE_GENERATOR_H_ 5 #ifndef V8_PROFILER_PROFILE_GENERATOR_H_
6 #define V8_PROFILER_PROFILE_GENERATOR_H_ 6 #define V8_PROFILER_PROFILE_GENERATOR_H_
7 7
8 #include <map> 8 #include <map>
9 #include "src/allocation.h" 9 #include "src/allocation.h"
10 #include "src/base/hashmap.h" 10 #include "src/base/hashmap.h"
(...skipping 203 matching lines...) Expand 10 before | Expand all | Expand 10 after
214 214
215 private: 215 private:
216 static uint32_t CodeEntryHash(CodeEntry* entry) { return entry->GetHash(); } 216 static uint32_t CodeEntryHash(CodeEntry* entry) { return entry->GetHash(); }
217 217
218 static bool LineTickMatch(void* a, void* b) { return a == b; } 218 static bool LineTickMatch(void* a, void* b) { return a == b; }
219 219
220 ProfileTree* tree_; 220 ProfileTree* tree_;
221 CodeEntry* entry_; 221 CodeEntry* entry_;
222 unsigned self_ticks_; 222 unsigned self_ticks_;
223 // Mapping from CodeEntry* to ProfileNode* 223 // Mapping from CodeEntry* to ProfileNode*
224 base::HashMap children_; 224 base::CustomMatcherHashMap children_;
225 List<ProfileNode*> children_list_; 225 List<ProfileNode*> children_list_;
226 unsigned id_; 226 unsigned id_;
227 base::HashMap line_ticks_; 227 base::CustomMatcherHashMap line_ticks_;
228 228
229 std::vector<CpuProfileDeoptInfo> deopt_infos_; 229 std::vector<CpuProfileDeoptInfo> deopt_infos_;
230 230
231 DISALLOW_COPY_AND_ASSIGN(ProfileNode); 231 DISALLOW_COPY_AND_ASSIGN(ProfileNode);
232 }; 232 };
233 233
234 234
235 class ProfileTree { 235 class ProfileTree {
236 public: 236 public:
237 explicit ProfileTree(Isolate* isolate); 237 explicit ProfileTree(Isolate* isolate);
(...skipping 16 matching lines...) Expand all
254 private: 254 private:
255 template <typename Callback> 255 template <typename Callback>
256 void TraverseDepthFirst(Callback* callback); 256 void TraverseDepthFirst(Callback* callback);
257 257
258 CodeEntry root_entry_; 258 CodeEntry root_entry_;
259 unsigned next_node_id_; 259 unsigned next_node_id_;
260 ProfileNode* root_; 260 ProfileNode* root_;
261 Isolate* isolate_; 261 Isolate* isolate_;
262 262
263 unsigned next_function_id_; 263 unsigned next_function_id_;
264 base::HashMap function_ids_; 264 base::CustomMatcherHashMap function_ids_;
265 265
266 DISALLOW_COPY_AND_ASSIGN(ProfileTree); 266 DISALLOW_COPY_AND_ASSIGN(ProfileTree);
267 }; 267 };
268 268
269 269
270 class CpuProfile { 270 class CpuProfile {
271 public: 271 public:
272 CpuProfile(CpuProfiler* profiler, const char* title, bool record_samples); 272 CpuProfile(CpuProfiler* profiler, const char* title, bool record_samples);
273 273
274 // Add pc -> ... -> main() call path to the profile. 274 // Add pc -> ... -> main() call path to the profile.
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after
379 CodeMap code_map_; 379 CodeMap code_map_;
380 380
381 DISALLOW_COPY_AND_ASSIGN(ProfileGenerator); 381 DISALLOW_COPY_AND_ASSIGN(ProfileGenerator);
382 }; 382 };
383 383
384 384
385 } // namespace internal 385 } // namespace internal
386 } // namespace v8 386 } // namespace v8
387 387
388 #endif // V8_PROFILER_PROFILE_GENERATOR_H_ 388 #endif // V8_PROFILER_PROFILE_GENERATOR_H_
OLDNEW
« no previous file with comments | « src/profiler/heap-snapshot-generator.cc ('k') | src/profiler/strings-storage.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698