OLD | NEW |
---|---|
1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 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 <stdarg.h> | 5 #include <stdarg.h> |
6 | 6 |
7 #include "src/v8.h" | 7 #include "src/v8.h" |
8 | 8 |
9 #include "src/bootstrapper.h" | 9 #include "src/bootstrapper.h" |
10 #include "src/code-stubs.h" | 10 #include "src/code-stubs.h" |
(...skipping 652 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
663 | 663 |
664 void JitLogger::LogRecordedBuffer(Code* code, | 664 void JitLogger::LogRecordedBuffer(Code* code, |
665 SharedFunctionInfo* shared, | 665 SharedFunctionInfo* shared, |
666 const char* name, | 666 const char* name, |
667 int length) { | 667 int length) { |
668 JitCodeEvent event; | 668 JitCodeEvent event; |
669 memset(&event, 0, sizeof(event)); | 669 memset(&event, 0, sizeof(event)); |
670 event.type = JitCodeEvent::CODE_ADDED; | 670 event.type = JitCodeEvent::CODE_ADDED; |
671 event.code_start = code->instruction_start(); | 671 event.code_start = code->instruction_start(); |
672 event.code_len = code->instruction_size(); | 672 event.code_len = code->instruction_size(); |
673 Handle<Script> script_handle; | 673 Handle<SharedFunctionInfo> script_handle; |
danno
2014/06/30 09:25:28
this variable name is now misleading. Should be sh
| |
674 if (shared && shared->script()->IsScript()) { | 674 if (shared && shared->script()->IsScript()) { |
675 script_handle = Handle<Script>(Script::cast(shared->script())); | 675 script_handle = Handle<SharedFunctionInfo>(shared); |
676 } | 676 } |
677 event.script = ToApiHandle<v8::Script>(script_handle); | 677 event.script = ToApiHandle<v8::UnboundScript>(script_handle); |
678 event.name.str = name; | 678 event.name.str = name; |
679 event.name.len = length; | 679 event.name.len = length; |
680 code_event_handler_(&event); | 680 code_event_handler_(&event); |
681 } | 681 } |
682 | 682 |
683 | 683 |
684 void JitLogger::CodeMoveEvent(Address from, Address to) { | 684 void JitLogger::CodeMoveEvent(Address from, Address to) { |
685 Code* from_code = Code::cast(HeapObject::FromAddress(from)); | 685 Code* from_code = Code::cast(HeapObject::FromAddress(from)); |
686 | 686 |
687 JitCodeEvent event; | 687 JitCodeEvent event; |
(...skipping 1435 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
2123 if (jit_logger_) { | 2123 if (jit_logger_) { |
2124 removeCodeEventListener(jit_logger_); | 2124 removeCodeEventListener(jit_logger_); |
2125 delete jit_logger_; | 2125 delete jit_logger_; |
2126 jit_logger_ = NULL; | 2126 jit_logger_ = NULL; |
2127 } | 2127 } |
2128 | 2128 |
2129 return log_->Close(); | 2129 return log_->Close(); |
2130 } | 2130 } |
2131 | 2131 |
2132 } } // namespace v8::internal | 2132 } } // namespace v8::internal |
OLD | NEW |