Changeset 433 for trunk/kernel/mm/kcm.c
- Timestamp:
- Feb 14, 2018, 3:40:19 PM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/kernel/mm/kcm.c
r407 r433 47 47 kcm_page_t * kcm_page ) 48 48 { 49 kcm_dmsg("\n[DBG] %s : enters for %s / page %x / count = %d / active = %d\n", 50 __FUNCTION__ , kmem_type_str( kcm->type ) , 51 (intptr_t)kcm_page , kcm_page->count , kcm_page->active ); 49 50 #if CONFIG_DEBUG_KCM_ALLOC 51 uint32_t cycle = (uint32_t)hal_get_cycles(); 52 if( CONFIG_DEBUG_KCM_ALLOC < cycle ) 53 printk("\n[DBG] %s : thread %x enters for %s / page %x / count %d / active %d\n", 54 __FUNCTION__ , CURRENT_THREAD , kmem_type_str( kcm->type ) , 55 (intptr_t)kcm_page , kcm_page->count , kcm_page->active ); 56 #endif 52 57 53 58 assert( kcm_page->active , __FUNCTION__ , "kcm_page should be active" ); … … 80 85 + (index * kcm->block_size) ); 81 86 82 kcm_dmsg("\n[DBG] %s : allocated one block %s / ptr = %p / page = %x / count = %d\n", 83 __FUNCTION__ , kmem_type_str( kcm->type ) , ptr , 84 (intptr_t)kcm_page , kcm_page->count ); 87 #if CONFIG_DEBUG_KCM_ALLOC 88 cycle = (uint32_t)hal_get_cycles(); 89 if( CONFIG_DEBUG_KCM_ALLOC < cycle ) 90 printk("\n[DBG] %s : thread %x exit / type %s / ptr %p / page %x / count %d\n", 91 __FUNCTION__ , CURRENT_THREAD , kmem_type_str( kcm->type ) , ptr , 92 (intptr_t)kcm_page , kcm_page->count ); 93 #endif 85 94 86 95 return ptr; … … 300 309 kcm->active_pages_nr ++; 301 310 kcm_page->active = 1; 302 303 kcm_dmsg("\n[DBG] %s : enters for type %s at cycle %d / new page = %x / count = %d\n",304 __FUNCTION__ , kmem_type_str( kcm->type ) , hal_get_cycles() ,305 (intptr_t)kcm_page , kcm_page->count );306 307 311 } 308 312 else // get first page from active list … … 310 314 // get page pointer from active list 311 315 kcm_page = (kcm_page_t *)LIST_FIRST( &kcm->active_root , kcm_page_t , list ); 312 313 kcm_dmsg("\n[DBG] %s : enters for type %s at cycle %d / page = %x / count = %d\n",314 __FUNCTION__ , kmem_type_str( kcm->type ) , hal_get_cycles() ,315 (intptr_t)kcm_page , kcm_page->count );316 316 } 317 317
Note: See TracChangeset
for help on using the changeset viewer.