Changeset 433 for trunk/kernel/fs
- Timestamp:
- Feb 14, 2018, 3:40:19 PM (7 years ago)
- Location:
- trunk/kernel/fs
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/kernel/fs/devfs.c
r430 r433 28 28 #include <printk.h> 29 29 #include <chdev.h> 30 #include <thread.h> 30 31 #include <dev_txt.h> 31 32 #include <cluster.h> … … 86 87 error_t error; 87 88 88 devfs_dmsg("\n[DBG] %s : enter in cluster %x\n", 89 __FUNCTION__ , local_cxy ); 89 #if CONFIG_DEBUG_DEVFS_INIT 90 uint32_t cycle = (uint32_t)hal_get_cycles(); 91 if( CONFIG_DEBUG_DEVFS_INIT < cycle ) 92 printk("\n[DBG] %s : thread %x enter at cycle %d\n", 93 __FUNCTION__ , CURRENT_THREAD , cycle ); 94 #endif 90 95 91 96 // creates DEVFS "dev" inode in cluster IO … … 100 105 assert( (error == 0) , __FUNCTION__ , "cannot create <dev>\n" ); 101 106 102 devfs_dmsg("\n[DBG] %s : <dev> created in cluster %x\n",103 __FUNCTION__ , local_cxy );104 105 107 // create DEVFS "external" inode in cluster IO 106 108 error = vfs_add_child_in_parent( LOCAL_CLUSTER->io_cxy, … … 114 116 assert( (error == 0) , __FUNCTION__ , "cannot create <external>\n" ); 115 117 116 devfs_dmsg("\n[DBG] %s : <external> created in cluster %x\n", 117 __FUNCTION__ , local_cxy ); 118 #if CONFIG_DEBUG_DEVFS_INIT 119 cycle = (uint32_t)hal_get_cycles(); 120 if( CONFIG_DEBUG_DEVFS_INIT < cycle ) 121 printk("\n[DBG] %s : thread %x exit at cycle %d\n", 122 __FUNCTION__ , CURRENT_THREAD , cycle ); 123 #endif 124 118 125 } 119 126 … … 129 136 xptr_t inode_xp; 130 137 uint32_t channel; 138 139 #if CONFIG_DEBUG_DEVFS_INIT 140 uint32_t cycle = (uint32_t)hal_get_cycles(); 141 if( CONFIG_DEBUG_DEVFS_INIT < cycle ) 142 printk("\n[DBG] %s : thread %x enter at cycle %d\n", 143 __FUNCTION__ , CURRENT_THREAD , cycle ); 144 #endif 131 145 132 146 // create "internal" directory linked to "dev" … … 140 154 devfs_internal_inode_xp ); 141 155 142 devfs_dmsg("\n[DBG] %s : created <%s> inode in cluster %x\n",143 __FUNCTION__ , node_name , local_cxy );144 145 156 // create MMC chdev inode 146 157 chdev_xp = chdev_dir.mmc[local_cxy]; … … 155 166 GET_PTR( chdev_xp ), 156 167 &inode_xp ); 157 158 devfs_dmsg("\n[DBG] %s : created <%s> inode in cluster %x\n",159 __FUNCTION__ , chdev_ptr->name , local_cxy );160 161 168 } 162 169 … … 175 182 GET_PTR( chdev_xp ), 176 183 &inode_xp ); 177 178 devfs_dmsg("\n[DBG] %s : created <%s> inode in cluster %x\n",179 __FUNCTION__ , chdev_ptr->name , local_cxy );180 181 184 } 182 185 } … … 197 200 GET_PTR( chdev_xp ), 198 201 &inode_xp ); 199 200 devfs_dmsg("\n[DBG] %s : created <%s> inode in cluster %x\n",201 __FUNCTION__ , chdev_ptr->name , local_cxy );202 203 202 } 204 203 } … … 219 218 GET_PTR( chdev_xp ), 220 219 &inode_xp ); 221 222 devfs_dmsg("\n[DBG] %s : created <%s> inode in cluster %x\n",223 __FUNCTION__ , chdev_ptr->name , local_cxy );224 225 220 } 226 221 } … … 243 238 GET_PTR( chdev_xp ), 244 239 &inode_xp ); 245 246 devfs_dmsg("\n[DBG] %s : created <%s> inode in cluster %x\n",247 __FUNCTION__ , chdev_ptr->name , local_cxy );248 249 240 } 250 241 } … … 268 259 GET_PTR( chdev_xp ), 269 260 &inode_xp ); 270 271 devfs_dmsg("\n[DBG] %s : created <%s> inode in cluster %x\n",272 __FUNCTION__ , chdev_ptr->name , local_cxy );273 274 261 } 275 262 } … … 293 280 GET_PTR( chdev_xp ), 294 281 &inode_xp ); 295 296 devfs_dmsg("\n[DBG] %s : created <%s> inode in cluster %x\n",297 __FUNCTION__ , chdev_ptr->name , local_cxy );298 299 282 } 300 283 } … … 318 301 GET_PTR( chdev_xp ), 319 302 &inode_xp ); 320 321 devfs_dmsg("\n[DBG] %s : created <%s> inode in cluster %x\n",322 __FUNCTION__ , chdev_ptr->name , local_cxy );323 324 303 } 325 304 } … … 343 322 GET_PTR( chdev_xp ), 344 323 &inode_xp ); 345 346 devfs_dmsg("\n[DBG] %s : created <%s> inode in cluster %x\n",347 __FUNCTION__ , chdev_ptr->name , local_cxy );348 349 324 } 350 325 } … … 368 343 GET_PTR( chdev_xp ), 369 344 &inode_xp ); 370 371 devfs_dmsg("\n[DBG] %s : created <%s> inode in cluster %x\n", 372 __FUNCTION__ , chdev_ptr->name , local_cxy ); 373 374 } 375 } 376 } 345 } 346 } 347 } 348 349 #if CONFIG_DEBUG_DEVFS_INIT 350 cycle = (uint32_t)hal_get_cycles(); 351 if( CONFIG_DEBUG_DEVFS_INIT < cycle ) 352 printk("\n[DBG] %s : thread %x exit at cycle %d\n", 353 __FUNCTION__ , CURRENT_THREAD , cycle ); 354 #endif 355 377 356 } // end devfs_local_init() 378 357 … … 396 375 char k_buf[CONFIG_TXT_KBUF_SIZE]; // local kernel buffer 397 376 398 devfs_dmsg("\n[DBG] %s enter / cycle %d\n", 399 __FUNCTION__ , hal_time_stamp() ); 377 #if CONFIG_DEBUG_DEVFS_MOVE 378 uint32_t cycle = (uint32_t)hal_get_cycles(); 379 if( CONFIG_DEBUG_DEVFS_MOVE < cycle ) 380 printk("\n[DBG] %s : thread %x enter / to_mem %d / cycle %d\n", 381 __FUNCTION__ , CURRENT_THREAD , to_buffer , cycle ); 382 #endif 400 383 401 384 #if CONFIG_READ_DEBUG … … 426 409 if( error ) 427 410 { 428 429 devfs_dmsg("\n[DBG] %s exit error / cycle %d\n",430 __FUNCTION__ , hal_time_stamp() );431 432 411 return -1; 433 412 } … … 438 417 } 439 418 419 #if CONFIG_DEBUG_DEVFS_MOVE 420 cycle = (uint32_t)hal_get_cycles(); 421 if( CONFIG_DEBUG_DEVFS_MOVE < cycle ) 422 printk("\n[DBG] %s : thread %x exit / to_mem %d / cycle %d\n", 423 __FUNCTION__ , CURRENT_THREAD , to_buffer / cycle ); 424 #endif 425 440 426 #if CONFIG_READ_DEBUG 441 427 exit_devfs_move = hal_time_stamp(); 442 428 #endif 443 444 devfs_dmsg("\n[DBG] %s exit success / size = %d / cycle %d\n",445 __FUNCTION__ , size , hal_time_stamp() );446 447 429 return size; 448 430 } … … 454 436 if( error ) 455 437 { 456 457 devfs_dmsg("\n[DBG] %s exit error / cycle %d\n",458 __FUNCTION__ , hal_time_stamp() );459 460 438 return -1; 461 439 } … … 463 441 { 464 442 465 devfs_dmsg("\n[DBG] %s exit success / size = %d / cycle %d\n", 466 __FUNCTION__ , size , hal_time_stamp() ); 443 #if CONFIG_DEBUG_DEVFS_MOVE 444 cycle = (uint32_t)hal_get_cycles(); 445 if( CONFIG_DEBUG_DEVFS_MOVE < cycle ) 446 printk("\n[DBG] %s : thread %x exit / to_mem %d / cycle %d\n", 447 __FUNCTION__ , CURRENT_THREAD , to_buffer / cycle ); 448 #endif 467 449 468 450 return size; … … 477 459 return -1; 478 460 } 461 479 462 } // end devfs_user_move() 480 463 -
trunk/kernel/fs/vfs.c
r430 r433 157 157 error_t error; 158 158 159 vfs_dmsg("\n[DBG] %s : core[%x,%d] enter / dentry = %x in cluster %x\n", 160 __FUNCTION__, local_cxy, CURRENT_THREAD->core->lid, GET_PTR(dentry_xp), GET_CXY(dentry_xp) ); 159 #if CONFIG_DEBUG_VFS_INODE_CREATE 160 uint32_t cycle = (uint32_t)hal_get_cycles(); 161 if( CONFIG_DEBUG_VFS_INODE_CREATE < cycle ) 162 printk("\n[DBG] %s : thread %x enter / dentry = %x in cluster %x / cycle %d\n", 163 __FUNCTION__, CURRENT_THREAD, GET_PTR(dentry_xp), GET_CXY(dentry_xp), cycle ); 164 #endif 161 165 162 166 // check fs type and get pointer on context … … 230 234 remote_spinlock_init( XPTR( local_cxy , &inode->main_lock ) ); 231 235 232 vfs_dmsg("\n[DBG] %s : core[%x,%d] exit / inode = %x in cluster %x\n", 233 __FUNCTION__, local_cxy, CURRENT_THREAD->core->lid, inode , local_cxy ); 236 #if CONFIG_DEBUG_VFS_INODE_CREATE 237 uint32_t cycle = (uint32_t)hal_get_cycles(); 238 if( CONFIG_DEBUG_VFS_INODE_CREATE < cycle ) 239 printk("\n[DBG] %s : thread %x exit / inode = %x in cluster %x / cycle %d\n", 240 __FUNCTION__, CURRENT_THREAD, inode, local_cxy, cycle ); 241 #endif 234 242 235 243 // return extended pointer on inode … … 263 271 xptr_t child_xp ) 264 272 { 265 vfs_dmsg("\n[DBG] %s : core[%x,%d] enter for <%s> / cycle %d\n", 266 __FUNCTION__ , local_cxy , CURRENT_THREAD->core->lid , name , hal_time_stamp() ); 273 274 #if CONFIG_DEBUG_VFS_INODE_LOAD 275 uint32_t cycle = (uint32_t)hal_get_cycles(); 276 if( CONFIG_DEBUG_VFS_INODE_LOAD < cycle ) 277 printk("\n[DBG] %s : thread %x enter for <%s> / cycle %d\n", 278 __FUNCTION__, CURRENT_THREAD , name , cycle ); 279 #endif 267 280 268 281 error_t error = 0; … … 293 306 } 294 307 295 vfs_dmsg("\n[DBG] %s : core[%x,%d] exit for <%s> / cycle %d\n", 296 __FUNCTION__ , local_cxy , CURRENT_THREAD->core->lid , name , hal_time_stamp() ); 308 #if CONFIG_DEBUG_VFS_INODE_LOAD 309 cycle = (uint32_t)hal_get_cycles(); 310 if( CONFIG_DEBUG_VFS_INODE_LOAD < cycle ) 311 printk("\n[DBG] %s : thread %x exit for <%s> / cycle %d\n", 312 __FUNCTION__, CURRENT_THREAD , name , cycle ); 313 #endif 297 314 298 315 return error; … … 416 433 kmem_req_t req; // request to kernel memory allocator 417 434 418 vfs_dmsg("\n[DBG] %s : core[%x,%d] enter for <%s> / parent inode = %x / cycle %d\n", 419 __FUNCTION__, local_cxy, CURRENT_THREAD->core->lid, name, parent, hal_time_stamp() ); 435 #if CONFIG_DEBUG_VFS_DENTRY_CREATE 436 uint32_t cycle = (uint32_t)hal_get_cycles(); 437 if( CONFIG_DEBUG_VFS_DENTRY_CREATE < cycle ) 438 printk("\n[DBG] %s : thread %x enter for <%s> / parent_inode %x / cycle %d\n", 439 __FUNCTION__, CURRENT_THREAD , name , parent , cycle ); 440 #endif 420 441 421 442 // get pointer on context … … 465 486 *dentry_xp = XPTR( local_cxy , dentry ); 466 487 467 vfs_dmsg("\n[DBG] %s : core[%x,%d] exit for <%s> / dentry = %x in cluster %x / cycle %d\n", 468 __FUNCTION__, local_cxy, CURRENT_THREAD->core->lid, name, dentry, local_cxy , hal_time_stamp() ); 488 #if CONFIG_DEBUG_VFS_DENTRY_CREATE 489 cycle = (uint32_t)hal_get_cycles(); 490 if( CONFIG_DEBUG_VFS_DENTRY_CREATE < cycle ) 491 printk("\n[DBG] %s : thread %x exit for <%s> / dentry %x / cycle %d\n", 492 __FUNCTION__, CURRENT_THREAD , name , dentry , cycle ); 493 #endif 469 494 470 495 return 0; … … 584 609 uint32_t file_id; // created file descriptor index in reference fd_array 585 610 586 vfs_dmsg("\n[DBG] %s : core[%x,%d] enter for <%s> / cycle %d\n", 587 __FUNCTION__, local_cxy, CURRENT_THREAD->core->lid, path, (uint32_t)hal_time_stamp() ); 611 #if CONFIG_DEBUG_VFS_OPEN 612 uint32_t cycle = (uint32_t)hal_get_cycles(); 613 if( CONFIG_DEBUG_VFS_OPEN < cycle ) 614 printk("\n[DBG] %s : thread %x enter for <%s> / cycle %d\n", 615 __FUNCTION__, CURRENT_THREAD, path, cycle ); 616 #endif 588 617 589 618 // compute lookup working mode … … 610 639 inode_ptr = (vfs_inode_t *)GET_PTR( inode_xp ); 611 640 612 vfs_dmsg("\n[DBG] %s : core[%x,%d] found inode for <%s> in cluster %x / cycle %d\n",613 __FUNCTION__, local_cxy, CURRENT_THREAD->core->lid, path, inode_cxy , (uint32_t)hal_time_stamp() );614 615 641 // create a new file descriptor in cluster containing inode 616 642 if( inode_cxy == local_cxy ) // target cluster is local … … 630 656 if( error ) return error; 631 657 632 vfs_dmsg("\n[DBG] %s : core[%x,%d] exit for <%s> / file = %x in cluster %x / cycle %d\n", 633 __FUNCTION__, local_cxy, CURRENT_THREAD->core->lid, path, 634 GET_PTR(file_xp), GET_CXY(file_xp), hal_time_stamp() ); 658 #if CONFIG_DEBUG_VFS_OPEN 659 cycle = (uint32_t)hal_get_cycles(); 660 if( CONFIG_DEBUG_VFS_OPEN < cycle ) 661 printk("\n[DBG] %s : thread %x exit for <%s> / file %x in cluster %x / cycle %d\n", 662 __FUNCTION__, CURRENT_THREAD, path, GET_PTR(file_xp), GET_CXY(file_xp), cycle ); 663 #endif 635 664 636 665 // success … … 647 676 uint32_t size ) 648 677 { 649 assert( ( file_xp != XPTR_NULL ) , __FUNCTION__ , 650 "file_xp == XPTR_NULL" ); 678 assert( ( file_xp != XPTR_NULL ) , __FUNCTION__ , "file_xp == XPTR_NULL" ); 651 679 652 680 cxy_t file_cxy; // remote file descriptor cluster … … 1319 1347 process = this->process; 1320 1348 1321 vfs_dmsg("\n[DBG] %s : core[%x,%d] enter for <%s> / cycle %d\n", 1322 __FUNCTION__ , local_cxy , this->core->lid , pathname , hal_time_stamp() ); 1349 #if CONFIG_DEBUG_VFS_LOOKUP 1350 uint32_t cycle = (uint32_t)hal_get_cycles(); 1351 if( CONFIG_DEBUG_VFS_LOOKUP < cycle ) 1352 printk("\n[DBG] %s : thread %x enter for <%s> / cycle %d\n", 1353 __FUNCTION__, CURRENT_THREAD, path, cycle ); 1354 #endif 1323 1355 1324 1356 // get extended pointer on first inode to search … … 1343 1375 vfs_get_name_from_path( current , name , &next , &last ); 1344 1376 1345 vfs_dmsg("\n[DBG] %s : core[%x,%d] look for <%s> / last = %d\n", 1346 __FUNCTION__ , local_cxy , this->core->lid , name , last ); 1377 #if (CONFIG_DEBUG_VFS_LOOKUP & 1) 1378 if( CONFIG_DEBUG_VFS_LOOKUP < cycle ) 1379 printk("\n[DBG] %s : look for <%s> / last = %d\n", __FUNCTION__ , name , last ); 1380 #endif 1347 1381 1348 1382 // search a child dentry matching name in parent inode … … 1362 1396 { 1363 1397 1364 vfs_dmsg("\n[DBG] %s : core[%x,%d] miss <%s> => load it\n", 1365 __FUNCTION__ , local_cxy , this->core->lid , name ); 1398 #if (CONFIG_DEBUG_VFS_LOOKUP & 1) 1399 if( CONFIG_DEBUG_VFS_LOOKUP < cycle ) 1400 printk("\n[DBG] %s : miss <%s> => load it\n", __FUNCTION__ , name ); 1401 #endif 1366 1402 1367 1403 // release lock on parent inode … … 1446 1482 vfs_inode_lock( parent_xp ); 1447 1483 1448 vfs_dmsg("\n[DBG] %s : core[%x,%d] created node <%s>\n", 1449 __FUNCTION__ , local_cxy , this->core->lid , name ); 1484 #if (CONFIG_DEBUG_VFS_LOOKUP & 1) 1485 if( CONFIG_DEBUG_VFS_LOOKUP < cycle ) 1486 printk("\n[DBG] %s : created node <%s>\n", __FUNCTION__ , name ); 1487 #endif 1450 1488 1451 1489 } 1452 1490 1453 vfs_dmsg("\n[DBG] %s : core[%x,%d] found <%s> / inode = %x in cluster %x\n", 1454 __FUNCTION__ , local_cxy , this->core->lid , name , GET_PTR(child_xp) , GET_CXY(child_xp) ); 1491 #if (CONFIG_DEBUG_VFS_LOOKUP & 1) 1492 if( CONFIG_DEBUG_VFS_LOOKUP < cycle ) 1493 printk("\n[DBG] %s : found <%s> / inode %x in cluster %x\n", 1494 __FUNCTION__ , name , GET_PTR(child_xp) , GET_CXY(child_xp) ); 1495 #endif 1455 1496 1456 1497 // TODO check access rights here [AG] … … 1477 1518 vfs_inode_unlock( parent_xp ); 1478 1519 1479 vfs_dmsg("\n[DBG] %s : core[%x,%d] exit for <%s> / inode = %x in cluster %x\n", 1480 __FUNCTION__,local_cxy,this->core->lid,pathname,GET_PTR(child_xp),GET_CXY(child_xp) ); 1520 #if CONFIG_DEBUG_VFS_LOOKUP 1521 cycle = (uint32_t)hal_get_cycles(); 1522 if( CONFIG_DEBUG_VFS_LOOKUP < cycle ) 1523 printk("\n[DBG] %s : thread %x exit for <%s> / inode %x in cluster %x / cycle %d\n", 1524 __FUNCTION__, CURRENT_THREAD, path, GET_PTR(child_xp), GET_CXY(child_xp), cycle ); 1525 #endif 1481 1526 1482 1527 // return searched pointer … … 1502 1547 // we use two variables "index" and "count" because the buffer 1503 1548 // is written in decreasing index order (from leaf to root) 1504 // TODO : handle conflict with a concurrent rename [AG]1505 // TODO: handle synchro in the loop [AG]1549 // TODO : handle conflict with a concurrent rename [AG] 1550 // FIXME : handle synchro in the loop [AG] 1506 1551 1507 1552 // set the NUL character in buffer / initialise buffer index and count … … 1576 1621 parent_ptr = (vfs_inode_t *)GET_PTR( parent_xp ); 1577 1622 1578 vfs_dmsg("\n[DBG] %s : core[%x,%d] enter for <%s> / child_cxy = %x / parent_cxy = %x\n", 1579 __FUNCTION__ , local_cxy , CURRENT_THREAD->core->lid , name , child_cxy , parent_cxy ); 1623 #if CONFIG_DEBUG_VFS_ADD_CHILD 1624 uint32_t cycle = (uint32_t)hal_get_cycles(); 1625 if( CONFIG_DEBUG_VFS_ADD_CHILD < cycle ) 1626 printk("\n[DBG] %s : thread %x enter for <%s> / child_cxy = %x / parent_cxy = %x\n", 1627 __FUNCTION__ , CURRENT_THREAD , name , child_cxy , parent_cxy ); 1628 #endif 1580 1629 1581 1630 // 1. create dentry … … 1587 1636 &dentry_xp ); 1588 1637 1589 vfs_dmsg("\n[DBG] %s : dentry <%s> created in local cluster %x\n", 1590 __FUNCTION__ , name , local_cxy ); 1638 #if (CONFIG_DEBUG_VFS_ADD_CHILD & 1) 1639 if( CONFIG_DEBUG_VFS_ADD_CHILD < cycle ) 1640 printk("\n[DBG] %s : dentry <%s> created in cluster %x\n", __FUNCTION__, name, local_cxy ); 1641 #endif 1591 1642 1592 1643 } … … 1600 1651 &error ); 1601 1652 1602 vfs_dmsg("\n[DBG] %s : dentry <%s> created in remote cluster %x\n", 1603 __FUNCTION__ , name , parent_cxy ); 1653 #if (CONFIG_DEBUG_VFS_ADD_CHILD & 1) 1654 if( CONFIG_DEBUG_VFS_ADD_CHILD < cycle ) 1655 printk("\n[DBG] %s : dentry <%s> created in cluster %x\n", __FUNCTION__, name, parent_cxy ); 1656 #endif 1604 1657 1605 1658 } … … 1629 1682 gid, 1630 1683 &inode_xp ); 1684 1685 #if (CONFIG_DEBUG_VFS_ADD_CHILD & 1) 1686 if( CONFIG_DEBUG_VFS_ADD_CHILD < cycle ) 1687 printk("\n[DBG] %s : inode <%x> created in cluster %x\n", 1688 __FUNCTION__ , GET_PTR(inode_xp) , local_cxy ); 1689 #endif 1631 1690 1632 1691 vfs_dmsg("\n[DBG] %s : inode %x created in local cluster %x\n", … … 1648 1707 &error ); 1649 1708 1650 vfs_dmsg("\n[DBG] %s : inode %x created in remote cluster %x\n", 1709 #if (CONFIG_DEBUG_VFS_ADD_CHILD & 1) 1710 if( CONFIG_DEBUG_VFS_ADD_CHILD < cycle ) 1711 printk("\n[DBG] %s : inode <%s> created in cluster %x\n", 1651 1712 __FUNCTION__ , GET_PTR(inode_xp) , child_cxy ); 1713 #endif 1652 1714 1653 1715 } … … 1669 1731 hal_remote_swd( XPTR( dentry_cxy , &dentry_ptr->child_xp ) , inode_xp ); 1670 1732 1671 vfs_dmsg("\n[DBG] %s : exit in cluster %x for <%s>\n", 1672 __FUNCTION__ , local_cxy , name ); 1733 #if CONFIG_DEBUG_VFS_ADD_CHILD 1734 cycle = (uint32_t)hal_get_cycles(); 1735 if( CONFIG_DEBUG_VFS_ADD_CHILD < cycle ) 1736 printk("\n[DBG] %s : thread %x exit for <%s>\n", 1737 __FUNCTION__ , CURRENT_THREAD , name ); 1738 #endif 1673 1739 1674 1740 // success : return extended pointer on child inode … … 1694 1760 assert( (mapper != NULL) , __FUNCTION__ , "no mapper for page\n" ); 1695 1761 1696 vfs_dmsg("\n[DBG] %s : core[%x,%d] enters for page %d / mapper = %x / inode = %x\n", 1697 __FUNCTION__, local_cxy, CURRENT_THREAD->core->lid , page->index , mapper, mapper->inode ); 1762 #if CONFIG_DEBUG_VFS_MAPPER_MOVE 1763 uint32_t cycle = (uint32_t)hal_get_cycles(); 1764 if( CONFIG_DEBUG_VFS_MAPPER_MOVE < cycle ) 1765 printk("\n[DBG] %s : thread %x enter for page %d / mapper %x / inode %x / cycle %d\n", 1766 __FUNCTION__, CURRENT_THREAD, page->index, mapper, mapper->inode, cycle ); 1767 #endif 1698 1768 1699 1769 // get FS type … … 1720 1790 } 1721 1791 1722 vfs_dmsg("\n[DBG] %s : core[%x,%d] exit for page %d / mapper = %x / inode = %x\n", 1723 __FUNCTION__, local_cxy, CURRENT_THREAD->core->lid, page->index, mapper, mapper->inode ); 1792 #if CONFIG_DEBUG_VFS_MAPPER_MOVE 1793 cycle = (uint32_t)hal_get_cycles(); 1794 if( CONFIG_DEBUG_VFS_MAPPER_MOVE < cycle ) 1795 printk("\n[DBG] %s : thread %x exit for page %d / mapper %x / inode %x / cycle %d\n", 1796 __FUNCTION__, CURRENT_THREAD, page->index, mapper, mapper->inode, cycle ); 1797 #endif 1724 1798 1725 1799 return error; … … 1740 1814 assert( (mapper != NULL) , __FUNCTION__ , "mapper pointer is NULL\n" ); 1741 1815 1742 vfs_dmsg("\n[DBG] %s : core[%x,%d] enter for inode %x in cluster %x/ cycle %d\n", 1743 __FUNCTION__, local_cxy, CURRENT_THREAD->core->lid, inode , local_cxy , hal_time_stamp() ); 1816 #if CONFIG_DEBUG_VFS_MAPPER_LOAD 1817 uint32_t cycle = (uint32_t)hal_get_cycles(); 1818 if( CONFIG_DEBUG_VFS_MAPPER_MOVE < cycle ) 1819 printk("\n[DBG] %s : thread %x enter for inode %x in cluster %x / cycle %d\n", 1820 __FUNCTION__, CURRENT_THREAD, inode, local_cxy, cycle ); 1821 #endif 1744 1822 1745 1823 // compute number of pages … … 1757 1835 } 1758 1836 1759 vfs_dmsg("\n[DBG] %s : core[%x,%d] exit for inode %x in cluster %x / cycle %d\n", 1760 __FUNCTION__, local_cxy, CURRENT_THREAD->core->lid, inode , local_cxy , hal_time_stamp() ); 1837 #if CONFIG_DEBUG_VFS_MAPPER_LOAD 1838 cycle = (uint32_t)hal_get_cycles(); 1839 if( CONFIG_DEBUG_VFS_MAPPER_MOVE < cycle ) 1840 printk("\n[DBG] %s : thread %x exit for inode %x in cluster %x / cycle %d\n", 1841 __FUNCTION__, CURRENT_THREAD, inode, local_cxy, cycle ); 1842 #endif 1761 1843 1762 1844 return 0;
Note: See TracChangeset
for help on using the changeset viewer.