OLD | NEW |
1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 the V8 project authors. All rights reserved. |
2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
4 // met: | 4 // met: |
5 // | 5 // |
6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
(...skipping 1592 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1603 | 1603 |
1604 | 1604 |
1605 void Logger::LogCodeObject(Object* object) { | 1605 void Logger::LogCodeObject(Object* object) { |
1606 Code* code_object = Code::cast(object); | 1606 Code* code_object = Code::cast(object); |
1607 LogEventsAndTags tag = Logger::STUB_TAG; | 1607 LogEventsAndTags tag = Logger::STUB_TAG; |
1608 const char* description = "Unknown code from the snapshot"; | 1608 const char* description = "Unknown code from the snapshot"; |
1609 switch (code_object->kind()) { | 1609 switch (code_object->kind()) { |
1610 case Code::FUNCTION: | 1610 case Code::FUNCTION: |
1611 case Code::OPTIMIZED_FUNCTION: | 1611 case Code::OPTIMIZED_FUNCTION: |
1612 return; // We log this later using LogCompiledFunctions. | 1612 return; // We log this later using LogCompiledFunctions. |
1613 case Code::BINARY_OP_IC: // fall through | 1613 case Code::BINARY_OP_IC: { |
| 1614 BinaryOpStub stub(code_object->extended_extra_ic_state()); |
| 1615 description = stub.GetName().Detach(); |
| 1616 tag = Logger::STUB_TAG; |
| 1617 break; |
| 1618 } |
1614 case Code::COMPARE_IC: // fall through | 1619 case Code::COMPARE_IC: // fall through |
1615 case Code::COMPARE_NIL_IC: // fall through | 1620 case Code::COMPARE_NIL_IC: // fall through |
1616 case Code::TO_BOOLEAN_IC: // fall through | 1621 case Code::TO_BOOLEAN_IC: // fall through |
1617 case Code::STUB: | 1622 case Code::STUB: |
1618 description = | 1623 description = |
1619 CodeStub::MajorName(CodeStub::GetMajorKey(code_object), true); | 1624 CodeStub::MajorName(CodeStub::GetMajorKey(code_object), true); |
1620 if (description == NULL) | 1625 if (description == NULL) |
1621 description = "A stub from the snapshot"; | 1626 description = "A stub from the snapshot"; |
1622 tag = Logger::STUB_TAG; | 1627 tag = Logger::STUB_TAG; |
1623 break; | 1628 break; |
(...skipping 285 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1909 if (jit_logger_) { | 1914 if (jit_logger_) { |
1910 removeCodeEventListener(jit_logger_); | 1915 removeCodeEventListener(jit_logger_); |
1911 delete jit_logger_; | 1916 delete jit_logger_; |
1912 jit_logger_ = NULL; | 1917 jit_logger_ = NULL; |
1913 } | 1918 } |
1914 | 1919 |
1915 return log_->Close(); | 1920 return log_->Close(); |
1916 } | 1921 } |
1917 | 1922 |
1918 } } // namespace v8::internal | 1923 } } // namespace v8::internal |
OLD | NEW |