Changeset 438 for trunk/kernel/mm/mapper.c
- Timestamp:
- Apr 4, 2018, 2:49:02 PM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/kernel/mm/mapper.c
r435 r438 143 143 error_t error; 144 144 145 #if CONFIG_DEBUG_MAPPER_GET_PAGE145 #if DEBUG_MAPPER_GET_PAGE 146 146 uint32_t cycle = (uint32_t)hal_get_cycles(); 147 if( CONFIG_DEBUG_MAPPER_GET_PAGE < cycle )147 if( DEBUG_MAPPER_GET_PAGE < cycle ) 148 148 printk("\n[DBG] %s : thread %x enter for page %d / mapper %x / cycle %d\n", 149 149 __FUNCTION__ , CURRENT_THREAD , index , mapper , cycle ); … … 175 175 { 176 176 177 #if ( CONFIG_DEBUG_MAPPER_GET_PAGE & 1)178 if( CONFIG_DEBUG_MAPPER_GET_PAGE < cycle )177 #if (DEBUG_MAPPER_GET_PAGE & 1) 178 if( DEBUG_MAPPER_GET_PAGE < cycle ) 179 179 printk("\n[DBG] %s : missing page => load from device\n", __FUNCTION__ ); 180 180 #endif … … 257 257 } 258 258 259 #if CONFIG_DEBUG_MAPPER_GET_PAGE259 #if DEBUG_MAPPER_GET_PAGE 260 260 cycle = (uint32_t)hal_get_cycles(); 261 if( CONFIG_DEBUG_MAPPER_GET_PAGE < cycle )261 if( DEBUG_MAPPER_GET_PAGE < cycle ) 262 262 printk("\n[DBG] %s : thread %x exit for page %d / ppn %x / cycle %d\n", 263 263 __FUNCTION__, CURRENT_THREAD, index, ppm_page2ppn(XPTR(local_cxy, page)), cycle ); … … 317 317 uint8_t * buf_ptr; // current buffer address 318 318 319 #if CONFIG_DEBUG_MAPPER_MOVE_USER319 #if DEBUG_MAPPER_MOVE_USER 320 320 uint32_t cycle = (uint32_t)hal_get_cycles(); 321 if( CONFIG_DEBUG_MAPPER_MOVE_USER < cycle )321 if( DEBUG_MAPPER_MOVE_USER < cycle ) 322 322 printk("\n[DBG] %s : thread %x enter / to_buf %d / buffer %x / cycle %d\n", 323 323 __FUNCTION__ , CURRENT_THREAD , to_buffer , buffer , cycle ); … … 347 347 else page_count = CONFIG_PPM_PAGE_SIZE; 348 348 349 #if ( CONFIG_DEBUG_MAPPER_MOVE_USER & 1)350 if( CONFIG_DEBUG_MAPPER_MOVE_USER < cycle )349 #if (DEBUG_MAPPER_MOVE_USER & 1) 350 if( DEBUG_MAPPER_MOVE_USER < cycle ) 351 351 printk("\n[DBG] %s : index = %d / offset = %d / count = %d\n", 352 352 __FUNCTION__ , index , page_offset , page_count ); … … 379 379 } 380 380 381 #if CONFIG_DEBUG_MAPPER_MOVE_USER381 #if DEBUG_MAPPER_MOVE_USER 382 382 cycle = (uint32_t)hal_get_cycles(); 383 if( CONFIG_DEBUG_MAPPER_MOVE_USER < cycle )383 if( DEBUG_MAPPER_MOVE_USER < cycle ) 384 384 printk("\n[DBG] %s : thread %x exit / to_buf %d / buffer %x / cycle %d\n", 385 385 __FUNCTION__ , CURRENT_THREAD , to_buffer , buffer , cycle ); … … 412 412 uint8_t * buffer_ptr = (uint8_t *)GET_PTR( buffer_xp ); 413 413 414 #if CONFIG_DEBUG_MAPPER_MOVE_KERNEL414 #if DEBUG_MAPPER_MOVE_KERNEL 415 415 uint32_t cycle = (uint32_t)hal_get_cycles(); 416 if( CONFIG_DEBUG_MAPPER_MOVE_KERNEL < cycle )416 if( DEBUG_MAPPER_MOVE_KERNEL < cycle ) 417 417 printk("\n[DBG] %s : thread %x enter / to_buf %d / buf_cxy %x / buf_ptr %x / cycle %d\n", 418 418 __FUNCTION__ , CURRENT_THREAD , to_buffer , buffer_cxy , buffer_ptr , cycle ); … … 427 427 uint32_t last = max_byte >> CONFIG_PPM_PAGE_SHIFT; 428 428 429 #if ( CONFIG_DEBUG_MAPPER_MOVE_KERNEL & 1)430 if( CONFIG_DEBUG_MAPPER_MOVE_KERNEL < cycle )429 #if (DEBUG_MAPPER_MOVE_KERNEL & 1) 430 if( DEBUG_MAPPER_MOVE_KERNEL < cycle ) 431 431 printk("\n[DBG] %s : first_page %d / last_page %d\n", __FUNCTION__, first, last ); 432 432 #endif … … 459 459 else page_count = CONFIG_PPM_PAGE_SIZE; 460 460 461 #if ( CONFIG_DEBUG_MAPPER_MOVE_KERNEL & 1)462 if( CONFIG_DEBUG_MAPPER_MOVE_KERNEL < cycle )461 #if (DEBUG_MAPPER_MOVE_KERNEL & 1) 462 if( DEBUG_MAPPER_MOVE_KERNEL < cycle ) 463 463 printk("\n[DBG] %s : page_index = %d / offset = %d / bytes = %d\n", 464 464 __FUNCTION__ , index , page_offset , page_count ); … … 494 494 } 495 495 496 #if CONFIG_DEBUG_MAPPER_MOVE_KERNEL496 #if DEBUG_MAPPER_MOVE_KERNEL 497 497 cycle = (uint32_t)hal_get_cycles(); 498 if( CONFIG_DEBUG_MAPPER_MOVE_KERNEL < cycle )498 if( DEBUG_MAPPER_MOVE_KERNEL < cycle ) 499 499 printk("\n[DBG] %s : thread %x exit / to_buf %d / buf_cxy %x / buf_ptr %x / cycle %d\n", 500 500 __FUNCTION__ , CURRENT_THREAD , to_buffer , buffer_cxy , buffer_ptr , cycle );
Note: See TracChangeset
for help on using the changeset viewer.