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

Side by Side Diff: src/builtins.cc

Issue 1728593002: [Interpreter] Add support for cpu profiler logging. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 9 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 | « no previous file | src/code-stubs.cc » ('j') | src/heap/mark-compact.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.h" 7 #include "src/api.h"
8 #include "src/api-natives.h" 8 #include "src/api-natives.h"
9 #include "src/arguments.h" 9 #include "src/arguments.h"
10 #include "src/base/once.h" 10 #include "src/base/once.h"
(...skipping 4353 matching lines...) Expand 10 before | Expand all | Expand 10 after
4364 DCHECK(!masm.has_frame()); 4364 DCHECK(!masm.has_frame());
4365 g(&masm, functions[i].name, functions[i].extra_args); 4365 g(&masm, functions[i].name, functions[i].extra_args);
4366 // Move the code into the object heap. 4366 // Move the code into the object heap.
4367 CodeDesc desc; 4367 CodeDesc desc;
4368 masm.GetCode(&desc); 4368 masm.GetCode(&desc);
4369 Code::Flags flags = functions[i].flags; 4369 Code::Flags flags = functions[i].flags;
4370 Handle<Code> code = 4370 Handle<Code> code =
4371 isolate->factory()->NewCode(desc, flags, masm.CodeObject()); 4371 isolate->factory()->NewCode(desc, flags, masm.CodeObject());
4372 // Log the event and add the code to the builtins array. 4372 // Log the event and add the code to the builtins array.
4373 PROFILE(isolate, 4373 PROFILE(isolate,
4374 CodeCreateEvent(Logger::BUILTIN_TAG, *code, functions[i].s_name)); 4374 CodeCreateEvent(Logger::BUILTIN_TAG, AbstractCode::cast(*code),
4375 functions[i].s_name));
4375 builtins_[i] = *code; 4376 builtins_[i] = *code;
4376 code->set_builtin_index(i); 4377 code->set_builtin_index(i);
4377 #ifdef ENABLE_DISASSEMBLER 4378 #ifdef ENABLE_DISASSEMBLER
4378 if (FLAG_print_builtin_code) { 4379 if (FLAG_print_builtin_code) {
4379 CodeTracer::Scope trace_scope(isolate->GetCodeTracer()); 4380 CodeTracer::Scope trace_scope(isolate->GetCodeTracer());
4380 OFStream os(trace_scope.file()); 4381 OFStream os(trace_scope.file());
4381 os << "Builtin: " << functions[i].s_name << "\n"; 4382 os << "Builtin: " << functions[i].s_name << "\n";
4382 code->Disassemble(functions[i].s_name, os); 4383 code->Disassemble(functions[i].s_name, os);
4383 os << "\n"; 4384 os << "\n";
4384 } 4385 }
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
4450 BUILTIN_LIST_C(DEFINE_BUILTIN_ACCESSOR_C) 4451 BUILTIN_LIST_C(DEFINE_BUILTIN_ACCESSOR_C)
4451 BUILTIN_LIST_A(DEFINE_BUILTIN_ACCESSOR_A) 4452 BUILTIN_LIST_A(DEFINE_BUILTIN_ACCESSOR_A)
4452 BUILTIN_LIST_H(DEFINE_BUILTIN_ACCESSOR_H) 4453 BUILTIN_LIST_H(DEFINE_BUILTIN_ACCESSOR_H)
4453 BUILTIN_LIST_DEBUG_A(DEFINE_BUILTIN_ACCESSOR_A) 4454 BUILTIN_LIST_DEBUG_A(DEFINE_BUILTIN_ACCESSOR_A)
4454 #undef DEFINE_BUILTIN_ACCESSOR_C 4455 #undef DEFINE_BUILTIN_ACCESSOR_C
4455 #undef DEFINE_BUILTIN_ACCESSOR_A 4456 #undef DEFINE_BUILTIN_ACCESSOR_A
4456 4457
4457 4458
4458 } // namespace internal 4459 } // namespace internal
4459 } // namespace v8 4460 } // namespace v8
OLDNEW
« no previous file with comments | « no previous file | src/code-stubs.cc » ('j') | src/heap/mark-compact.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698