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

Unified Diff: src/profile-generator.h

Issue 1547023: C++ profiler: publish the new API, make compatible with WebKit / Chromium. (Closed)
Patch Set: comments addressed Created 10 years, 8 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 | « src/platform-linux.cc ('k') | src/profile-generator.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/profile-generator.h
diff --git a/src/profile-generator.h b/src/profile-generator.h
index 83d7a25fcf33324ec87d240e0ce89c1b67230bf5..892fdeaa2b5749ef985263da414288ce72189179 100644
--- a/src/profile-generator.h
+++ b/src/profile-generator.h
@@ -50,17 +50,20 @@ class CodeEntry {
INLINE(const char* name() const) { return name_; }
INLINE(const char* resource_name() const) { return resource_name_; }
INLINE(int line_number() const) { return line_number_; }
+ INLINE(unsigned long call_uid() const) { return call_uid_; }
static const char* kEmptyNamePrefix;
- static const int kNoLineNumberInfo;
private:
+ const unsigned long call_uid_;
Logger::LogEventsAndTags tag_;
const char* name_prefix_;
const char* name_;
const char* resource_name_;
int line_number_;
+ static unsigned long next_call_uid_;
+
DISALLOW_COPY_AND_ASSIGN(CodeEntry);
};
@@ -103,7 +106,7 @@ class ProfileNode {
class ProfileTree {
public:
- ProfileTree() : root_(new ProfileNode(NULL)) { }
+ ProfileTree();
~ProfileTree();
void AddPathFromEnd(const Vector<CodeEntry*>& path);
@@ -121,6 +124,7 @@ class ProfileTree {
template <typename Callback>
void TraverseBreadthFirstPostOrder(Callback* callback);
+ CodeEntry root_entry_;
ProfileNode* root_;
DISALLOW_COPY_AND_ASSIGN(ProfileTree);
@@ -219,6 +223,7 @@ class CpuProfilesCollection {
void AddPathToCurrentProfiles(const Vector<CodeEntry*>& path);
private:
+ const char* GetFunctionName(String* name);
const char* GetName(String* name);
const char* GetName(int args_count);
@@ -282,6 +287,7 @@ class ProfileGenerator {
private:
CpuProfilesCollection* profiles_;
CodeMap code_map_;
+ CodeEntry* program_entry_;
DISALLOW_COPY_AND_ASSIGN(ProfileGenerator);
};
« no previous file with comments | « src/platform-linux.cc ('k') | src/profile-generator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698