Changeset 433 for trunk/kernel/mm/kcm.c


Ignore:
Timestamp:
Feb 14, 2018, 3:40:19 PM (6 years ago)
Author:
alain
Message:

blip

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/kernel/mm/kcm.c

    r407 r433  
    4747                             kcm_page_t * kcm_page )
    4848{
    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
     51uint32_t cycle = (uint32_t)hal_get_cycles();
     52if( CONFIG_DEBUG_KCM_ALLOC < cycle )
     53printk("\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
    5257
    5358        assert( kcm_page->active , __FUNCTION__ , "kcm_page should be active" );
     
    8085                     + (index * kcm->block_size) );
    8186
    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
     88cycle = (uint32_t)hal_get_cycles();
     89if( CONFIG_DEBUG_KCM_ALLOC < cycle )
     90printk("\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
    8594
    8695        return ptr;
     
    300309                kcm->active_pages_nr ++;
    301310                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 
    307311        }
    308312        else                                    // get first page from active list
     
    310314                // get page pointer from active list
    311315                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 );
    316316        }
    317317
Note: See TracChangeset for help on using the changeset viewer.