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

blip

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/kernel/kern/chdev.c

    r428 r433  
    129129    thread_t * this = CURRENT_THREAD;
    130130
    131 chdev_dmsg("\n[DBG] %s : core[%x,%d] (thread %s) enter / cycle %d\n",
    132 __FUNCTION__, local_cxy, this->core->lid, thread_type_str(this->type) , hal_time_stamp() );
     131#if CONFIG_DEBUG_CHDEV_REGISTER_COMMAND
     132uint32_t cycle = (uint32_t)hal_get_cycles();
     133if( CONFIG_DEBUG_CHDEV_REGISTER_COMMAND < cycle )
     134printk("\n[DBG] %s : client_thread %x (%s) enter / cycle %d\n",
     135__FUNCTION__, this, thread_type_str(this->type) , cycle );
     136#endif
    133137
    134138    // get device descriptor cluster and local pointer
     
    142146    // get local pointer on server thread
    143147    server_ptr = (thread_t *)hal_remote_lpt( XPTR( chdev_cxy , &chdev_ptr->server) );
    144 
    145 chdev_dmsg("\n[DBG] %s : core[%x,%d] (thread %s) / server_cxy %x / server_ptr %x / server_type %\n",
    146 __FUNCTION__, local_cxy, this->core->lid, server_cxy, server_ptr,
    147 thread_type_str( hal_remote_lw( XPTR( server_cxy , &server_ptr->type) ) ) );
    148148
    149149    // build extended pointer on chdev lock protecting queue
     
    178178    if( different ) dev_pic_send_ipi( chdev_cxy , lid );
    179179   
    180 chdev_dmsg("\n[DBG] %s : core[%x,%d] (thread %s) deschedules / cycle %d\n",
    181 __FUNCTION__, local_cxy, this->core->lid, thread_type_str(this->type) , hal_time_stamp() );
     180#if CONFIG_DEBUG_CHDEV_REGISTER_COMMAND
     181cycle = (uint32_t)hal_get_cycles();
     182if( CONFIG_DEBUG_CHDEV_REGISTER_COMMAND < cycle )
     183printk("\n[DBG] %s : client_thread %x (%s) exit / cycle %d\n",
     184__FUNCTION__, this, thread_type_str(this->type) , cycle );
     185#endif
    182186
    183187    // deschedule
     
    185189    sched_yield("blocked on I/O");
    186190
    187 chdev_dmsg("\n[DBG] %s : core[%x,%d] (thread %s) resumes / cycle %d\n",
    188 __FUNCTION__, local_cxy, this->core->lid, thread_type_str(this->type) , hal_time_stamp() );
    189 
    190191    // exit critical section
    191192    hal_restore_irq( save_sr );
     193
     194#if CONFIG_DEBUG_CHDEV_REGISTER_COMMAND
     195cycle = (uint32_t)hal_get_cycles();
     196if( CONFIG_DEBUG_CHDEV_REGISTER_COMMAND < cycle )
     197printk("\n[DBG] %s : client_thread %x (%s) resumes / cycle %d\n",
     198__FUNCTION__, this, thread_type_str(this->type) , cycle );
     199#endif
    192200
    193201#if CONFIG_READ_DEBUG
     
    209217    server = CURRENT_THREAD;
    210218
    211 chdev_dmsg("\n[DBG] %s : enter / server = %x / chdev = %x / cycle %d\n",
    212 __FUNCTION__ , server , chdev , hal_time_stamp() );
     219#if CONFIG_DEBUG_CHDEV_SEQUENCIAL_SERVER
     220uint32_t cycle = (uint32_t)hal_get_cycles();
     221if( CONFIG_DEBUG_CHDEV_SEQUENCIAL_SERVER < cycle )
     222printk("\n[DBG] %s : server_thread %x enter / chdev = %x / cycle %d\n",
     223__FUNCTION__ , server , chdev , cycle );
     224#endif
    213225
    214226    root_xp = XPTR( local_cxy , &chdev->wait_root );
     
    265277            thread_unblock( client_xp , THREAD_BLOCKED_IO );
    266278
    267 chdev_dmsg("\n[DBG] %s : thread %x complete operation for client %x / cycle %d\n",
    268 __FUNCTION__ , server , client_ptr , hal_time_stamp() );
     279#if CONFIG_DEBUG_CHDEV_SEQUENCIAL_SERVER
     280cycle = (uint32_t)hal_get_cycles();
     281if( CONFIG_DEBUG_CHDEV_SEQUENCIAL_SERVER < cycle )
     282printk("\n[DBG] %s : server_thread %x complete operation for client %x / cycle %d\n",
     283__FUNCTION__ , server , client_ptr , cycle );
     284#endif
    269285
    270286#if CONFIG_READ_DEBUG
Note: See TracChangeset for help on using the changeset viewer.