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/deoptimizer.h" | 10 #include "src/deoptimizer.h" |
(...skipping 233 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
244 CodeEventsContainer evt_rec(CodeEventRecord::CODE_CREATION); | 244 CodeEventsContainer evt_rec(CodeEventRecord::CODE_CREATION); |
245 CodeCreateEventRecord* rec = &evt_rec.CodeCreateEventRecord_; | 245 CodeCreateEventRecord* rec = &evt_rec.CodeCreateEventRecord_; |
246 rec->start = code->address(); | 246 rec->start = code->address(); |
247 rec->entry = profiles_->NewCodeEntry( | 247 rec->entry = profiles_->NewCodeEntry( |
248 tag, profiles_->GetFunctionName(shared->DebugName()), | 248 tag, profiles_->GetFunctionName(shared->DebugName()), |
249 CodeEntry::kEmptyNamePrefix, profiles_->GetName(script_name), | 249 CodeEntry::kEmptyNamePrefix, profiles_->GetName(script_name), |
250 CpuProfileNode::kNoLineNumberInfo, CpuProfileNode::kNoColumnNumberInfo, | 250 CpuProfileNode::kNoLineNumberInfo, CpuProfileNode::kNoColumnNumberInfo, |
251 NULL, code->instruction_start()); | 251 NULL, code->instruction_start()); |
252 if (info) { | 252 if (info) { |
253 rec->entry->set_no_frame_ranges(info->ReleaseNoFrameRanges()); | 253 rec->entry->set_no_frame_ranges(info->ReleaseNoFrameRanges()); |
| 254 rec->entry->set_inlined_function_infos(info->inlined_function_infos()); |
254 } | 255 } |
255 rec->entry->FillFunctionInfo(shared); | 256 rec->entry->FillFunctionInfo(shared); |
256 rec->size = code->ExecutableSize(); | 257 rec->size = code->ExecutableSize(); |
257 processor_->Enqueue(evt_rec); | 258 processor_->Enqueue(evt_rec); |
258 } | 259 } |
259 | 260 |
260 | 261 |
261 void CpuProfiler::CodeCreateEvent(Logger::LogEventsAndTags tag, Code* code, | 262 void CpuProfiler::CodeCreateEvent(Logger::LogEventsAndTags tag, Code* code, |
262 SharedFunctionInfo* shared, | 263 SharedFunctionInfo* shared, |
263 CompilationInfo* info, Name* script_name, | 264 CompilationInfo* info, Name* script_name, |
(...skipping 17 matching lines...) Expand all Loading... |
281 } | 282 } |
282 } | 283 } |
283 } | 284 } |
284 } | 285 } |
285 rec->entry = profiles_->NewCodeEntry( | 286 rec->entry = profiles_->NewCodeEntry( |
286 tag, profiles_->GetFunctionName(shared->DebugName()), | 287 tag, profiles_->GetFunctionName(shared->DebugName()), |
287 CodeEntry::kEmptyNamePrefix, profiles_->GetName(script_name), line, | 288 CodeEntry::kEmptyNamePrefix, profiles_->GetName(script_name), line, |
288 column, line_table, code->instruction_start()); | 289 column, line_table, code->instruction_start()); |
289 if (info) { | 290 if (info) { |
290 rec->entry->set_no_frame_ranges(info->ReleaseNoFrameRanges()); | 291 rec->entry->set_no_frame_ranges(info->ReleaseNoFrameRanges()); |
| 292 rec->entry->set_inlined_function_infos(info->inlined_function_infos()); |
291 } | 293 } |
292 rec->entry->FillFunctionInfo(shared); | 294 rec->entry->FillFunctionInfo(shared); |
293 rec->size = code->ExecutableSize(); | 295 rec->size = code->ExecutableSize(); |
294 processor_->Enqueue(evt_rec); | 296 processor_->Enqueue(evt_rec); |
295 } | 297 } |
296 | 298 |
297 | 299 |
298 void CpuProfiler::CodeCreateEvent(Logger::LogEventsAndTags tag, | 300 void CpuProfiler::CodeCreateEvent(Logger::LogEventsAndTags tag, |
299 Code* code, | 301 Code* code, |
300 int args_count) { | 302 int args_count) { |
(...skipping 219 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
520 ReportBuiltinEventRecord* rec = &evt_rec.ReportBuiltinEventRecord_; | 522 ReportBuiltinEventRecord* rec = &evt_rec.ReportBuiltinEventRecord_; |
521 Builtins::Name id = static_cast<Builtins::Name>(i); | 523 Builtins::Name id = static_cast<Builtins::Name>(i); |
522 rec->start = builtins->builtin(id)->address(); | 524 rec->start = builtins->builtin(id)->address(); |
523 rec->builtin_id = id; | 525 rec->builtin_id = id; |
524 processor_->Enqueue(evt_rec); | 526 processor_->Enqueue(evt_rec); |
525 } | 527 } |
526 } | 528 } |
527 | 529 |
528 | 530 |
529 } } // namespace v8::internal | 531 } } // namespace v8::internal |
OLD | NEW |