Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(220)

Side by Side Diff: src/log.cc

Issue 334263018: Fix the vtune support bug. (Closed) Base URL: https://github.com/v8/v8.git@master
Patch Set: Created 6 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « include/v8.h ('k') | src/third_party/vtune/vtune-jit.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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/base/platform/platform.h" 9 #include "src/base/platform/platform.h"
10 #include "src/bootstrapper.h" 10 #include "src/bootstrapper.h"
(...skipping 655 matching lines...) Expand 10 before | Expand all | Expand 10 after
666 666
667 void JitLogger::LogRecordedBuffer(Code* code, 667 void JitLogger::LogRecordedBuffer(Code* code,
668 SharedFunctionInfo* shared, 668 SharedFunctionInfo* shared,
669 const char* name, 669 const char* name,
670 int length) { 670 int length) {
671 JitCodeEvent event; 671 JitCodeEvent event;
672 memset(&event, 0, sizeof(event)); 672 memset(&event, 0, sizeof(event));
673 event.type = JitCodeEvent::CODE_ADDED; 673 event.type = JitCodeEvent::CODE_ADDED;
674 event.code_start = code->instruction_start(); 674 event.code_start = code->instruction_start();
675 event.code_len = code->instruction_size(); 675 event.code_len = code->instruction_size();
676 Handle<Script> script_handle; 676 Handle<SharedFunctionInfo> shared_function_handle;
677 if (shared && shared->script()->IsScript()) { 677 if (shared && shared->script()->IsScript()) {
678 script_handle = Handle<Script>(Script::cast(shared->script())); 678 shared_function_handle = Handle<SharedFunctionInfo>(shared);
679 } 679 }
680 event.script = ToApiHandle<v8::Script>(script_handle); 680 event.script = ToApiHandle<v8::UnboundScript>(shared_function_handle);
681 event.name.str = name; 681 event.name.str = name;
682 event.name.len = length; 682 event.name.len = length;
683 code_event_handler_(&event); 683 code_event_handler_(&event);
684 } 684 }
685 685
686 686
687 void JitLogger::CodeMoveEvent(Address from, Address to) { 687 void JitLogger::CodeMoveEvent(Address from, Address to) {
688 Code* from_code = Code::cast(HeapObject::FromAddress(from)); 688 Code* from_code = Code::cast(HeapObject::FromAddress(from));
689 689
690 JitCodeEvent event; 690 JitCodeEvent event;
(...skipping 1435 matching lines...) Expand 10 before | Expand all | Expand 10 after
2126 if (jit_logger_) { 2126 if (jit_logger_) {
2127 removeCodeEventListener(jit_logger_); 2127 removeCodeEventListener(jit_logger_);
2128 delete jit_logger_; 2128 delete jit_logger_;
2129 jit_logger_ = NULL; 2129 jit_logger_ = NULL;
2130 } 2130 }
2131 2131
2132 return log_->Close(); 2132 return log_->Close();
2133 } 2133 }
2134 2134
2135 } } // namespace v8::internal 2135 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « include/v8.h ('k') | src/third_party/vtune/vtune-jit.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698