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

Unified Diff: src/profiler/profile-generator.h

Issue 2047243002: Make use of std::map for profiler code map. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | src/profiler/profile-generator.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/profiler/profile-generator.h
diff --git a/src/profiler/profile-generator.h b/src/profiler/profile-generator.h
index 5c017e1876fb6e62caa156875e9b1f7adab2d9fe..c73e96d764cffc541ff827f355d02000c6d07377 100644
--- a/src/profiler/profile-generator.h
+++ b/src/profiler/profile-generator.h
@@ -263,16 +263,13 @@ class CpuProfile {
DISALLOW_COPY_AND_ASSIGN(CpuProfile);
};
-
class CodeMap {
public:
CodeMap() {}
- ~CodeMap();
jochen (gone - plz use gerrit) 2016/06/08 15:01:40 why no dtor?
alph 2016/06/08 21:48:11 Why would I need one? The CodeMap has the only ins
+
void AddCode(Address addr, CodeEntry* entry, unsigned size);
void MoveCode(Address from, Address to);
CodeEntry* FindEntry(Address addr);
- int GetSharedId(Address addr);
-
void Print();
private:
@@ -283,30 +280,13 @@ class CodeMap {
unsigned size;
};
- struct CodeTreeConfig {
- typedef Address Key;
- typedef CodeEntryInfo Value;
- static const Key kNoKey;
- static const Value NoValue() { return CodeEntryInfo(NULL, 0); }
- static int Compare(const Key& a, const Key& b) {
- return a < b ? -1 : (a > b ? 1 : 0);
- }
- };
- typedef SplayTree<CodeTreeConfig> CodeTree;
-
- class CodeTreePrinter {
- public:
- void Call(const Address& key, const CodeEntryInfo& value);
- };
-
void DeleteAllCoveredCode(Address start, Address end);
- CodeTree tree_;
+ std::map<Address, CodeEntryInfo> code_map_;
DISALLOW_COPY_AND_ASSIGN(CodeMap);
};
-
class CpuProfilesCollection {
public:
explicit CpuProfilesCollection(Heap* heap);
« no previous file with comments | « no previous file | src/profiler/profile-generator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698