Changeset 566 for trunk/kernel/syscalls/sys_is_fg.c
- Timestamp:
- Oct 4, 2018, 11:50:21 PM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/kernel/syscalls/sys_is_fg.c
r506 r566 48 48 process_t * process = this->process; 49 49 50 #if (DEBUG_SYS_IS_FG || CONFIG_INSTRUMENTATION_SYSCALLS) 51 uint64_t tm_start = hal_get_cycles(); 52 #endif 53 50 54 #if DEBUG_SYS_IS_FG 51 uint64_t tm_start;52 uint64_t tm_end;53 55 tm_start = hal_get_cycles(); 54 if( DEBUG_SYS_ FG < tm_start )56 if( DEBUG_SYS_IS_FG < tm_start ) 55 57 printk("\n[DBG] %s : thread %x in process %x enter for pid %x / cycle %d\n", 56 58 __FUNCTION__ , this->trdid , process->pid, pid, (uint32_t)tm_start ); … … 92 94 hal_fence(); 93 95 96 #if (DEBUG_SYS_IS_FG || CONFIG_INSTRUMENTATION_SYSCALLS) 97 uint64_t tm_end = hal_get_cycles(); 98 #endif 99 94 100 #if DEBUG_SYS_IS_FG 95 101 tm_end = hal_get_cycles(); 96 if( DEBUG_SYS_ FG < tm_end )102 if( DEBUG_SYS_IS_FG < tm_end ) 97 103 printk("\n[DBG] %s : thread %x in process %x exit / is_txt_owner %d / cycle %d\n", 98 104 __FUNCTION__, this->trdid, process->pid, is_txt_owner, (uint32_t)tm_end ); 99 105 #endif 100 106 101 return 0; 107 #if CONFIG_INSTRUMENTATION_SYSCALLS 108 hal_atomic_add( &syscalls_cumul_cost[SYS_IS_FG] , tm_end - tm_start ); 109 hal_atomic_add( &syscalls_occurences[SYS_IS_FG] , 1 ); 110 #endif 111 112 return 0; 102 113 103 114 } // end sys_is_fg()
Note: See TracChangeset
for help on using the changeset viewer.