Changeset 441 for trunk/kernel/mm
- Timestamp:
- May 9, 2018, 3:13:56 PM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/kernel/mm/vmm.c
r440 r441 1395 1395 1396 1396 #if DEBUG_VMM_GET_ONE_PPN 1397 if( DEBUG_VMM_GET_ONE_PPN < (uint32_t)hal_get_cycles() ) 1397 thread_t * this = CURRENT_THREAD; 1398 // if( DEBUG_VMM_GET_ONE_PPN < (uint32_t)hal_get_cycles() ) 1399 if( (vpn == 0x403) && ((local_cxy == 0) || (this->type == THREAD_RPC)) ) 1398 1400 printk("\n[DBG] %s : thread %x enter for vpn = %x / type = %s / index = %d\n", 1399 __FUNCTION__, CURRENT_THREAD, vpn, vseg_type_str(type), index );1401 __FUNCTION__, this, vpn, vseg_type_str(type), index ); 1400 1402 #endif 1401 1403 … … 1458 1460 1459 1461 #if (DEBUG_VMM_GET_ONE_PPN & 0x1) 1460 if( DEBUG_VMM_GET_ONE_PPN < (uint32_t)hal_get_cycles() ) 1462 if( (vpn == 0x403) && ((local_cxy == 0) || (this->type == THREAD_RPC)) ) 1463 // if( DEBUG_VMM_GET_ONE_PPN < (uint32_t)hal_get_cycles() ) 1461 1464 printk("\n[DBG] %s : thread %x for vpn = %x / elf_offset = %x\n", 1462 __FUNCTION__, CURRENT_THREAD, vpn, elf_offset );1465 __FUNCTION__, this, vpn, elf_offset ); 1463 1466 #endif 1464 1467 … … 1474 1477 1475 1478 #if (DEBUG_VMM_GET_ONE_PPN & 0x1) 1476 if( DEBUG_VMM_GET_ONE_PPN < (uint32_t)hal_get_cycles() ) 1479 // if( DEBUG_VMM_GET_ONE_PPN < (uint32_t)hal_get_cycles() ) 1480 if( (vpn == 0x403) && ((local_cxy == 0) || (this->type == THREAD_RPC)) ) 1477 1481 printk("\n[DBG] %s : thread%x for vpn = %x / fully in BSS\n", 1478 __FUNCTION__, CURRENT_THREAD, vpn );1482 __FUNCTION__, this, vpn ); 1479 1483 #endif 1480 1484 … … 1493 1497 1494 1498 #if (DEBUG_VMM_GET_ONE_PPN & 0x1) 1495 if( DEBUG_VMM_GET_ONE_PPN < (uint32_t)hal_get_cycles() ) 1499 // if( DEBUG_VMM_GET_ONE_PPN < (uint32_t)hal_get_cycles() ) 1500 if( (vpn == 0x403) && ((local_cxy == 0) || (this->type == THREAD_RPC)) ) 1496 1501 printk("\n[DBG] %s : thread %x, for vpn = %x / fully in mapper\n", 1497 __FUNCTION__, CURRENT_THREAD, vpn );1502 __FUNCTION__, this, vpn ); 1498 1503 #endif 1499 1504 if( mapper_cxy == local_cxy ) … … 1524 1529 1525 1530 #if (DEBUG_VMM_GET_ONE_PPN & 0x1) 1526 if( DEBUG_VMM_GET_ONE_PPN < (uint32_t)hal_get_cycles() ) 1531 // if( DEBUG_VMM_GET_ONE_PPN < (uint32_t)hal_get_cycles() ) 1532 if( (vpn == 0x403) && ((local_cxy == 0) || (this->type == THREAD_RPC)) ) 1527 1533 printk("\n[DBG] %s : thread %x for vpn = %x / both mapper & BSS\n" 1528 1534 " %d bytes from mapper / %d bytes from BSS\n", 1529 __FUNCTION__, CURRENT_THREAD, vpn,1535 __FUNCTION__, this, vpn, 1530 1536 file_size - offset , offset + CONFIG_PPM_PAGE_SIZE - file_size ); 1531 1537 #endif … … 1571 1577 1572 1578 #if DEBUG_VMM_GET_ONE_PPN 1573 if( DEBUG_VMM_GET_ONE_PPN < (uint32_t)hal_get_cycles() ) 1579 // if( DEBUG_VMM_GET_ONE_PPN < (uint32_t)hal_get_cycles() ) 1580 if( (vpn == 0x403) && ((local_cxy == 0) || (this->type == THREAD_RPC)) ) 1574 1581 printk("\n[DBG] %s : thread %x exit for vpn = %x / ppn = %x\n", 1575 __FUNCTION__ , CURRENT_THREAD, vpn , *ppn );1582 __FUNCTION__ , this , vpn , *ppn ); 1576 1583 #endif 1577 1584 … … 1595 1602 error_t error; 1596 1603 1604 thread_t * this = CURRENT_THREAD; 1605 1597 1606 #if DEBUG_VMM_GET_PTE 1598 uint32_t cycle = (uint32_t)hal_get_cycles(); 1599 if( DEBUG_VMM_GET_PTE < cycle ) 1607 uint32_t cycle = (uint32_t)hal_get_cycles(); 1608 // if( DEBUG_VMM_GET_PTE < cycle ) 1609 if( (vpn == 0x403) && ((local_cxy == 0) || (this->type == THREAD_RPC)) ) 1600 1610 printk("\n[DBG] %s : thread %x enter / vpn %x / process %x / cow %d / cycle %d\n", 1601 __FUNCTION__ , CURRENT_THREAD, vpn , process->pid , cow , cycle );1611 __FUNCTION__ , this , vpn , process->pid , cow , cycle ); 1602 1612 #endif 1603 1613 … … 1613 1623 assert( (vseg != NULL) , __FUNCTION__, 1614 1624 "vseg undefined / vpn %x / thread %x / process %x / core[%x,%d] / cycle %d\n", 1615 vpn, CURRENT_THREAD, process->pid, local_cxy, CURRENT_THREAD->core->lid,1625 vpn, this, process->pid, local_cxy, this->core->lid, 1616 1626 (uint32_t)hal_get_cycles() ); 1617 1627 … … 1627 1637 assert( (old_attr & GPT_MAPPED), __FUNCTION__, 1628 1638 "PTE unmapped for a COW exception / vpn %x / thread %x / process %x / cycle %d\n", 1629 vpn, CURRENT_THREAD, process->pid, (uint32_t)hal_get_cycles() );1639 vpn, this, process->pid, (uint32_t)hal_get_cycles() ); 1630 1640 1631 1641 #if( DEBUG_VMM_GET_PTE & 1 ) 1632 if( DEBUG_VMM_GET_PTE < cycle ) 1642 // if( DEBUG_VMM_GET_PTE < cycle ) 1643 if( (vpn == 0x403) && ((local_cxy == 0) || (this->type == THREAD_RPC)) ) 1633 1644 printk("\n[DBG] %s : thread %x handling COW for vpn %x in process %x\n", 1634 __FUNCTION__, CURRENT_THREAD, vpn, process->pid );1645 __FUNCTION__, this, vpn, process->pid ); 1635 1646 #endif 1636 1647 … … 1691 1702 1692 1703 #if( DEBUG_VMM_GET_PTE & 1 ) 1693 if( DEBUG_VMM_GET_PTE < cycle ) 1704 // if( DEBUG_VMM_GET_PTE < cycle ) 1705 if( (vpn == 0x403) && ((local_cxy == 0) || (this->type == THREAD_RPC)) ) 1694 1706 printk("\n[DBG] %s : thread %x handling page fault for vpn %x in process %x\n", 1695 __FUNCTION__, CURRENT_THREAD, vpn, process->pid );1707 __FUNCTION__, this, vpn, process->pid ); 1696 1708 #endif 1697 1709 // allocate new_ppn, and initialize the new page … … 1733 1745 #if DEBUG_VMM_GET_PTE 1734 1746 cycle = (uint32_t)hal_get_cycles(); 1735 if( DEBUG_VMM_GET_PTE < cycle ) 1747 // if( DEBUG_VMM_GET_PTE < cycle ) 1748 if( (vpn == 0x403) && (local_cxy == 0) ) 1736 1749 printk("\n[DBG] %s : thread %x exit / vpn %x in process %x / ppn %x / attr %x / cycle %d\n", 1737 __FUNCTION__, CURRENT_THREAD, vpn, process->pid, new_ppn, new_attr, cycle );1750 __FUNCTION__, this, vpn, process->pid, new_ppn, new_attr, cycle ); 1738 1751 #endif 1739 1752 … … 1762 1775 #if DEBUG_VMM_HANDLE_PAGE_FAULT 1763 1776 uint32_t cycle = (uint32_t)hal_get_cycles(); 1764 if( DEBUG_VMM_HANDLE_PAGE_FAULT < cycle ) 1765 printk("\n[DBG] %s : thread %x enter for vpn %x / process %x / core[%x,%d] / cycle %d\n", 1766 __FUNCTION__, this, vpn, process->pid, local_cxy, this->core->lid, cycle ); 1777 // if( DEBUG_VMM_HANDLE_PAGE_FAULT < cycle ) 1778 if( (vpn == 0x403) && (local_cxy == 0) ) 1779 printk("\n[DBG] %s : thread %x in process %x enter for vpn %x / core[%x,%d] / cycle %d\n", 1780 __FUNCTION__, this, process->pid, vpn, local_cxy, this->core->lid, cycle ); 1767 1781 #endif 1768 1782 … … 1798 1812 if( local_cxy != ref_cxy ) 1799 1813 { 1814 1815 #if DEBUG_VMM_HANDLE_PAGE_FAULT 1816 // if( DEBUG_VMM_HANDLE_PAGE_FAULT < cycle ) 1817 if( (vpn == 0x403) && (local_cxy == 0) ) 1818 printk("\n[DBG] %s : thread %x in process %x call RPC_VMM_GET_PTE\n", 1819 __FUNCTION__, this, process->pid ); 1820 #endif 1821 1800 1822 rpc_vmm_get_pte_client( ref_cxy, 1801 1823 ref_ptr, … … 1826 1848 #if DEBUG_VMM_HANDLE_PAGE_FAULT 1827 1849 cycle = (uint32_t)hal_get_cycles(); 1828 if( DEBUG_VMM_HANDLE_PAGE_FAULT < cycle ) 1829 printk("\n[DBG] %s : thread %x exit for vpn %x / process %x / cycle %d\n", 1830 __FUNCTION__, this->trdid, vpn, process->pid, cycle ); 1850 // if( DEBUG_VMM_HANDLE_PAGE_FAULT < cycle ) 1851 if( (vpn == 0x403) && (local_cxy == 0) ) 1852 printk("\n[DBG] %s : thread %x in process %x exit for vpn %x / core[%x,%d] / cycle %d\n", 1853 __FUNCTION__, this, process->pid, vpn, local_cxy, this->core->lid, cycle ); 1831 1854 #endif 1832 1855 1833 1856 return error; 1834 1857 1835 } // end vmm_handle_page_fault() 1858 } // end vmm_handle_page_fault() 1859 1860 1861 1862 1863 1864 1865 1866 1836 1867 1837 1868 /* deprecated April 2018 [AG]
Note: See TracChangeset
for help on using the changeset viewer.