| 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 1595 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1606 void Logger::LogCodeObject(Object* object) { | 1606 void Logger::LogCodeObject(Object* object) { |
| 1607 Code* code_object = Code::cast(object); | 1607 Code* code_object = Code::cast(object); |
| 1608 LogEventsAndTags tag = Logger::STUB_TAG; | 1608 LogEventsAndTags tag = Logger::STUB_TAG; |
| 1609 const char* description = "Unknown code from the snapshot"; | 1609 const char* description = "Unknown code from the snapshot"; |
| 1610 switch (code_object->kind()) { | 1610 switch (code_object->kind()) { |
| 1611 case Code::FUNCTION: | 1611 case Code::FUNCTION: |
| 1612 case Code::OPTIMIZED_FUNCTION: | 1612 case Code::OPTIMIZED_FUNCTION: |
| 1613 return; // We log this later using LogCompiledFunctions. | 1613 return; // We log this later using LogCompiledFunctions. |
| 1614 case Code::BINARY_OP_IC: | 1614 case Code::BINARY_OP_IC: |
| 1615 case Code::COMPARE_IC: // fall through | 1615 case Code::COMPARE_IC: // fall through |
| 1616 case Code::COMPARE_NIL_IC: // fall through |
| 1616 case Code::TO_BOOLEAN_IC: // fall through | 1617 case Code::TO_BOOLEAN_IC: // fall through |
| 1617 case Code::STUB: | 1618 case Code::STUB: |
| 1618 description = CodeStub::MajorName(CodeStub::GetMajorKey(code_object)); | 1619 description = CodeStub::MajorName(CodeStub::GetMajorKey(code_object)); |
| 1619 if (description == NULL) | 1620 if (description == NULL) |
| 1620 description = "A stub from the snapshot"; | 1621 description = "A stub from the snapshot"; |
| 1621 tag = Logger::STUB_TAG; | 1622 tag = Logger::STUB_TAG; |
| 1622 break; | 1623 break; |
| 1623 case Code::REGEXP: | 1624 case Code::REGEXP: |
| 1624 description = "Regular expression code"; | 1625 description = "Regular expression code"; |
| 1625 tag = Logger::REG_EXP_TAG; | 1626 tag = Logger::REG_EXP_TAG; |
| (...skipping 288 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1914 removeCodeEventListener(jit_logger_); | 1915 removeCodeEventListener(jit_logger_); |
| 1915 delete jit_logger_; | 1916 delete jit_logger_; |
| 1916 jit_logger_ = NULL; | 1917 jit_logger_ = NULL; |
| 1917 } | 1918 } |
| 1918 | 1919 |
| 1919 return log_->Close(); | 1920 return log_->Close(); |
| 1920 } | 1921 } |
| 1921 | 1922 |
| 1922 } // namespace internal | 1923 } // namespace internal |
| 1923 } // namespace v8 | 1924 } // namespace v8 |
| OLD | NEW |