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

Side by Side Diff: src/log.cc

Issue 1947403002: [interpreter] Introduce bytecode generation pipeline. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Rebase Created 4 years, 7 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 | « src/interpreter/source-position-table.cc ('k') | src/v8.gyp » ('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 "src/log.h" 5 #include "src/log.h"
6 6
7 #include <cstdarg> 7 #include <cstdarg>
8 #include <sstream> 8 #include <sstream>
9 9
10 #include "src/bailout-reason.h" 10 #include "src/bailout-reason.h"
(...skipping 1562 matching lines...) Expand 10 before | Expand all | Expand 10 after
1573 DisallowHeapAllocation no_gc; 1573 DisallowHeapAllocation no_gc;
1574 for (HeapObject* obj = iterator.next(); obj != NULL; obj = iterator.next()) { 1574 for (HeapObject* obj = iterator.next(); obj != NULL; obj = iterator.next()) {
1575 if (obj->IsCode()) LogCodeObject(obj); 1575 if (obj->IsCode()) LogCodeObject(obj);
1576 if (obj->IsBytecodeArray()) LogCodeObject(obj); 1576 if (obj->IsBytecodeArray()) LogCodeObject(obj);
1577 } 1577 }
1578 } 1578 }
1579 1579
1580 void Logger::LogBytecodeHandlers() { 1580 void Logger::LogBytecodeHandlers() {
1581 if (!FLAG_ignition) return; 1581 if (!FLAG_ignition) return;
1582 1582
1583 const interpreter::OperandScale kOperandScales[] = {
1584 #define VALUE(Name, _) interpreter::OperandScale::k##Name,
1585 OPERAND_SCALE_LIST(VALUE)
1586 #undef VALUE
1587 };
1588
1589 const int last_index = static_cast<int>(interpreter::Bytecode::kLast);
1583 interpreter::Interpreter* interpreter = isolate_->interpreter(); 1590 interpreter::Interpreter* interpreter = isolate_->interpreter();
1584 const int last_index = static_cast<int>(interpreter::Bytecode::kLast); 1591 for (auto operand_scale : kOperandScales) {
1585 for (auto operand_scale = interpreter::OperandScale::kSingle;
1586 operand_scale <= interpreter::OperandScale::kMaxValid;
1587 operand_scale =
1588 interpreter::Bytecodes::NextOperandScale(operand_scale)) {
1589 for (int index = 0; index <= last_index; ++index) { 1592 for (int index = 0; index <= last_index; ++index) {
1590 interpreter::Bytecode bytecode = interpreter::Bytecodes::FromByte(index); 1593 interpreter::Bytecode bytecode = interpreter::Bytecodes::FromByte(index);
1591 if (interpreter::Bytecodes::BytecodeHasHandler(bytecode, operand_scale)) { 1594 if (interpreter::Bytecodes::BytecodeHasHandler(bytecode, operand_scale)) {
1592 Code* code = interpreter->GetBytecodeHandler(bytecode, operand_scale); 1595 Code* code = interpreter->GetBytecodeHandler(bytecode, operand_scale);
1593 std::string bytecode_name = 1596 std::string bytecode_name =
1594 interpreter::Bytecodes::ToString(bytecode, operand_scale); 1597 interpreter::Bytecodes::ToString(bytecode, operand_scale);
1595 CodeCreateEvent(Logger::BYTECODE_HANDLER_TAG, AbstractCode::cast(code), 1598 CodeCreateEvent(Logger::BYTECODE_HANDLER_TAG, AbstractCode::cast(code),
1596 bytecode_name.c_str()); 1599 bytecode_name.c_str());
1597 } 1600 }
1598 } 1601 }
(...skipping 252 matching lines...) Expand 10 before | Expand all | Expand 10 after
1851 removeCodeEventListener(jit_logger_); 1854 removeCodeEventListener(jit_logger_);
1852 delete jit_logger_; 1855 delete jit_logger_;
1853 jit_logger_ = NULL; 1856 jit_logger_ = NULL;
1854 } 1857 }
1855 1858
1856 return log_->Close(); 1859 return log_->Close();
1857 } 1860 }
1858 1861
1859 } // namespace internal 1862 } // namespace internal
1860 } // namespace v8 1863 } // namespace v8
OLDNEW
« no previous file with comments | « src/interpreter/source-position-table.cc ('k') | src/v8.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698