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

Side by Side Diff: src/builtins.cc

Issue 2061623002: Introduce JIT code events dispatcher for the isolate. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 6 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 | « BUILD.gn ('k') | src/code-events.h » ('j') | src/isolate.cc » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 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 "src/builtins.h" 5 #include "src/builtins.h"
6 6
7 #include "src/api-arguments.h" 7 #include "src/api-arguments.h"
8 #include "src/api-natives.h" 8 #include "src/api-natives.h"
9 #include "src/api.h" 9 #include "src/api.h"
10 #include "src/base/ieee754.h" 10 #include "src/base/ieee754.h"
11 #include "src/base/once.h" 11 #include "src/base/once.h"
12 #include "src/bootstrapper.h" 12 #include "src/bootstrapper.h"
13 #include "src/code-factory.h" 13 #include "src/code-factory.h"
14 #include "src/code-stub-assembler.h" 14 #include "src/code-stub-assembler.h"
15 #include "src/dateparser-inl.h" 15 #include "src/dateparser-inl.h"
16 #include "src/elements.h" 16 #include "src/elements.h"
17 #include "src/frames-inl.h" 17 #include "src/frames-inl.h"
18 #include "src/gdb-jit.h" 18 #include "src/gdb-jit.h"
19 #include "src/ic/handler-compiler.h" 19 #include "src/ic/handler-compiler.h"
20 #include "src/ic/ic.h" 20 #include "src/ic/ic.h"
21 #include "src/isolate-inl.h" 21 #include "src/isolate-inl.h"
22 #include "src/json-parser.h" 22 #include "src/json-parser.h"
23 #include "src/json-stringifier.h" 23 #include "src/json-stringifier.h"
24 #include "src/messages.h" 24 #include "src/messages.h"
25 #include "src/profiler/cpu-profiler.h"
26 #include "src/property-descriptor.h" 25 #include "src/property-descriptor.h"
27 #include "src/prototype.h" 26 #include "src/prototype.h"
28 #include "src/string-builder.h" 27 #include "src/string-builder.h"
29 #include "src/uri.h" 28 #include "src/uri.h"
30 #include "src/vm-state-inl.h" 29 #include "src/vm-state-inl.h"
31 30
32 namespace v8 { 31 namespace v8 {
33 namespace internal { 32 namespace internal {
34 33
35 namespace { 34 namespace {
(...skipping 5633 matching lines...) Expand 10 before | Expand all | Expand 10 after
5669 5668
5670 const BuiltinDesc* functions = builtin_function_table.functions(); 5669 const BuiltinDesc* functions = builtin_function_table.functions();
5671 5670
5672 // Traverse the list of builtins and generate an adaptor in a 5671 // Traverse the list of builtins and generate an adaptor in a
5673 // separate code object for each one. 5672 // separate code object for each one.
5674 for (int i = 0; i < builtin_count; i++) { 5673 for (int i = 0; i < builtin_count; i++) {
5675 if (create_heap_objects) { 5674 if (create_heap_objects) {
5676 Handle<Code> code = (*functions[i].builder)(isolate, functions + i); 5675 Handle<Code> code = (*functions[i].builder)(isolate, functions + i);
5677 // Log the event and add the code to the builtins array. 5676 // Log the event and add the code to the builtins array.
5678 PROFILE(isolate, 5677 PROFILE(isolate,
5679 CodeCreateEvent(Logger::BUILTIN_TAG, AbstractCode::cast(*code), 5678 CodeCreateEvent(CodeEventListener::BUILTIN_TAG,
5680 functions[i].s_name)); 5679 AbstractCode::cast(*code), functions[i].s_name));
5681 builtins_[i] = *code; 5680 builtins_[i] = *code;
5682 code->set_builtin_index(i); 5681 code->set_builtin_index(i);
5683 #ifdef ENABLE_DISASSEMBLER 5682 #ifdef ENABLE_DISASSEMBLER
5684 if (FLAG_print_builtin_code) { 5683 if (FLAG_print_builtin_code) {
5685 CodeTracer::Scope trace_scope(isolate->GetCodeTracer()); 5684 CodeTracer::Scope trace_scope(isolate->GetCodeTracer());
5686 OFStream os(trace_scope.file()); 5685 OFStream os(trace_scope.file());
5687 os << "Builtin: " << functions[i].s_name << "\n"; 5686 os << "Builtin: " << functions[i].s_name << "\n";
5688 code->Disassemble(functions[i].s_name, os); 5687 code->Disassemble(functions[i].s_name, os);
5689 os << "\n"; 5688 os << "\n";
5690 } 5689 }
(...skipping 314 matching lines...) Expand 10 before | Expand all | Expand 10 after
6005 BUILTIN_LIST_H(DEFINE_BUILTIN_ACCESSOR_H) 6004 BUILTIN_LIST_H(DEFINE_BUILTIN_ACCESSOR_H)
6006 BUILTIN_LIST_DEBUG_A(DEFINE_BUILTIN_ACCESSOR_A) 6005 BUILTIN_LIST_DEBUG_A(DEFINE_BUILTIN_ACCESSOR_A)
6007 #undef DEFINE_BUILTIN_ACCESSOR_C 6006 #undef DEFINE_BUILTIN_ACCESSOR_C
6008 #undef DEFINE_BUILTIN_ACCESSOR_A 6007 #undef DEFINE_BUILTIN_ACCESSOR_A
6009 #undef DEFINE_BUILTIN_ACCESSOR_T 6008 #undef DEFINE_BUILTIN_ACCESSOR_T
6010 #undef DEFINE_BUILTIN_ACCESSOR_S 6009 #undef DEFINE_BUILTIN_ACCESSOR_S
6011 #undef DEFINE_BUILTIN_ACCESSOR_H 6010 #undef DEFINE_BUILTIN_ACCESSOR_H
6012 6011
6013 } // namespace internal 6012 } // namespace internal
6014 } // namespace v8 6013 } // namespace v8
OLDNEW
« no previous file with comments | « BUILD.gn ('k') | src/code-events.h » ('j') | src/isolate.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698