Changeset 438 for trunk/kernel/fs
- Timestamp:
- Apr 4, 2018, 2:49:02 PM (7 years ago)
- Location:
- trunk/kernel/fs
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/kernel/fs/devfs.c
r437 r438 42 42 extern chdev_directory_t chdev_dir; // allocated in kernel_init.c 43 43 44 #if ( CONFIG_DEBUG_SYS_READ & 1)44 #if (DEBUG_SYS_READ & 1) 45 45 extern uint32_t enter_devfs_read; 46 46 extern uint32_t exit_devfs_read; 47 47 #endif 48 48 49 #if ( CONFIG_DEBUG_SYS_WRITE & 1)49 #if (DEBUG_SYS_WRITE & 1) 50 50 extern uint32_t enter_devfs_write; 51 51 extern uint32_t exit_devfs_write; … … 92 92 error_t error; 93 93 94 #if CONFIG_DEBUG_DEVFS_INIT94 #if DEBUG_DEVFS_INIT 95 95 uint32_t cycle = (uint32_t)hal_get_cycles(); 96 if( CONFIG_DEBUG_DEVFS_INIT < cycle )96 if( DEBUG_DEVFS_INIT < cycle ) 97 97 printk("\n[DBG] %s : thread %x enter at cycle %d\n", 98 98 __FUNCTION__ , CURRENT_THREAD , cycle ); … … 110 110 assert( (error == 0) , __FUNCTION__ , "cannot create <dev>\n" ); 111 111 112 #if( CONFIG_DEBUG_DEVFS_INIT & 1 )113 if( CONFIG_DEBUG_DEVFS_INIT < cycle )112 #if( DEBUG_DEVFS_INIT & 1 ) 113 if( DEBUG_DEVFS_INIT < cycle ) 114 114 printk("\n[DBG] %s : created <dev> inode at cycle %d\n", __FUNCTION__, cycle ); 115 115 #endif … … 126 126 assert( (error == 0) , __FUNCTION__ , "cannot create <external>\n" ); 127 127 128 #if CONFIG_DEBUG_DEVFS_INIT128 #if DEBUG_DEVFS_INIT 129 129 cycle = (uint32_t)hal_get_cycles(); 130 if( CONFIG_DEBUG_DEVFS_INIT < cycle )130 if( DEBUG_DEVFS_INIT < cycle ) 131 131 printk("\n[DBG] %s : thread %x exit at cycle %d\n", 132 132 __FUNCTION__ , CURRENT_THREAD , cycle ); … … 147 147 uint32_t channel; 148 148 149 #if CONFIG_DEBUG_DEVFS_INIT149 #if DEBUG_DEVFS_INIT 150 150 uint32_t cycle = (uint32_t)hal_get_cycles(); 151 if( CONFIG_DEBUG_DEVFS_INIT < cycle )151 if( DEBUG_DEVFS_INIT < cycle ) 152 152 printk("\n[DBG] %s : thread %x enter at cycle %d\n", 153 153 __FUNCTION__ , CURRENT_THREAD , cycle ); … … 357 357 } 358 358 359 #if CONFIG_DEBUG_DEVFS_INIT359 #if DEBUG_DEVFS_INIT 360 360 cycle = (uint32_t)hal_get_cycles(); 361 if( CONFIG_DEBUG_DEVFS_INIT < cycle )361 if( DEBUG_DEVFS_INIT < cycle ) 362 362 printk("\n[DBG] %s : thread %x exit at cycle %d\n", 363 363 __FUNCTION__ , CURRENT_THREAD , cycle ); … … 385 385 char k_buf[CONFIG_TXT_KBUF_SIZE]; // local kernel buffer 386 386 387 #if ( CONFIG_DEBUG_SYS_READ & 1)387 #if (DEBUG_SYS_READ & 1) 388 388 enter_devfs_read = hal_time_stamp(); 389 389 #endif 390 390 391 #if ( CONFIG_DEBUG_SYS_WRITE & 1)391 #if (DEBUG_SYS_WRITE & 1) 392 392 enter_devfs_write = hal_time_stamp(); 393 393 #endif 394 394 395 #if CONFIG_DEBUG_DEVFS_MOVE395 #if DEBUG_DEVFS_MOVE 396 396 uint32_t cycle = (uint32_t)hal_get_cycles(); 397 if( CONFIG_DEBUG_DEVFS_MOVE < cycle )397 if( DEBUG_DEVFS_MOVE < cycle ) 398 398 printk("\n[DBG] %s : thread %x enter / to_mem %d / cycle %d\n", 399 399 __FUNCTION__ , CURRENT_THREAD , to_buffer , cycle ); … … 431 431 } 432 432 433 #if CONFIG_DEBUG_DEVFS_MOVE433 #if DEBUG_DEVFS_MOVE 434 434 cycle = (uint32_t)hal_get_cycles(); 435 if( CONFIG_DEBUG_DEVFS_MOVE < cycle )435 if( DEBUG_DEVFS_MOVE < cycle ) 436 436 printk("\n[DBG] %s : thread %x exit / to_mem %d / cycle %d\n", 437 437 __FUNCTION__ , CURRENT_THREAD , to_buffer / cycle ); 438 438 #endif 439 439 440 #if ( CONFIG_DEBUG_SYS_READ & 1)440 #if (DEBUG_SYS_READ & 1) 441 441 exit_devfs_read = hal_time_stamp(); 442 442 #endif … … 455 455 { 456 456 457 #if CONFIG_DEBUG_DEVFS_MOVE457 #if DEBUG_DEVFS_MOVE 458 458 cycle = (uint32_t)hal_get_cycles(); 459 if( CONFIG_DEBUG_DEVFS_MOVE < cycle )459 if( DEBUG_DEVFS_MOVE < cycle ) 460 460 printk("\n[DBG] %s : thread %x exit / to_mem %d / cycle %d\n", 461 461 __FUNCTION__ , CURRENT_THREAD , to_buffer / cycle ); 462 462 #endif 463 463 464 #if ( CONFIG_DEBUG_SYS_WRITE & 1)464 #if (DEBUG_SYS_WRITE & 1) 465 465 exit_devfs_write = hal_time_stamp(); 466 466 #endif -
trunk/kernel/fs/fatfs.c
r435 r438 262 262 "no FAT access required for first page\n"); 263 263 264 #if CONFIG_DEBUG_FATFS_GET_CLUSTER264 #if DEBUG_FATFS_GET_CLUSTER 265 265 uint32_t cycle = (uint32_t)hal_get_cycles(); 266 if( CONFIG_DEBUG_FATFS_GET_CLUSTER < cycle )266 if( DEBUG_FATFS_GET_CLUSTER < cycle ) 267 267 printk("\n[DBG] %s : thread %x enter / first_cluster_id %d / searched_index / cycle %d\n", 268 268 __FUNCTION__, CURRENT_THREAD, first_cluster_id, searched_page_index, cycle ); … … 293 293 next_cluster_id = current_page_buffer[current_page_offset]; 294 294 295 #if ( CONFIG_DEBUG_FATFS_GET_CLUSTER & 1)296 if( CONFIG_DEBUG_FATFS_GET_CLUSTER < cycle )295 #if (DEBUG_FATFS_GET_CLUSTER & 1) 296 if( DEBUG_FATFS_GET_CLUSTER < cycle ) 297 297 printk("\n[DBG] %s : traverse FAT / current_page_index = %d\n" 298 298 "current_page_offset = %d / next_cluster_id = %d\n", … … 308 308 if( next_cluster_id == 0xFFFFFFFF ) return EIO; 309 309 310 #if CONFIG_DEBUG_FATFS_GET_CLUSTER310 #if DEBUG_FATFS_GET_CLUSTER 311 311 cycle = (uint32_t)hal_get_cycles(); 312 if( CONFIG_DEBUG_FATFS_GET_CLUSTER < cycle )312 if( DEBUG_FATFS_GET_CLUSTER < cycle ) 313 313 printk("\n[DBG] %s : thread %x exit / searched_cluster_id = %d / cycle %d\n", 314 314 __FUNCTION__, CURRENT_THREAD, next_cluster_id / cycle ); … … 345 345 uint8_t * buffer; 346 346 347 #if CONFIG_DEBUG_FATFS_INIT347 #if DEBUG_FATFS_INIT 348 348 uint32_t cycle = (uint32_t)hal_get_cycles(); 349 if( CONFIG_DEBUG_FATFS_INIT < cycle )349 if( DEBUG_FATFS_INIT < cycle ) 350 350 printk("\n[DBG] %s : thread %x enter for fatfs_ctx = %x / cycle %d\n", 351 351 __FUNCTION__ , CURRENT_THREAD , fatfs_ctx , cycle ); … … 370 370 "cannot access boot record\n" ); 371 371 372 #if ( CONFIG_DEBUG_FATFS_INIT & 0x1)373 if( CONFIG_DEBUG_FATFS_INIT < cycle )372 #if (DEBUG_FATFS_INIT & 0x1) 373 if( DEBUG_FATFS_INIT < cycle ) 374 374 { 375 375 uint32_t line; … … 448 448 fatfs_ctx->fat_mapper_xp = XPTR( local_cxy , fat_mapper ); 449 449 450 #if CONFIG_DEBUG_FATFS_INIT450 #if DEBUG_FATFS_INIT 451 451 cycle = (uint32_t)hal_get_cycles(); 452 if( CONFIG_DEBUG_FATFS_INIT < cycle )452 if( DEBUG_FATFS_INIT < cycle ) 453 453 printk("\n[DBG] %s : thread %x exit for fatfs_ctx = %x / cycle %d\n", 454 454 __FUNCTION__ , CURRENT_THREAD , fatfs_ctx , cycle ); … … 486 486 inode = mapper->inode; 487 487 488 #if CONFIG_DEBUG_FATFS_MOVE488 #if DEBUG_FATFS_MOVE 489 489 uint32_t cycle = (uint32_t)hal_get_cycles(); 490 if( CONFIG_DEBUG_FATFS_MOVE < cycle )490 if( DEBUG_FATFS_MOVE < cycle ) 491 491 printk("\n[DBG] %s : thread %x enter / page %d / inode %x / mapper %x / cycle %d\n", 492 492 __FUNCTION__ , CURRENT_THREAD , index , inode , mapper , cycle ); … … 507 507 lba = fatfs_ctx->fat_begin_lba + (count * index); 508 508 509 #if ( CONFIG_DEBUG_FATFS_MOVE & 0x1)510 if( CONFIG_DEBUG_FATFS_MOVE < cycle )509 #if (DEBUG_FATFS_MOVE & 0x1) 510 if( DEBUG_FATFS_MOVE < cycle ) 511 511 printk("\n[DBG] %s : access FAT on device / lba = %d\n", __FUNCTION__ , lba ); 512 512 #endif … … 541 541 { 542 542 543 #if ( CONFIG_DEBUG_FATFS_MOVE & 0x1)544 if( CONFIG_DEBUG_FATFS_MOVE < cycle )543 #if (DEBUG_FATFS_MOVE & 0x1) 544 if( DEBUG_FATFS_MOVE < cycle ) 545 545 print("\n[DBG] %s : access local FAT mapper\n" 546 546 "fat_mapper_cxy = %x / fat_mapper_ptr = %x / first_cluster_id = %d / index = %d\n", … … 555 555 { 556 556 557 #if ( CONFIG_DEBUG_FATFS_MOVE & 0x1)558 if( CONFIG_DEBUG_FATFS_MOVE < cycle )557 #if (DEBUG_FATFS_MOVE & 0x1) 558 if( DEBUG_FATFS_MOVE < cycle ) 559 559 printk("\n[DBG] %s : access remote FAT mapper\n" 560 560 "fat_mapper_cxy = %x / fat_mapper_ptr = %x / first_cluster_id = %d / index = %d\n", … … 572 572 } 573 573 574 #if ( CONFIG_DEBUG_FATFS_MOVE & 0x1)575 if( CONFIG_DEBUG_FATFS_MOVE < cycle )574 #if (DEBUG_FATFS_MOVE & 0x1) 575 if( DEBUG_FATFS_MOVE < cycle ) 576 576 printk("\n[DBG] %s : access device for inode %x / cluster_id %d\n", 577 577 __FUNCTION__ , inode , searched_cluster_id ); … … 588 588 } 589 589 590 #if CONFIG_DEBUG_FATFS_MOVE590 #if DEBUG_FATFS_MOVE 591 591 cycle = (uint32_t)hal_get_cycles(); 592 if( CONFIG_DEBUG_FATFS_MOVE < cycle )592 if( DEBUG_FATFS_MOVE < cycle ) 593 593 printk("\n[DBG] %s : thread %x exit / page %d / inode %x / mapper %x / cycle %d\n", 594 594 __FUNCTION__ , CURRENT_THREAD , index , inode , mapper , cycle ); 595 595 #endif 596 596 597 #if ( CONFIG_DEBUG_FATFS_MOVE & 0x1)598 if( CONFIG_DEBUG_FATFS_MOVE < cycle )597 #if (DEBUG_FATFS_MOVE & 0x1) 598 if( DEBUG_FATFS_MOVE < cycle ) 599 599 { 600 600 uint32_t * tab = (uint32_t *)buffer; … … 623 623 // - scan the directory entries in each 4 Kbytes page 624 624 625 #if CONFIG_DEBUG_FATFS_LOAD625 #if DEBUG_FATFS_LOAD 626 626 uint32_t cycle = (uint32_t)hal_get_cycles(); 627 if( CONFIG_DEBUG_FATFS_LOAD < cycle )627 if( DEBUG_FATFS_LOAD < cycle ) 628 628 printk("\n[DBG] %s : thread %x enter for child <%s> in parent inode %x / cycle %d\n", 629 629 __FUNCTION__ , CURRENT_THREAD , name , parent_inode , cycle ); … … 665 665 base = (uint8_t *)GET_PTR( base_xp ); 666 666 667 #if ( CONFIG_DEBUG_FATFS_LOAD & 0x1)668 if( CONFIG_DEBUG_FATFS_LOAD < cycle )667 #if (DEBUG_FATFS_LOAD & 0x1) 668 if( DEBUG_FATFS_LOAD < cycle ) 669 669 { 670 670 uint32_t * buf = (uint32_t *)base; … … 749 749 { 750 750 751 #if CONFIG_DEBUG_FATFS_LOAD751 #if DEBUG_FATFS_LOAD 752 752 cycle = (uint32_t)hal_get_cycles(); 753 if( CONFIG_DEBUG_FATFS_LOAD < cycle )753 if( DEBUG_FATFS_LOAD < cycle ) 754 754 printk("\n[DBG] %s : thread %x exit / child <%s> not found / cycle %d\n", 755 755 __FUNCTION__ , CURRENT_THREAD, name, cycle ); … … 771 771 hal_remote_sw( XPTR( child_cxy , &child_ptr->extend ) , cluster ); 772 772 773 #if CONFIG_DEBUG_FATFS_LOAD773 #if DEBUG_FATFS_LOAD 774 774 cycle = (uint32_t)hal_get_cycles(); 775 if( CONFIG_DEBUG_FATFS_LOAD < cycle )775 if( DEBUG_FATFS_LOAD < cycle ) 776 776 printk("\n[DBG] %s : thread %x exit / child <%s> loaded / cycle %d\n", 777 777 __FUNCTION__ , CURRENT_THREAD, name, cycle ); -
trunk/kernel/fs/vfs.c
r437 r438 157 157 error_t error; 158 158 159 #if CONFIG_DEBUG_VFS_INODE_CREATE159 #if DEBUG_VFS_INODE_CREATE 160 160 uint32_t cycle = (uint32_t)hal_get_cycles(); 161 if( CONFIG_DEBUG_VFS_INODE_CREATE < cycle )161 if( DEBUG_VFS_INODE_CREATE < cycle ) 162 162 printk("\n[DBG] %s : thread %x enter / dentry = %x in cluster %x / cycle %d\n", 163 163 __FUNCTION__, CURRENT_THREAD, GET_PTR(dentry_xp), GET_CXY(dentry_xp), cycle ); … … 234 234 remote_spinlock_init( XPTR( local_cxy , &inode->main_lock ) ); 235 235 236 #if CONFIG_DEBUG_VFS_INODE_CREATE236 #if DEBUG_VFS_INODE_CREATE 237 237 cycle = (uint32_t)hal_get_cycles(); 238 if( CONFIG_DEBUG_VFS_INODE_CREATE < cycle )238 if( DEBUG_VFS_INODE_CREATE < cycle ) 239 239 printk("\n[DBG] %s : thread %x exit / inode = %x in cluster %x / cycle %d\n", 240 240 __FUNCTION__, CURRENT_THREAD, inode, local_cxy, cycle ); … … 272 272 { 273 273 274 #if CONFIG_DEBUG_VFS_INODE_LOAD274 #if DEBUG_VFS_INODE_LOAD 275 275 uint32_t cycle = (uint32_t)hal_get_cycles(); 276 if( CONFIG_DEBUG_VFS_INODE_LOAD < cycle )276 if( DEBUG_VFS_INODE_LOAD < cycle ) 277 277 printk("\n[DBG] %s : thread %x enter for <%s> / cycle %d\n", 278 278 __FUNCTION__, CURRENT_THREAD , name , cycle ); … … 306 306 } 307 307 308 #if CONFIG_DEBUG_VFS_INODE_LOAD308 #if DEBUG_VFS_INODE_LOAD 309 309 cycle = (uint32_t)hal_get_cycles(); 310 if( CONFIG_DEBUG_VFS_INODE_LOAD < cycle )310 if( DEBUG_VFS_INODE_LOAD < cycle ) 311 311 printk("\n[DBG] %s : thread %x exit for <%s> / cycle %d\n", 312 312 __FUNCTION__, CURRENT_THREAD , name , cycle ); … … 433 433 kmem_req_t req; // request to kernel memory allocator 434 434 435 #if CONFIG_DEBUG_VFS_DENTRY_CREATE435 #if DEBUG_VFS_DENTRY_CREATE 436 436 uint32_t cycle = (uint32_t)hal_get_cycles(); 437 if( CONFIG_DEBUG_VFS_DENTRY_CREATE < cycle )437 if( DEBUG_VFS_DENTRY_CREATE < cycle ) 438 438 printk("\n[DBG] %s : thread %x enter for <%s> / parent_inode %x / cycle %d\n", 439 439 __FUNCTION__, CURRENT_THREAD , name , parent , cycle ); … … 456 456 { 457 457 458 #if CONFIG_DEBUG_SYSCALLS_ERROR458 #if DEBUG_SYSCALLS_ERROR 459 459 printk("\n[ERROR] in %s : name <name> too long\n", __FUNCTION__ , name ); 460 460 #endif … … 471 471 { 472 472 473 #if CONFIG_DEBUG_SYSCALLS_ERROR473 #if DEBUG_SYSCALLS_ERROR 474 474 printk("\n[ERROR] in %s : cannot allocate dentry\n", __FUNCTION__ ); 475 475 #endif … … 484 484 strcpy( dentry->name , name ); 485 485 486 #if( CONFIG_DEBUG_VFS_DENTRY_CREATE & 1 )486 #if( DEBUG_VFS_DENTRY_CREATE & 1 ) 487 487 cycle = (uint32_t)hal_get_cycles(); 488 if( CONFIG_DEBUG_VFS_DENTRY_CREATE < cycle )488 if( DEBUG_VFS_DENTRY_CREATE < cycle ) 489 489 printk("\n[DBG] %s : dentry initialised\n", __FUNCTION__ ); 490 490 #endif … … 495 495 XPTR( local_cxy , &dentry->list ) ); 496 496 497 #if( CONFIG_DEBUG_VFS_DENTRY_CREATE & 1 )497 #if( DEBUG_VFS_DENTRY_CREATE & 1 ) 498 498 cycle = (uint32_t)hal_get_cycles(); 499 if( CONFIG_DEBUG_VFS_DENTRY_CREATE < cycle )499 if( DEBUG_VFS_DENTRY_CREATE < cycle ) 500 500 printk("\n[DBG] %s : dentry registerd in htab\n", __FUNCTION__ ); 501 501 #endif … … 504 504 *dentry_xp = XPTR( local_cxy , dentry ); 505 505 506 #if CONFIG_DEBUG_VFS_DENTRY_CREATE506 #if DEBUG_VFS_DENTRY_CREATE 507 507 cycle = (uint32_t)hal_get_cycles(); 508 if( CONFIG_DEBUG_VFS_DENTRY_CREATE < cycle )508 if( DEBUG_VFS_DENTRY_CREATE < cycle ) 509 509 printk("\n[DBG] %s : thread %x exit for <%s> / dentry %x / cycle %d\n", 510 510 __FUNCTION__, CURRENT_THREAD , name , dentry , cycle ); … … 627 627 uint32_t file_id; // created file descriptor index in reference fd_array 628 628 629 #if CONFIG_DEBUG_VFS_OPEN629 #if DEBUG_VFS_OPEN 630 630 uint32_t cycle = (uint32_t)hal_get_cycles(); 631 if( CONFIG_DEBUG_VFS_OPEN < cycle )631 if( DEBUG_VFS_OPEN < cycle ) 632 632 printk("\n[DBG] %s : thread %x enter for <%s> / cycle %d\n", 633 633 __FUNCTION__, CURRENT_THREAD, path, cycle ); … … 674 674 if( error ) return error; 675 675 676 #if CONFIG_DEBUG_VFS_OPEN676 #if DEBUG_VFS_OPEN 677 677 cycle = (uint32_t)hal_get_cycles(); 678 if( CONFIG_DEBUG_VFS_OPEN < cycle )678 if( DEBUG_VFS_OPEN < cycle ) 679 679 printk("\n[DBG] %s : thread %x exit for <%s> / file %x in cluster %x / cycle %d\n", 680 680 __FUNCTION__, CURRENT_THREAD, path, GET_PTR(file_xp), GET_CXY(file_xp), cycle ); … … 1365 1365 process = this->process; 1366 1366 1367 #if CONFIG_DEBUG_VFS_LOOKUP1367 #if DEBUG_VFS_LOOKUP 1368 1368 uint32_t cycle = (uint32_t)hal_get_cycles(); 1369 if( CONFIG_DEBUG_VFS_LOOKUP < cycle )1369 if( DEBUG_VFS_LOOKUP < cycle ) 1370 1370 printk("\n[DBG] %s : thread %x enter for <%s> / cycle %d\n", 1371 1371 __FUNCTION__, CURRENT_THREAD, pathname, cycle ); … … 1393 1393 vfs_get_name_from_path( current , name , &next , &last ); 1394 1394 1395 #if ( CONFIG_DEBUG_VFS_LOOKUP & 1)1396 if( CONFIG_DEBUG_VFS_LOOKUP < cycle )1395 #if (DEBUG_VFS_LOOKUP & 1) 1396 if( DEBUG_VFS_LOOKUP < cycle ) 1397 1397 printk("\n[DBG] %s : look for <%s> / last = %d\n", __FUNCTION__ , name , last ); 1398 1398 #endif … … 1414 1414 { 1415 1415 1416 #if ( CONFIG_DEBUG_VFS_LOOKUP & 1)1417 if( CONFIG_DEBUG_VFS_LOOKUP < cycle )1416 #if (DEBUG_VFS_LOOKUP & 1) 1417 if( DEBUG_VFS_LOOKUP < cycle ) 1418 1418 printk("\n[DBG] %s : miss <%s> => load it\n", __FUNCTION__ , name ); 1419 1419 #endif … … 1500 1500 vfs_inode_lock( parent_xp ); 1501 1501 1502 #if ( CONFIG_DEBUG_VFS_LOOKUP & 1)1503 if( CONFIG_DEBUG_VFS_LOOKUP < cycle )1502 #if (DEBUG_VFS_LOOKUP & 1) 1503 if( DEBUG_VFS_LOOKUP < cycle ) 1504 1504 printk("\n[DBG] %s : created node <%s>\n", __FUNCTION__ , name ); 1505 1505 #endif … … 1507 1507 } 1508 1508 1509 #if ( CONFIG_DEBUG_VFS_LOOKUP & 1)1510 if( CONFIG_DEBUG_VFS_LOOKUP < cycle )1509 #if (DEBUG_VFS_LOOKUP & 1) 1510 if( DEBUG_VFS_LOOKUP < cycle ) 1511 1511 printk("\n[DBG] %s : found <%s> / inode %x in cluster %x\n", 1512 1512 __FUNCTION__ , name , GET_PTR(child_xp) , GET_CXY(child_xp) ); … … 1536 1536 vfs_inode_unlock( parent_xp ); 1537 1537 1538 #if CONFIG_DEBUG_VFS_LOOKUP1538 #if DEBUG_VFS_LOOKUP 1539 1539 cycle = (uint32_t)hal_get_cycles(); 1540 if( CONFIG_DEBUG_VFS_LOOKUP < cycle )1540 if( DEBUG_VFS_LOOKUP < cycle ) 1541 1541 printk("\n[DBG] %s : thread %x exit for <%s> / inode %x in cluster %x / cycle %d\n", 1542 1542 __FUNCTION__, CURRENT_THREAD, pathname, GET_PTR(child_xp), GET_CXY(child_xp), cycle ); … … 1639 1639 parent_ptr = (vfs_inode_t *)GET_PTR( parent_xp ); 1640 1640 1641 #if CONFIG_DEBUG_VFS_ADD_CHILD1641 #if DEBUG_VFS_ADD_CHILD 1642 1642 uint32_t cycle = (uint32_t)hal_get_cycles(); 1643 if( CONFIG_DEBUG_VFS_ADD_CHILD < cycle )1643 if( DEBUG_VFS_ADD_CHILD < cycle ) 1644 1644 printk("\n[DBG] %s : thread %x enter for <%s> / child_cxy = %x / parent_cxy = %x\n", 1645 1645 __FUNCTION__ , CURRENT_THREAD , name , child_cxy , parent_cxy ); … … 1654 1654 &dentry_xp ); 1655 1655 1656 #if ( CONFIG_DEBUG_VFS_ADD_CHILD & 1)1657 if( ( CONFIG_DEBUG_VFS_ADD_CHILD < cycle) && (error == 0) )1656 #if (DEBUG_VFS_ADD_CHILD & 1) 1657 if( (DEBUG_VFS_ADD_CHILD < cycle) && (error == 0) ) 1658 1658 printk("\n[DBG] %s : dentry <%s> created in cluster %x\n", __FUNCTION__, name, local_cxy ); 1659 1659 #endif … … 1669 1669 &error ); 1670 1670 1671 #if ( CONFIG_DEBUG_VFS_ADD_CHILD & 1)1672 if( ( CONFIG_DEBUG_VFS_ADD_CHILD < cycle) && (error == 0) )1671 #if (DEBUG_VFS_ADD_CHILD & 1) 1672 if( (DEBUG_VFS_ADD_CHILD < cycle) && (error == 0) ) 1673 1673 printk("\n[DBG] %s : dentry <%s> created in cluster %x\n", __FUNCTION__, name, parent_cxy ); 1674 1674 #endif … … 1701 1701 &inode_xp ); 1702 1702 1703 #if ( CONFIG_DEBUG_VFS_ADD_CHILD & 1)1704 if( CONFIG_DEBUG_VFS_ADD_CHILD < cycle )1703 #if (DEBUG_VFS_ADD_CHILD & 1) 1704 if( DEBUG_VFS_ADD_CHILD < cycle ) 1705 1705 printk("\n[DBG] %s : inode <%x> created in cluster %x\n", 1706 1706 __FUNCTION__ , GET_PTR(inode_xp) , local_cxy ); … … 1722 1722 &error ); 1723 1723 1724 #if ( CONFIG_DEBUG_VFS_ADD_CHILD & 1)1725 if( CONFIG_DEBUG_VFS_ADD_CHILD < cycle )1724 #if (DEBUG_VFS_ADD_CHILD & 1) 1725 if( DEBUG_VFS_ADD_CHILD < cycle ) 1726 1726 printk("\n[DBG] %s : inode <%s> created in cluster %x\n", 1727 1727 __FUNCTION__ , GET_PTR(inode_xp) , child_cxy ); … … 1746 1746 hal_remote_swd( XPTR( dentry_cxy , &dentry_ptr->child_xp ) , inode_xp ); 1747 1747 1748 #if CONFIG_DEBUG_VFS_ADD_CHILD1748 #if DEBUG_VFS_ADD_CHILD 1749 1749 cycle = (uint32_t)hal_get_cycles(); 1750 if( CONFIG_DEBUG_VFS_ADD_CHILD < cycle )1750 if( DEBUG_VFS_ADD_CHILD < cycle ) 1751 1751 printk("\n[DBG] %s : thread %x exit for <%s>\n", 1752 1752 __FUNCTION__ , CURRENT_THREAD , name ); … … 1775 1775 assert( (mapper != NULL) , __FUNCTION__ , "no mapper for page\n" ); 1776 1776 1777 #if CONFIG_DEBUG_VFS_MAPPER_MOVE1777 #if DEBUG_VFS_MAPPER_MOVE 1778 1778 uint32_t cycle = (uint32_t)hal_get_cycles(); 1779 if( CONFIG_DEBUG_VFS_MAPPER_MOVE < cycle )1779 if( DEBUG_VFS_MAPPER_MOVE < cycle ) 1780 1780 printk("\n[DBG] %s : thread %x enter for page %d / mapper %x / inode %x / cycle %d\n", 1781 1781 __FUNCTION__, CURRENT_THREAD, page->index, mapper, mapper->inode, cycle ); … … 1805 1805 } 1806 1806 1807 #if CONFIG_DEBUG_VFS_MAPPER_MOVE1807 #if DEBUG_VFS_MAPPER_MOVE 1808 1808 cycle = (uint32_t)hal_get_cycles(); 1809 if( CONFIG_DEBUG_VFS_MAPPER_MOVE < cycle )1809 if( DEBUG_VFS_MAPPER_MOVE < cycle ) 1810 1810 printk("\n[DBG] %s : thread %x exit for page %d / mapper %x / inode %x / cycle %d\n", 1811 1811 __FUNCTION__, CURRENT_THREAD, page->index, mapper, mapper->inode, cycle ); … … 1829 1829 assert( (mapper != NULL) , __FUNCTION__ , "mapper pointer is NULL\n" ); 1830 1830 1831 #if CONFIG_DEBUG_VFS_MAPPER_LOAD1831 #if DEBUG_VFS_MAPPER_LOAD 1832 1832 uint32_t cycle = (uint32_t)hal_get_cycles(); 1833 if( CONFIG_DEBUG_VFS_MAPPER_MOVE < cycle )1833 if( DEBUG_VFS_MAPPER_MOVE < cycle ) 1834 1834 printk("\n[DBG] %s : thread %x enter for inode %x in cluster %x / cycle %d\n", 1835 1835 __FUNCTION__, CURRENT_THREAD, inode, local_cxy, cycle ); … … 1850 1850 } 1851 1851 1852 #if CONFIG_DEBUG_VFS_MAPPER_LOAD1852 #if DEBUG_VFS_MAPPER_LOAD 1853 1853 cycle = (uint32_t)hal_get_cycles(); 1854 if( CONFIG_DEBUG_VFS_MAPPER_MOVE < cycle )1854 if( DEBUG_VFS_MAPPER_MOVE < cycle ) 1855 1855 printk("\n[DBG] %s : thread %x exit for inode %x in cluster %x / cycle %d\n", 1856 1856 __FUNCTION__, CURRENT_THREAD, inode, local_cxy, cycle );
Note: See TracChangeset
for help on using the changeset viewer.