Changeset 594 for trunk/kernel/syscalls/sys_open.c
- Timestamp:
- Nov 10, 2018, 2:33:26 PM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/kernel/syscalls/sys_open.c
r566 r594 47 47 process_t * process = this->process; 48 48 49 #if DEBUG_SYS_OPEN 50 uint32_t tm_start; 51 uint32_t tm_end; 52 tm_start = hal_get_cycles(); 49 #if (DEBUG_SYS_OPEN || CONFIG_INSTRUMENTATION_SYSCALLS) 50 uint64_t tm_start = hal_get_cycles(); 53 51 #endif 54 52 55 53 // check fd_array not full 56 54 if( process_fd_array_full() ) … … 81 79 #if DEBUG_SYS_OPEN 82 80 if( DEBUG_SYS_OPEN < tm_start ) 83 printk("\n[ DBG] %s : thread %x in process %x enter / path %s/ flags %x / cycle %d\n",84 __FUNCTION__, this->trdid, process->pid, kbuf, flags, (uint32_t)tm_start );81 printk("\n[%s] thread[%x,%x] enter for <%s> / flags %x / cycle %d\n", 82 __FUNCTION__, process->pid, this->trdid, kbuf, flags, (uint32_t)tm_start ); 85 83 #endif 86 84 … … 112 110 } 113 111 112 hal_fence; 113 114 #if (DEBUG_SYS_OPEN || CONFIG_INSTRUMENTATION_SYSCALLS) 115 uint64_t tm_end = hal_get_cycles(); 116 #endif 117 114 118 #if DEBUG_SYS_OPEN 115 tm_end = hal_get_cycles();116 119 if( DEBUG_SYS_OPEN < tm_start ) 117 printk("\n[ DBG] %s : thread %x in process %x exit / cost %d/ cycle %d\n",118 __FUNCTION__, this->trdid, process->pid, (uint32_t)(tm_end - tm_start), (uint32_t)tm_start);120 printk("\n[%s] thread[%x,%x] exit for <%s> / cycle %d\n", 121 __FUNCTION__, process->pid, this->trdid, kbuf, (uint32_t)tm_end ); 119 122 #endif 120 123 124 #if CONFIG_INSTRUMENTATION_SYSCALLS 125 hal_atomic_add( &syscalls_cumul_cost[SYS_OPEN] , tm_end - tm_start ); 126 hal_atomic_add( &syscalls_occurences[SYS_OPEN] , 1 ); 127 #endif 128 121 129 return file_id; 122 130 }
Note: See TracChangeset
for help on using the changeset viewer.