OLD | NEW |
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 225 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
236 CodeCreateEventRecord* rec = &evt_rec.CodeCreateEventRecord_; | 236 CodeCreateEventRecord* rec = &evt_rec.CodeCreateEventRecord_; |
237 rec->start = code->address(); | 237 rec->start = code->address(); |
238 rec->entry = profiles_->NewCodeEntry(tag, profiles_->GetFunctionName(name)); | 238 rec->entry = profiles_->NewCodeEntry(tag, profiles_->GetFunctionName(name)); |
239 if (info) { | 239 if (info) { |
240 rec->entry->set_no_frame_ranges(info->ReleaseNoFrameRanges()); | 240 rec->entry->set_no_frame_ranges(info->ReleaseNoFrameRanges()); |
241 } | 241 } |
242 if (shared->script()->IsScript()) { | 242 if (shared->script()->IsScript()) { |
243 ASSERT(Script::cast(shared->script())); | 243 ASSERT(Script::cast(shared->script())); |
244 Script* script = Script::cast(shared->script()); | 244 Script* script = Script::cast(shared->script()); |
245 rec->entry->set_script_id(script->id()->value()); | 245 rec->entry->set_script_id(script->id()->value()); |
| 246 rec->entry->set_bailout_reason( |
| 247 GetBailoutReason(shared->DisableOptimizationReason())); |
246 } | 248 } |
247 rec->size = code->ExecutableSize(); | 249 rec->size = code->ExecutableSize(); |
248 rec->shared = shared->address(); | 250 rec->shared = shared->address(); |
249 processor_->Enqueue(evt_rec); | 251 processor_->Enqueue(evt_rec); |
250 } | 252 } |
251 | 253 |
252 | 254 |
253 void CpuProfiler::CodeCreateEvent(Logger::LogEventsAndTags tag, | 255 void CpuProfiler::CodeCreateEvent(Logger::LogEventsAndTags tag, |
254 Code* code, | 256 Code* code, |
255 SharedFunctionInfo* shared, | 257 SharedFunctionInfo* shared, |
(...skipping 10 matching lines...) Expand all Loading... |
266 profiles_->GetName(source), | 268 profiles_->GetName(source), |
267 line); | 269 line); |
268 if (info) { | 270 if (info) { |
269 rec->entry->set_no_frame_ranges(info->ReleaseNoFrameRanges()); | 271 rec->entry->set_no_frame_ranges(info->ReleaseNoFrameRanges()); |
270 } | 272 } |
271 ASSERT(Script::cast(shared->script())); | 273 ASSERT(Script::cast(shared->script())); |
272 Script* script = Script::cast(shared->script()); | 274 Script* script = Script::cast(shared->script()); |
273 rec->entry->set_script_id(script->id()->value()); | 275 rec->entry->set_script_id(script->id()->value()); |
274 rec->size = code->ExecutableSize(); | 276 rec->size = code->ExecutableSize(); |
275 rec->shared = shared->address(); | 277 rec->shared = shared->address(); |
| 278 rec->entry->set_bailout_reason( |
| 279 GetBailoutReason(shared->DisableOptimizationReason())); |
276 processor_->Enqueue(evt_rec); | 280 processor_->Enqueue(evt_rec); |
277 } | 281 } |
278 | 282 |
279 | 283 |
280 void CpuProfiler::CodeCreateEvent(Logger::LogEventsAndTags tag, | 284 void CpuProfiler::CodeCreateEvent(Logger::LogEventsAndTags tag, |
281 Code* code, | 285 Code* code, |
282 int args_count) { | 286 int args_count) { |
283 if (FilterOutCodeCreateEvent(tag)) return; | 287 if (FilterOutCodeCreateEvent(tag)) return; |
284 CodeEventsContainer evt_rec(CodeEventRecord::CODE_CREATION); | 288 CodeEventsContainer evt_rec(CodeEventRecord::CODE_CREATION); |
285 CodeCreateEventRecord* rec = &evt_rec.CodeCreateEventRecord_; | 289 CodeCreateEventRecord* rec = &evt_rec.CodeCreateEventRecord_; |
(...skipping 198 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
484 ReportBuiltinEventRecord* rec = &evt_rec.ReportBuiltinEventRecord_; | 488 ReportBuiltinEventRecord* rec = &evt_rec.ReportBuiltinEventRecord_; |
485 Builtins::Name id = static_cast<Builtins::Name>(i); | 489 Builtins::Name id = static_cast<Builtins::Name>(i); |
486 rec->start = builtins->builtin(id)->address(); | 490 rec->start = builtins->builtin(id)->address(); |
487 rec->builtin_id = id; | 491 rec->builtin_id = id; |
488 processor_->Enqueue(evt_rec); | 492 processor_->Enqueue(evt_rec); |
489 } | 493 } |
490 } | 494 } |
491 | 495 |
492 | 496 |
493 } } // namespace v8::internal | 497 } } // namespace v8::internal |
OLD | NEW |