Changeset 594 for trunk/kernel/syscalls/sys_display.c
- Timestamp:
- Nov 10, 2018, 2:33:26 PM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/kernel/syscalls/sys_display.c
r584 r594 65 65 process_t * process = this->process; 66 66 67 #if (DEBUG_SYS_DISPLAY || CONFIG_INSTRUMENTATION_SYSCALLS) 68 uint64_t tm_start = hal_get_cycles(); 69 #endif 70 67 71 #if DEBUG_SYS_DISPLAY 68 uint64_t tm_start;69 uint64_t tm_end;70 72 tm_start = hal_get_cycles(); 71 73 if( DEBUG_SYS_DISPLAY < tm_start ) 72 printk("\n[DBG] %s : thread %d enter / process %x/ type %s / cycle = %d\n",73 __FUNCTION__, this, this->process->pid, display_type_str(type), (uint32_t)tm_start );74 printk("\n[DBG] %s : thread[%x,%x] enter / type %s / cycle = %d\n", 75 __FUNCTION__, process->pid, this->trdid, display_type_str(type), (uint32_t)tm_start ); 74 76 #endif 75 77 … … 257 259 else if( type == DISPLAY_BUSYLOCKS ) 258 260 { 259 pid_t pid = ( cxy_t)arg0;261 pid_t pid = (pid_t)arg0; 260 262 trdid_t trdid = (trdid_t)arg1; 261 263 … … 267 269 268 270 #if DEBUG_SYSCALLS_ERROR 269 printk("\n[ERROR] in %s for BUSYLOCKS : thread %x in process %xnot found\n",270 __FUNCTION__ , trdid , pid );271 printk("\n[ERROR] in %s for BUSYLOCKS : thread[%x,%x] not found\n", 272 __FUNCTION__ , pid, trdid ); 271 273 #endif 272 274 this->errno = EINVAL; … … 288 290 } 289 291 292 #if (DEBUG_SYS_DISPLAY || CONFIG_INSTRUMENTATION_SYSCALLS) 293 uint64_t tm_end = hal_get_cycles(); 294 #endif 295 290 296 #if DEBUG_SYS_DISPLAY 291 tm_end = hal_get_cycles();292 297 if( DEBUG_SYS_DISPLAY < tm_end ) 293 printk("\n[DBG] %s : thread %x exit / process %x / cost = %d / cycle %d\n", 294 __FUNCTION__, this, this->process->pid, (uint32_t)(tm_end - tm_start) , (uint32_t)tm_end ); 298 printk("\n[DBG] %s : thread[%x,%x] exit / cycle %d\n", 299 __FUNCTION__, process->pid, this->trdid, (uint32_t)tm_end ); 300 #endif 301 302 #if CONFIG_INSTRUMENTATION_SYSCALLS 303 hal_atomic_add( &syscalls_cumul_cost[SYS_DISPLAY] , tm_end - tm_start ); 304 hal_atomic_add( &syscalls_occurences[SYS_DISPLAY] , 1 ); 295 305 #endif 296 306
Note: See TracChangeset
for help on using the changeset viewer.