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 // 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 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 82 Address start, | 82 Address start, |
| 83 unsigned size, | 83 unsigned size, |
| 84 Address shared, | 84 Address shared, |
| 85 CompilationInfo* info) { | 85 CompilationInfo* info) { |
| 86 if (FilterOutCodeCreateEvent(tag)) return; | 86 if (FilterOutCodeCreateEvent(tag)) return; |
| 87 CodeEventsContainer evt_rec; | 87 CodeEventsContainer evt_rec; |
| 88 CodeCreateEventRecord* rec = &evt_rec.CodeCreateEventRecord_; | 88 CodeCreateEventRecord* rec = &evt_rec.CodeCreateEventRecord_; |
| 89 rec->type = CodeEventRecord::CODE_CREATION; | 89 rec->type = CodeEventRecord::CODE_CREATION; |
| 90 rec->order = ++enqueue_order_; | 90 rec->order = ++enqueue_order_; |
| 91 rec->start = start; | 91 rec->start = start; |
| 92 rec->entry = profiles_->NewCodeEntry(tag, name, resource_name, line_number); | 92 int script_id = v8::CpuProfileNode::kNoScriptId; |
| 93 if (info) { | |
| 94 Object* id = info->script()->id(); | |
| 95 script_id = Smi::cast(id)->value(); | |
| 96 } | |
|
yurys
2013/06/25 09:16:55
In case when there are no |info| you may still be
| |
| 97 rec->entry = profiles_->NewCodeEntry(tag, name, script_id, | |
| 98 resource_name, line_number); | |
| 93 if (info) { | 99 if (info) { |
| 94 rec->entry->set_no_frame_ranges(info->ReleaseNoFrameRanges()); | 100 rec->entry->set_no_frame_ranges(info->ReleaseNoFrameRanges()); |
| 95 } | 101 } |
| 96 rec->size = size; | 102 rec->size = size; |
| 97 rec->shared = shared; | 103 rec->shared = shared; |
| 98 events_buffer_.Enqueue(evt_rec); | 104 events_buffer_.Enqueue(evt_rec); |
| 99 } | 105 } |
| 100 | 106 |
| 101 | 107 |
| 102 void ProfilerEventsProcessor::CodeCreateEvent(Logger::LogEventsAndTags tag, | 108 void ProfilerEventsProcessor::CodeCreateEvent(Logger::LogEventsAndTags tag, |
| (...skipping 416 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 519 processor_->Join(); | 525 processor_->Join(); |
| 520 delete processor_; | 526 delete processor_; |
| 521 delete generator_; | 527 delete generator_; |
| 522 processor_ = NULL; | 528 processor_ = NULL; |
| 523 generator_ = NULL; | 529 generator_ = NULL; |
| 524 logger->logging_nesting_ = saved_logging_nesting_; | 530 logger->logging_nesting_ = saved_logging_nesting_; |
| 525 } | 531 } |
| 526 | 532 |
| 527 | 533 |
| 528 } } // namespace v8::internal | 534 } } // namespace v8::internal |
| OLD | NEW |