| 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 235 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 246 CodeCreateEventRecord* rec = &evt_rec.CodeCreateEventRecord_; | 246 CodeCreateEventRecord* rec = &evt_rec.CodeCreateEventRecord_; |
| 247 rec->start = code->address(); | 247 rec->start = code->address(); |
| 248 rec->entry = profiles_->NewCodeEntry(tag, profiles_->GetFunctionName(name)); | 248 rec->entry = profiles_->NewCodeEntry(tag, profiles_->GetFunctionName(name)); |
| 249 if (info) { | 249 if (info) { |
| 250 rec->entry->set_no_frame_ranges(info->ReleaseNoFrameRanges()); | 250 rec->entry->set_no_frame_ranges(info->ReleaseNoFrameRanges()); |
| 251 } | 251 } |
| 252 if (shared->script()->IsScript()) { | 252 if (shared->script()->IsScript()) { |
| 253 ASSERT(Script::cast(shared->script())); | 253 ASSERT(Script::cast(shared->script())); |
| 254 Script* script = Script::cast(shared->script()); | 254 Script* script = Script::cast(shared->script()); |
| 255 rec->entry->set_script_id(script->id()->value()); | 255 rec->entry->set_script_id(script->id()->value()); |
| 256 if (shared->optimization_disabled()) |
| 257 rec->entry->set_bailout_reason( |
| 258 profiles_->GetName(shared->bailout_reason())); |
| 256 } | 259 } |
| 257 rec->size = code->ExecutableSize(); | 260 rec->size = code->ExecutableSize(); |
| 258 rec->shared = shared->address(); | 261 rec->shared = shared->address(); |
| 259 processor_->Enqueue(evt_rec); | 262 processor_->Enqueue(evt_rec); |
| 260 } | 263 } |
| 261 | 264 |
| 262 | 265 |
| 263 void CpuProfiler::CodeCreateEvent(Logger::LogEventsAndTags tag, | 266 void CpuProfiler::CodeCreateEvent(Logger::LogEventsAndTags tag, |
| 264 Code* code, | 267 Code* code, |
| 265 SharedFunctionInfo* shared, | 268 SharedFunctionInfo* shared, |
| (...skipping 10 matching lines...) Expand all Loading... |
| 276 profiles_->GetName(source), | 279 profiles_->GetName(source), |
| 277 line); | 280 line); |
| 278 if (info) { | 281 if (info) { |
| 279 rec->entry->set_no_frame_ranges(info->ReleaseNoFrameRanges()); | 282 rec->entry->set_no_frame_ranges(info->ReleaseNoFrameRanges()); |
| 280 } | 283 } |
| 281 ASSERT(Script::cast(shared->script())); | 284 ASSERT(Script::cast(shared->script())); |
| 282 Script* script = Script::cast(shared->script()); | 285 Script* script = Script::cast(shared->script()); |
| 283 rec->entry->set_script_id(script->id()->value()); | 286 rec->entry->set_script_id(script->id()->value()); |
| 284 rec->size = code->ExecutableSize(); | 287 rec->size = code->ExecutableSize(); |
| 285 rec->shared = shared->address(); | 288 rec->shared = shared->address(); |
| 289 if (shared->optimization_disabled()) |
| 290 rec->entry->set_bailout_reason( |
| 291 profiles_->GetName(shared->bailout_reason())); |
| 286 processor_->Enqueue(evt_rec); | 292 processor_->Enqueue(evt_rec); |
| 287 } | 293 } |
| 288 | 294 |
| 289 | 295 |
| 290 void CpuProfiler::CodeCreateEvent(Logger::LogEventsAndTags tag, | 296 void CpuProfiler::CodeCreateEvent(Logger::LogEventsAndTags tag, |
| 291 Code* code, | 297 Code* code, |
| 292 int args_count) { | 298 int args_count) { |
| 293 if (FilterOutCodeCreateEvent(tag)) return; | 299 if (FilterOutCodeCreateEvent(tag)) return; |
| 294 CodeEventsContainer evt_rec(CodeEventRecord::CODE_CREATION); | 300 CodeEventsContainer evt_rec(CodeEventRecord::CODE_CREATION); |
| 295 CodeCreateEventRecord* rec = &evt_rec.CodeCreateEventRecord_; | 301 CodeCreateEventRecord* rec = &evt_rec.CodeCreateEventRecord_; |
| (...skipping 204 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 500 ReportBuiltinEventRecord* rec = &evt_rec.ReportBuiltinEventRecord_; | 506 ReportBuiltinEventRecord* rec = &evt_rec.ReportBuiltinEventRecord_; |
| 501 Builtins::Name id = static_cast<Builtins::Name>(i); | 507 Builtins::Name id = static_cast<Builtins::Name>(i); |
| 502 rec->start = builtins->builtin(id)->address(); | 508 rec->start = builtins->builtin(id)->address(); |
| 503 rec->builtin_id = id; | 509 rec->builtin_id = id; |
| 504 processor_->Enqueue(evt_rec); | 510 processor_->Enqueue(evt_rec); |
| 505 } | 511 } |
| 506 } | 512 } |
| 507 | 513 |
| 508 | 514 |
| 509 } } // namespace v8::internal | 515 } } // namespace v8::internal |
| OLD | NEW |