OLD | NEW |
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 1577 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1588 | 1588 |
1589 const int last_index = static_cast<int>(interpreter::Bytecode::kLast); | 1589 const int last_index = static_cast<int>(interpreter::Bytecode::kLast); |
1590 interpreter::Interpreter* interpreter = isolate_->interpreter(); | 1590 interpreter::Interpreter* interpreter = isolate_->interpreter(); |
1591 for (auto operand_scale : kOperandScales) { | 1591 for (auto operand_scale : kOperandScales) { |
1592 for (int index = 0; index <= last_index; ++index) { | 1592 for (int index = 0; index <= last_index; ++index) { |
1593 interpreter::Bytecode bytecode = interpreter::Bytecodes::FromByte(index); | 1593 interpreter::Bytecode bytecode = interpreter::Bytecodes::FromByte(index); |
1594 if (interpreter::Bytecodes::BytecodeHasHandler(bytecode, operand_scale)) { | 1594 if (interpreter::Bytecodes::BytecodeHasHandler(bytecode, operand_scale)) { |
1595 Code* code = interpreter->GetBytecodeHandler(bytecode, operand_scale); | 1595 Code* code = interpreter->GetBytecodeHandler(bytecode, operand_scale); |
1596 std::string bytecode_name = | 1596 std::string bytecode_name = |
1597 interpreter::Bytecodes::ToString(bytecode, operand_scale); | 1597 interpreter::Bytecodes::ToString(bytecode, operand_scale); |
1598 CodeCreateEvent(CodeEventListener::BYTECODE_HANDLER_TAG, | 1598 PROFILE(isolate_, CodeCreateEvent( |
1599 AbstractCode::cast(code), bytecode_name.c_str()); | 1599 CodeEventListener::BYTECODE_HANDLER_TAG, |
| 1600 AbstractCode::cast(code), bytecode_name.c_str())); |
1600 } | 1601 } |
1601 } | 1602 } |
1602 } | 1603 } |
1603 } | 1604 } |
1604 | 1605 |
1605 void Logger::LogExistingFunction(Handle<SharedFunctionInfo> shared, | 1606 void Logger::LogExistingFunction(Handle<SharedFunctionInfo> shared, |
1606 Handle<AbstractCode> code) { | 1607 Handle<AbstractCode> code) { |
1607 Handle<String> func_name(shared->DebugName()); | 1608 Handle<String> func_name(shared->DebugName()); |
1608 if (shared->script()->IsScript()) { | 1609 if (shared->script()->IsScript()) { |
1609 Handle<Script> script(Script::cast(shared->script())); | 1610 Handle<Script> script(Script::cast(shared->script())); |
(...skipping 248 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1858 removeCodeEventListener(jit_logger_); | 1859 removeCodeEventListener(jit_logger_); |
1859 delete jit_logger_; | 1860 delete jit_logger_; |
1860 jit_logger_ = NULL; | 1861 jit_logger_ = NULL; |
1861 } | 1862 } |
1862 | 1863 |
1863 return log_->Close(); | 1864 return log_->Close(); |
1864 } | 1865 } |
1865 | 1866 |
1866 } // namespace internal | 1867 } // namespace internal |
1867 } // namespace v8 | 1868 } // namespace v8 |
OLD | NEW |