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

Unified Diff: src/profile-generator.h

Issue 3426008: Show RegExp calls in the profile. (Closed)
Patch Set: Created 10 years, 3 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/cpu-profiler-inl.h ('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 c2bc4ce2835d1ecb99928c26141fd8cdc4d10e46..a2ac82019b0b72e20e9e426a84c7bf5859735792 100644
--- a/src/profile-generator.h
+++ b/src/profile-generator.h
@@ -100,17 +100,17 @@ 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 call_uid() const) { return call_uid_; }
INLINE(int security_token_id() const) { return security_token_id_; }
INLINE(static bool is_js_function_tag(Logger::LogEventsAndTags tag));
void CopyData(const CodeEntry& source);
+ uint32_t GetCallUid() const;
+ bool IsSameAs(CodeEntry* entry) const;
static const char* kEmptyNamePrefix;
private:
- unsigned call_uid_;
Logger::LogEventsAndTags tag_;
const char* name_prefix_;
const char* name_;
@@ -118,8 +118,6 @@ class CodeEntry {
int line_number_;
int security_token_id_;
- static unsigned next_call_uid_;
-
DISALLOW_COPY_AND_ASSIGN(CodeEntry);
};
@@ -147,11 +145,12 @@ class ProfileNode {
private:
INLINE(static bool CodeEntriesMatch(void* entry1, void* entry2)) {
- return entry1 == entry2;
+ return reinterpret_cast<CodeEntry*>(entry1)->IsSameAs(
+ reinterpret_cast<CodeEntry*>(entry2));
}
INLINE(static uint32_t CodeEntryHash(CodeEntry* entry)) {
- return static_cast<int32_t>(reinterpret_cast<intptr_t>(entry));
+ return entry->GetCallUid();
}
ProfileTree* tree_;
« no previous file with comments | « src/cpu-profiler-inl.h ('k') | src/profile-generator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698