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

Unified Diff: src/profile-generator.h

Issue 1582004: C++ profiles processor: wire up to VM. (Closed)
Patch Set: Created 10 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 side-by-side diff with in-line comments
Download patch
Index: src/profile-generator.h
diff --git a/src/profile-generator.h b/src/profile-generator.h
index b9f720d8efb086581d98974f605b1f8353e50e4b..83d7a25fcf33324ec87d240e0ce89c1b67230bf5 100644
--- a/src/profile-generator.h
+++ b/src/profile-generator.h
@@ -38,18 +38,25 @@ namespace internal {
class CodeEntry {
public:
// CodeEntry doesn't own name strings, just references them.
- INLINE(CodeEntry(Logger::LogEventsAndTags tag_,
- const char* name_,
- const char* resource_name_,
- int line_number_));
-
- INLINE(bool is_js_function());
- INLINE(const char* name()) { return name_; }
- INLINE(const char* resource_name()) { return name_; }
- INLINE(int line_number()) { return line_number_; }
+ INLINE(CodeEntry(Logger::LogEventsAndTags tag,
+ const char* name_prefix,
+ const char* name,
+ const char* resource_name,
+ int line_number));
+
+ INLINE(bool is_js_function() const);
+ INLINE(const char* name_prefix() const) { return name_prefix_; }
+ INLINE(bool has_name_prefix() const) { return name_prefix_[0] != '\0'; }
+ INLINE(const char* name() const) { return name_; }
+ INLINE(const char* resource_name() const) { return resource_name_; }
+ INLINE(int line_number() const) { return line_number_; }
+
+ static const char* kEmptyNamePrefix;
+ static const int kNoLineNumberInfo;
private:
Logger::LogEventsAndTags tag_;
+ const char* name_prefix_;
const char* name_;
const char* resource_name_;
int line_number_;
@@ -204,14 +211,13 @@ class CpuProfilesCollection {
CodeEntry* NewCodeEntry(Logger::LogEventsAndTags tag,
String* name, String* resource_name, int line_number);
CodeEntry* NewCodeEntry(Logger::LogEventsAndTags tag, const char* name);
+ CodeEntry* NewCodeEntry(Logger::LogEventsAndTags tag,
+ const char* name_prefix, String* name);
CodeEntry* NewCodeEntry(Logger::LogEventsAndTags tag, int args_count);
// Called from profile generator thread.
void AddPathToCurrentProfiles(const Vector<CodeEntry*>& path);
- // This will be moved to V8 API.
- static const int kNoLineNumberInfo = -1;
-
private:
const char* GetName(String* name);
const char* GetName(int args_count);
@@ -259,6 +265,12 @@ class ProfileGenerator {
}
INLINE(CodeEntry* NewCodeEntry(Logger::LogEventsAndTags tag,
+ const char* name_prefix,
+ String* name)) {
+ return profiles_->NewCodeEntry(tag, name_prefix, name);
+ }
+
+ INLINE(CodeEntry* NewCodeEntry(Logger::LogEventsAndTags tag,
int args_count)) {
return profiles_->NewCodeEntry(tag, args_count);
}
« src/platform-linux.cc ('K') | « src/platform-win32.cc ('k') | src/profile-generator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698