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

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

Issue 2061623002: Introduce JIT code events dispatcher for the isolate. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: rebaseline 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 | « src/profiler/profile-generator.h ('k') | src/profiler/profile-generator-inl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/profiler/profile-generator.cc
diff --git a/src/profiler/profile-generator.cc b/src/profiler/profile-generator.cc
index 2351eb2cd58e4b5e22995726782323413a4dc9cc..75e0897d2e3ed9eda732eecd055282ee44417a2b 100644
--- a/src/profiler/profile-generator.cc
+++ b/src/profiler/profile-generator.cc
@@ -93,7 +93,7 @@ bool CodeEntry::IsSameFunctionAs(CodeEntry* entry) const {
void CodeEntry::SetBuiltinId(Builtins::Name id) {
- bit_field_ = TagField::update(bit_field_, Logger::BUILTIN_TAG);
+ bit_field_ = TagField::update(bit_field_, CodeEventListener::BUILTIN_TAG);
bit_field_ = BuiltinIdField::update(bit_field_, id);
}
@@ -268,16 +268,14 @@ class DeleteNodesCallback {
void AfterChildTraversed(ProfileNode*, ProfileNode*) { }
};
-
ProfileTree::ProfileTree(Isolate* isolate)
- : root_entry_(Logger::FUNCTION_TAG, "(root)"),
+ : root_entry_(CodeEventListener::FUNCTION_TAG, "(root)"),
next_node_id_(1),
root_(new ProfileNode(this, &root_entry_)),
isolate_(isolate),
next_function_id_(1),
function_ids_(ProfileNode::CodeEntriesMatch) {}
-
ProfileTree::~ProfileTree() {
DeleteNodesCallback cb;
TraverseDepthFirst(&cb);
@@ -528,11 +526,10 @@ void CpuProfilesCollection::AddPathToCurrentProfiles(
current_profiles_semaphore_.Signal();
}
-
CodeEntry* CpuProfilesCollection::NewCodeEntry(
- Logger::LogEventsAndTags tag, const char* name, const char* name_prefix,
- const char* resource_name, int line_number, int column_number,
- JITLineInfoTable* line_info, Address instruction_start) {
+ CodeEventListener::LogEventsAndTags tag, const char* name,
+ const char* name_prefix, const char* resource_name, int line_number,
+ int column_number, JITLineInfoTable* line_info, Address instruction_start) {
CodeEntry* code_entry =
new CodeEntry(tag, name, name_prefix, resource_name, line_number,
column_number, line_info, instruction_start);
@@ -550,21 +547,16 @@ const char* const ProfileGenerator::kGarbageCollectorEntryName =
const char* const ProfileGenerator::kUnresolvedFunctionName =
"(unresolved function)";
-
ProfileGenerator::ProfileGenerator(CpuProfilesCollection* profiles)
: profiles_(profiles),
- program_entry_(
- profiles->NewCodeEntry(Logger::FUNCTION_TAG, kProgramEntryName)),
- idle_entry_(
- profiles->NewCodeEntry(Logger::FUNCTION_TAG, kIdleEntryName)),
- gc_entry_(
- profiles->NewCodeEntry(Logger::BUILTIN_TAG,
- kGarbageCollectorEntryName)),
- unresolved_entry_(
- profiles->NewCodeEntry(Logger::FUNCTION_TAG,
- kUnresolvedFunctionName)) {
-}
-
+ program_entry_(profiles->NewCodeEntry(CodeEventListener::FUNCTION_TAG,
+ kProgramEntryName)),
+ idle_entry_(profiles->NewCodeEntry(CodeEventListener::FUNCTION_TAG,
+ kIdleEntryName)),
+ gc_entry_(profiles->NewCodeEntry(CodeEventListener::BUILTIN_TAG,
+ kGarbageCollectorEntryName)),
+ unresolved_entry_(profiles->NewCodeEntry(CodeEventListener::FUNCTION_TAG,
+ kUnresolvedFunctionName)) {}
void ProfileGenerator::RecordTickSample(const TickSample& sample) {
std::vector<CodeEntry*> entries;
« no previous file with comments | « src/profiler/profile-generator.h ('k') | src/profiler/profile-generator-inl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698