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

Side by Side Diff: src/cpu-profiler.cc

Issue 19916002: Move CpuProfiler code create events behind Logger code api. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: cosmetic changes Created 7 years, 5 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/cpu-profiler.h ('k') | src/log.cc » ('j') | src/log.cc » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 246 matching lines...) Expand 10 before | Expand all | Expand 10 after
257 rec->size = code->ExecutableSize(); 257 rec->size = code->ExecutableSize();
258 rec->shared = shared->address(); 258 rec->shared = shared->address();
259 processor_->Enqueue(evt_rec); 259 processor_->Enqueue(evt_rec);
260 } 260 }
261 261
262 262
263 void CpuProfiler::CodeCreateEvent(Logger::LogEventsAndTags tag, 263 void CpuProfiler::CodeCreateEvent(Logger::LogEventsAndTags tag,
264 Code* code, 264 Code* code,
265 SharedFunctionInfo* shared, 265 SharedFunctionInfo* shared,
266 CompilationInfo* info, 266 CompilationInfo* info,
267 String* source, int line) { 267 Name* source, int line) {
268 if (FilterOutCodeCreateEvent(tag)) return; 268 if (FilterOutCodeCreateEvent(tag)) return;
269 CodeEventsContainer evt_rec(CodeEventRecord::CODE_CREATION); 269 CodeEventsContainer evt_rec(CodeEventRecord::CODE_CREATION);
270 CodeCreateEventRecord* rec = &evt_rec.CodeCreateEventRecord_; 270 CodeCreateEventRecord* rec = &evt_rec.CodeCreateEventRecord_;
271 rec->start = code->address(); 271 rec->start = code->address();
272 rec->entry = profiles_->NewCodeEntry( 272 rec->entry = profiles_->NewCodeEntry(
273 tag, 273 tag,
274 profiles_->GetFunctionName(shared->DebugName()), 274 profiles_->GetFunctionName(shared->DebugName()),
275 CodeEntry::kEmptyNamePrefix, 275 CodeEntry::kEmptyNamePrefix,
276 profiles_->GetName(source), 276 profiles_->GetName(source),
277 line); 277 line);
(...skipping 224 matching lines...) Expand 10 before | Expand all | Expand 10 after
502 ReportBuiltinEventRecord* rec = &evt_rec.ReportBuiltinEventRecord_; 502 ReportBuiltinEventRecord* rec = &evt_rec.ReportBuiltinEventRecord_;
503 Builtins::Name id = static_cast<Builtins::Name>(i); 503 Builtins::Name id = static_cast<Builtins::Name>(i);
504 rec->start = builtins->builtin(id)->address(); 504 rec->start = builtins->builtin(id)->address();
505 rec->builtin_id = id; 505 rec->builtin_id = id;
506 processor_->Enqueue(evt_rec); 506 processor_->Enqueue(evt_rec);
507 } 507 }
508 } 508 }
509 509
510 510
511 } } // namespace v8::internal 511 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/cpu-profiler.h ('k') | src/log.cc » ('j') | src/log.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698