OLD | NEW |
1 // Copyright (c) 1994-2006 Sun Microsystems Inc. | 1 // Copyright (c) 1994-2006 Sun Microsystems Inc. |
2 // All Rights Reserved. | 2 // All Rights Reserved. |
3 // | 3 // |
4 // Redistribution and use in source and binary forms, with or without | 4 // Redistribution and use in source and binary forms, with or without |
5 // modification, are permitted provided that the following conditions are | 5 // modification, are permitted provided that the following conditions are |
6 // met: | 6 // met: |
7 // | 7 // |
8 // - Redistributions of source code must retain the above copyright notice, | 8 // - Redistributions of source code must retain the above copyright notice, |
9 // this list of conditions and the following disclaimer. | 9 // this list of conditions and the following disclaimer. |
10 // | 10 // |
(...skipping 1500 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1511 | 1511 |
1512 void PositionsRecorder::RecordPosition(int pos) { | 1512 void PositionsRecorder::RecordPosition(int pos) { |
1513 ASSERT(pos != RelocInfo::kNoPosition); | 1513 ASSERT(pos != RelocInfo::kNoPosition); |
1514 ASSERT(pos >= 0); | 1514 ASSERT(pos >= 0); |
1515 state_.current_position = pos; | 1515 state_.current_position = pos; |
1516 #ifdef ENABLE_GDB_JIT_INTERFACE | 1516 #ifdef ENABLE_GDB_JIT_INTERFACE |
1517 if (gdbjit_lineinfo_ != NULL) { | 1517 if (gdbjit_lineinfo_ != NULL) { |
1518 gdbjit_lineinfo_->SetPosition(assembler_->pc_offset(), pos, false); | 1518 gdbjit_lineinfo_->SetPosition(assembler_->pc_offset(), pos, false); |
1519 } | 1519 } |
1520 #endif | 1520 #endif |
| 1521 if (jit_code_event_line_info_ != NULL) { |
| 1522 LOG_CODE_EVENT(this->assembler()->isolate(), |
| 1523 CodeLinePosInfoAddEvent(jit_code_event_line_info_, |
| 1524 assembler_->pc_offset(), |
| 1525 pos, |
| 1526 false)); |
| 1527 } |
1521 } | 1528 } |
1522 | 1529 |
1523 | 1530 |
1524 void PositionsRecorder::RecordStatementPosition(int pos) { | 1531 void PositionsRecorder::RecordStatementPosition(int pos) { |
1525 ASSERT(pos != RelocInfo::kNoPosition); | 1532 ASSERT(pos != RelocInfo::kNoPosition); |
1526 ASSERT(pos >= 0); | 1533 ASSERT(pos >= 0); |
1527 state_.current_statement_position = pos; | 1534 state_.current_statement_position = pos; |
1528 #ifdef ENABLE_GDB_JIT_INTERFACE | 1535 #ifdef ENABLE_GDB_JIT_INTERFACE |
1529 if (gdbjit_lineinfo_ != NULL) { | 1536 if (gdbjit_lineinfo_ != NULL) { |
1530 gdbjit_lineinfo_->SetPosition(assembler_->pc_offset(), pos, true); | 1537 gdbjit_lineinfo_->SetPosition(assembler_->pc_offset(), pos, true); |
1531 } | 1538 } |
1532 #endif | 1539 #endif |
| 1540 if (jit_code_event_line_info_ != NULL) { |
| 1541 LOG_CODE_EVENT(this->assembler()->isolate(), |
| 1542 CodeLinePosInfoAddEvent(jit_code_event_line_info_, |
| 1543 assembler_->pc_offset(), |
| 1544 pos, |
| 1545 true)); |
| 1546 } |
1533 } | 1547 } |
1534 | 1548 |
1535 | 1549 |
1536 bool PositionsRecorder::WriteRecordedPositions() { | 1550 bool PositionsRecorder::WriteRecordedPositions() { |
1537 bool written = false; | 1551 bool written = false; |
1538 | 1552 |
1539 // Write the statement position if it is different from what was written last | 1553 // Write the statement position if it is different from what was written last |
1540 // time. | 1554 // time. |
1541 if (state_.current_statement_position != state_.written_statement_position) { | 1555 if (state_.current_statement_position != state_.written_statement_position) { |
1542 EnsureSpace ensure_space(assembler_); | 1556 EnsureSpace ensure_space(assembler_); |
(...skipping 11 matching lines...) Expand all Loading... |
1554 assembler_->RecordRelocInfo(RelocInfo::POSITION, state_.current_position); | 1568 assembler_->RecordRelocInfo(RelocInfo::POSITION, state_.current_position); |
1555 state_.written_position = state_.current_position; | 1569 state_.written_position = state_.current_position; |
1556 written = true; | 1570 written = true; |
1557 } | 1571 } |
1558 | 1572 |
1559 // Return whether something was written. | 1573 // Return whether something was written. |
1560 return written; | 1574 return written; |
1561 } | 1575 } |
1562 | 1576 |
1563 } } // namespace v8::internal | 1577 } } // namespace v8::internal |
OLD | NEW |