Ignore:
Timestamp:
Feb 14, 2018, 3:39:35 PM (4 years ago)
Author:
alain
Message:

bloup

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/hal/tsar_mips32/core/hal_exception.c

    r425 r432  
    201201    }
    202202
    203 excp_dmsg("\n[DBG] %s : core[%x,%d] / is_ins %d / %s / vaddr %x\n",
    204 __FUNCTION__ , local_cxy , this->core->lid , is_ins,
    205 hal_mmu_exception_str(excp_code) , bad_vaddr );
     203#if CONFIG_DEBUG_HAL_EXCEPTIONS
     204uint32_t cycle = (uint32_t)hal_get_cycles();
     205if( CONFIG_DEBUG_HAL_EXCEPTIONS < cycle )
     206printk("\n[DBG] %s : thread %x enter / is_ins %d / %s / vaddr %x / cycle %d\n",
     207__FUNCTION__, this, is_ins, hal_mmu_exception_str(excp_code), bad_vaddr, cycle );
     208#endif
    206209
    207210   // analyse exception code
     
    226229            {
    227230
    228 excp_dmsg("\n[DBG] %s : core[%x,%d] / page-fault handled for vaddr = %x\n",
    229 __FUNCTION__ , local_cxy , this->core->lid , bad_vaddr );
     231#if CONFIG_DEBUG_HAL_EXCEPTIONS
     232cycle = (uint32_t)hal_get_cycles();
     233if( CONFIG_DEBUG_HAL_EXCEPTIONS < cycle )
     234printk("\n[DBG] %s : thread %x exit / page-fault handled for vaddr = %x\n",
     235__FUNCTION__ , this , bad_vaddr );
     236#endif
    230237 
    231238                return EXCP_NON_FATAL;
     
    261268                {
    262269
    263 excp_dmsg("\n[DBG] %s : core[%x,%d] / copy-on-write handled for vaddr = %x\n",
    264 __FUNCTION__ , local_cxy , this->core->lid , bad_vaddr );
     270#if CONFIG_DEBUG_HAL_EXCEPTIONS
     271cycle = (uint32_t)hal_get_cycles();
     272if( CONFIG_DEBUG_HAL_EXCEPTIONS < cycle )
     273printk("\n[DBG] %s : thread %x exit / copy-on-write handled for vaddr = %x\n",
     274__FUNCTION__ , this , bad_vaddr );
     275#endif
    265276
    266277                    return EXCP_NON_FATAL;
     
    377388        excCode        = (uzone[UZ_CR] >> 2) & 0xF;
    378389
    379 excp_dmsg("\n[DBG] %s : core[%x,%d] / thread %x in process %x / xcode %x / cycle %d\n",
    380 __FUNCTION__, local_cxy, this->core->lid, this->trdid,
    381 this->process->pid, excCode, (uint32_t)hal_get_cycles() );
     390#if CONFIG_DEBUG_HAL_EXCEPTIONS
     391uint32_t cycle = (uint32_t)hal_get_cycles();
     392if( CONFIG_DEBUG_HAL_EXCEPTIONS < cycle )
     393printk("\n[DBG] %s : thread %x on core[%x,%d] enter / process %x / xcode %x / cycle %d\n",
     394__FUNCTION__, this, local_cxy, this->core->lid, this->process->pid, excCode, cycle );
     395#endif
    382396
    383397        switch(excCode)
     
    434448    }
    435449
    436 excp_dmsg("\n[DBG] %s : core[%x,%d] exit / thread %x in process %x / cycle %d\n",
    437 __FUNCTION__, local_cxy, this->core->lid, this->trdid, this->process->pid,
    438 (uint32_t)hal_get_cycles() );
     450#if CONFIG_DEBUG_HAL_EXCEPTIONS
     451cycle = (uint32_t)hal_get_cycles();
     452if( CONFIG_DEBUG_HAL_EXCEPTIONS < cycle )
     453printk("\n[DBG] %s : thread %x on core[%x,%d] exit / process %x / xcode %x / cycle %d\n",
     454__FUNCTION__, this, local_cxy, this->core->lid, this->process->pid, excCode, cycle );
     455#endif
    439456
    440457}  // end hal_do_exception()
Note: See TracChangeset for help on using the changeset viewer.