Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "src/v8.h" | 5 #include "src/v8.h" |
| 6 | 6 |
| 7 #include "src/cpu-profiler-inl.h" | 7 #include "src/cpu-profiler-inl.h" |
| 8 | 8 |
| 9 #include "src/compiler.h" | 9 #include "src/compiler.h" |
| 10 #include "src/frames-inl.h" | 10 #include "src/frames-inl.h" |
| (...skipping 208 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 219 rec->size = code->ExecutableSize(); | 219 rec->size = code->ExecutableSize(); |
| 220 rec->shared = NULL; | 220 rec->shared = NULL; |
| 221 processor_->Enqueue(evt_rec); | 221 processor_->Enqueue(evt_rec); |
| 222 } | 222 } |
| 223 | 223 |
| 224 | 224 |
| 225 void CpuProfiler::CodeCreateEvent(Logger::LogEventsAndTags tag, | 225 void CpuProfiler::CodeCreateEvent(Logger::LogEventsAndTags tag, |
| 226 Code* code, | 226 Code* code, |
| 227 SharedFunctionInfo* shared, | 227 SharedFunctionInfo* shared, |
| 228 CompilationInfo* info, | 228 CompilationInfo* info, |
| 229 Name* name) { | 229 Name* name) { |
|
yurys
2014/07/30 07:43:49
Could you rename the argument to script_name for c
alph
2014/07/30 09:12:58
Done.
| |
| 230 if (FilterOutCodeCreateEvent(tag)) return; | 230 if (FilterOutCodeCreateEvent(tag)) return; |
| 231 CodeEventsContainer evt_rec(CodeEventRecord::CODE_CREATION); | 231 CodeEventsContainer evt_rec(CodeEventRecord::CODE_CREATION); |
| 232 CodeCreateEventRecord* rec = &evt_rec.CodeCreateEventRecord_; | 232 CodeCreateEventRecord* rec = &evt_rec.CodeCreateEventRecord_; |
| 233 rec->start = code->address(); | 233 rec->start = code->address(); |
| 234 rec->entry = profiles_->NewCodeEntry(tag, profiles_->GetFunctionName(name)); | 234 rec->entry = profiles_->NewCodeEntry( |
| 235 tag, profiles_->GetFunctionName(shared->DebugName()), | |
| 236 CodeEntry::kEmptyNamePrefix, profiles_->GetName(name)); | |
| 235 if (info) { | 237 if (info) { |
| 236 rec->entry->set_no_frame_ranges(info->ReleaseNoFrameRanges()); | 238 rec->entry->set_no_frame_ranges(info->ReleaseNoFrameRanges()); |
| 237 } | 239 } |
| 238 if (shared->script()->IsScript()) { | 240 if (shared->script()->IsScript()) { |
| 239 ASSERT(Script::cast(shared->script())); | 241 ASSERT(Script::cast(shared->script())); |
| 240 Script* script = Script::cast(shared->script()); | 242 Script* script = Script::cast(shared->script()); |
| 241 rec->entry->set_script_id(script->id()->value()); | 243 rec->entry->set_script_id(script->id()->value()); |
| 242 rec->entry->set_bailout_reason( | 244 rec->entry->set_bailout_reason( |
| 243 GetBailoutReason(shared->DisableOptimizationReason())); | 245 GetBailoutReason(shared->DisableOptimizationReason())); |
| 244 } | 246 } |
| (...skipping 258 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 503 ReportBuiltinEventRecord* rec = &evt_rec.ReportBuiltinEventRecord_; | 505 ReportBuiltinEventRecord* rec = &evt_rec.ReportBuiltinEventRecord_; |
| 504 Builtins::Name id = static_cast<Builtins::Name>(i); | 506 Builtins::Name id = static_cast<Builtins::Name>(i); |
| 505 rec->start = builtins->builtin(id)->address(); | 507 rec->start = builtins->builtin(id)->address(); |
| 506 rec->builtin_id = id; | 508 rec->builtin_id = id; |
| 507 processor_->Enqueue(evt_rec); | 509 processor_->Enqueue(evt_rec); |
| 508 } | 510 } |
| 509 } | 511 } |
| 510 | 512 |
| 511 | 513 |
| 512 } } // namespace v8::internal | 514 } } // namespace v8::internal |
| OLD | NEW |