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

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: rebaseline 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') | no next file with comments »
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 5649 matching lines...) Expand 10 before | Expand all | Expand 10 after
5685 5684
5686 const BuiltinDesc* functions = builtin_function_table.functions(); 5685 const BuiltinDesc* functions = builtin_function_table.functions();
5687 5686
5688 // Traverse the list of builtins and generate an adaptor in a 5687 // Traverse the list of builtins and generate an adaptor in a
5689 // separate code object for each one. 5688 // separate code object for each one.
5690 for (int i = 0; i < builtin_count; i++) { 5689 for (int i = 0; i < builtin_count; i++) {
5691 if (create_heap_objects) { 5690 if (create_heap_objects) {
5692 Handle<Code> code = (*functions[i].builder)(isolate, functions + i); 5691 Handle<Code> code = (*functions[i].builder)(isolate, functions + i);
5693 // Log the event and add the code to the builtins array. 5692 // Log the event and add the code to the builtins array.
5694 PROFILE(isolate, 5693 PROFILE(isolate,
5695 CodeCreateEvent(Logger::BUILTIN_TAG, AbstractCode::cast(*code), 5694 CodeCreateEvent(CodeEventListener::BUILTIN_TAG,
5696 functions[i].s_name)); 5695 AbstractCode::cast(*code), functions[i].s_name));
5697 builtins_[i] = *code; 5696 builtins_[i] = *code;
5698 code->set_builtin_index(i); 5697 code->set_builtin_index(i);
5699 #ifdef ENABLE_DISASSEMBLER 5698 #ifdef ENABLE_DISASSEMBLER
5700 if (FLAG_print_builtin_code) { 5699 if (FLAG_print_builtin_code) {
5701 CodeTracer::Scope trace_scope(isolate->GetCodeTracer()); 5700 CodeTracer::Scope trace_scope(isolate->GetCodeTracer());
5702 OFStream os(trace_scope.file()); 5701 OFStream os(trace_scope.file());
5703 os << "Builtin: " << functions[i].s_name << "\n"; 5702 os << "Builtin: " << functions[i].s_name << "\n";
5704 code->Disassemble(functions[i].s_name, os); 5703 code->Disassemble(functions[i].s_name, os);
5705 os << "\n"; 5704 os << "\n";
5706 } 5705 }
(...skipping 314 matching lines...) Expand 10 before | Expand all | Expand 10 after
6021 BUILTIN_LIST_H(DEFINE_BUILTIN_ACCESSOR_H) 6020 BUILTIN_LIST_H(DEFINE_BUILTIN_ACCESSOR_H)
6022 BUILTIN_LIST_DEBUG_A(DEFINE_BUILTIN_ACCESSOR_A) 6021 BUILTIN_LIST_DEBUG_A(DEFINE_BUILTIN_ACCESSOR_A)
6023 #undef DEFINE_BUILTIN_ACCESSOR_C 6022 #undef DEFINE_BUILTIN_ACCESSOR_C
6024 #undef DEFINE_BUILTIN_ACCESSOR_A 6023 #undef DEFINE_BUILTIN_ACCESSOR_A
6025 #undef DEFINE_BUILTIN_ACCESSOR_T 6024 #undef DEFINE_BUILTIN_ACCESSOR_T
6026 #undef DEFINE_BUILTIN_ACCESSOR_S 6025 #undef DEFINE_BUILTIN_ACCESSOR_S
6027 #undef DEFINE_BUILTIN_ACCESSOR_H 6026 #undef DEFINE_BUILTIN_ACCESSOR_H
6028 6027
6029 } // namespace internal 6028 } // namespace internal
6030 } // namespace v8 6029 } // namespace v8
OLDNEW
« no previous file with comments | « BUILD.gn ('k') | src/code-events.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698