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/drivers/soclib_tty.c

    r424 r432  
    7272#endif
    7373
    74 txt_dmsg("\n[DBG] %s : core[%x,%d] / DEV thread enter / cycle %d\n",
    75 __FUNCTION__ , local_cxy , CURRENT_THREAD->core->lid , hal_time_stamp() );
     74#if CONFIG_DEBUG_HAL_TXT
     75uint32_t cycle = (uint32_t)hal_get_cycles();
     76if (CONFIG_DEBUG_HAL_TXT < cycle )
     77printk("\n[DBG] %s : thread %x enter / cycle %d\n",
     78__FUNCTION__ , CURRENT_THREAD , cycle );
     79#endif
    7680
    7781    // get client thread cluster and local pointer
     
    108112    hal_remote_sw( reg_xp , 1 );
    109113
    110 txt_dmsg("\n[DBG] %s : core[%x,%d] DEV thread deschedule / cycle %d\n",
    111 __FUNCTION__ , local_cxy , CURRENT_THREAD->core->lid , hal_time_stamp() );
     114#if CONFIG_DEBUG_HAL_TXT
     115cycle = (uint32_t)hal_get_cycles();
     116if (CONFIG_DEBUG_HAL_TXT < cycle )
     117printk("\n[DBG] %s : thread %x deschedule / cycle %d\n",
     118__FUNCTION__ , CURRENT_THREAD , cycle );
     119#endif
    112120
    113121    // Block and deschedule server thread
     
    115123    sched_yield("blocked on ISR");
    116124
    117 txt_dmsg("\n[DBG] %s : core[%x,%d] / DEV thread resume / cycle %d\n",
    118 __FUNCTION__ , local_cxy , CURRENT_THREAD->core->lid , hal_time_stamp() );
     125#if CONFIG_DEBUG_HAL_TXT
     126cycle = (uint32_t)hal_get_cycles();
     127if (CONFIG_DEBUG_HAL_TXT < cycle )
     128printk("\n[DBG] %s : thread %x resume / cycle %d\n",
     129__FUNCTION__ , CURRENT_THREAD , cycle );
     130#endif
    119131
    120132#if CONFIG_READ_DEBUG
     
    184196#endif
    185197
     198#if CONFIG_DEBUG_HAL_TXT
     199uint32_t cycle = (uint32_t)hal_get_cycles();
     200if (CONFIG_DEBUG_HAL_TXT < cycle)
     201printk("\n[DBG] %s : enter / cycle %d\n", __FUNCTION__ , cycle );
     202#endif
     203
    186204    // get extended pointer on client thread
    187205    xptr_t root      = XPTR( local_cxy , &chdev->wait_root );
     
    197215    buf_xp  = hal_remote_lwd( XPTR( client_cxy , &client_ptr->txt_cmd.buf_xp ) );
    198216
    199 txt_dmsg("\n[DBG] %s : core[%x,%d] enter / cycle %d\n",
    200 __FUNCTION__ , local_cxy, CURRENT_THREAD->core->lid , hal_time_stamp() );
    201 
    202217    // get SOCLIB_TTY peripheral cluster and local pointer
    203218    cxy_t      tty_cxy = GET_CXY( chdev->base );
     
    234249        hal_remote_sw( reg_xp , 0 );
    235250    }
    236     else if( type == TXT_WRITE )         // write all characters in string
     251    else   // type == TXT_WRITE           // write all characters in string
    237252    {
    238253        // loop on characters
     
    276291    hal_fence();
    277292
    278 txt_dmsg("\n[DBG] %s : core[%x,%d] exit / cycle %d\n",
    279 __FUNCTION__ , local_cxy , CURRENT_THREAD->core->lid , hal_time_stamp() );
     293#if CONFIG_DEBUG_HAL_TXT
     294cycle = (uint32_t)hal_get_cycles();
     295if (CONFIG_DEBUG_HAL_TXT < cycle)
     296{
     297    if( type == TXT_READ)
     298        printk("\n[DBG] %s : exit after RX / cycle %d\n", __FUNCTION__ , cycle );
     299    else
     300        printk("\n[DBG] %s : exit after TX / cycle %d\n", __FUNCTION__ , cycle );
     301}     
     302#endif
    280303
    281304#if (CONFIG_READ_DEBUG & 0x1) || (CONFIG_WRITE_DEBUG & 0x1)
Note: See TracChangeset for help on using the changeset viewer.