Changeset 433 for trunk/kernel/kern/chdev.c
- Timestamp:
- Feb 14, 2018, 3:40:19 PM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/kernel/kern/chdev.c
r428 r433 129 129 thread_t * this = CURRENT_THREAD; 130 130 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 132 uint32_t cycle = (uint32_t)hal_get_cycles(); 133 if( CONFIG_DEBUG_CHDEV_REGISTER_COMMAND < cycle ) 134 printk("\n[DBG] %s : client_thread %x (%s) enter / cycle %d\n", 135 __FUNCTION__, this, thread_type_str(this->type) , cycle ); 136 #endif 133 137 134 138 // get device descriptor cluster and local pointer … … 142 146 // get local pointer on server thread 143 147 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) ) ) );148 148 149 149 // build extended pointer on chdev lock protecting queue … … 178 178 if( different ) dev_pic_send_ipi( chdev_cxy , lid ); 179 179 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 181 cycle = (uint32_t)hal_get_cycles(); 182 if( CONFIG_DEBUG_CHDEV_REGISTER_COMMAND < cycle ) 183 printk("\n[DBG] %s : client_thread %x (%s) exit / cycle %d\n", 184 __FUNCTION__, this, thread_type_str(this->type) , cycle ); 185 #endif 182 186 183 187 // deschedule … … 185 189 sched_yield("blocked on I/O"); 186 190 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 190 191 // exit critical section 191 192 hal_restore_irq( save_sr ); 193 194 #if CONFIG_DEBUG_CHDEV_REGISTER_COMMAND 195 cycle = (uint32_t)hal_get_cycles(); 196 if( CONFIG_DEBUG_CHDEV_REGISTER_COMMAND < cycle ) 197 printk("\n[DBG] %s : client_thread %x (%s) resumes / cycle %d\n", 198 __FUNCTION__, this, thread_type_str(this->type) , cycle ); 199 #endif 192 200 193 201 #if CONFIG_READ_DEBUG … … 209 217 server = CURRENT_THREAD; 210 218 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 220 uint32_t cycle = (uint32_t)hal_get_cycles(); 221 if( CONFIG_DEBUG_CHDEV_SEQUENCIAL_SERVER < cycle ) 222 printk("\n[DBG] %s : server_thread %x enter / chdev = %x / cycle %d\n", 223 __FUNCTION__ , server , chdev , cycle ); 224 #endif 213 225 214 226 root_xp = XPTR( local_cxy , &chdev->wait_root ); … … 265 277 thread_unblock( client_xp , THREAD_BLOCKED_IO ); 266 278 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 280 cycle = (uint32_t)hal_get_cycles(); 281 if( CONFIG_DEBUG_CHDEV_SEQUENCIAL_SERVER < cycle ) 282 printk("\n[DBG] %s : server_thread %x complete operation for client %x / cycle %d\n", 283 __FUNCTION__ , server , client_ptr , cycle ); 284 #endif 269 285 270 286 #if CONFIG_READ_DEBUG
Note: See TracChangeset
for help on using the changeset viewer.