Changeset 416 for trunk/kernel/syscalls/sys_fork.c
- Timestamp:
- Jan 4, 2018, 10:05:47 AM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/kernel/syscalls/sys_fork.c
r409 r416 56 56 error_t error; 57 57 58 uint64_t tm_start;59 uint64_t tm_end;60 61 tm_start = hal_get_cycles();62 58 63 59 // get pointers on local parent process and thread … … 67 63 parent_pid = parent_process_ptr->pid; 68 64 69 fork_dmsg("\n[DBG] %s : core[%x,%d] parent process %x enters / cycle %d\n", 70 __FUNCTION__, local_cxy, parent_thread_ptr->core->lid, parent_pid, (uint32_t)tm_start ); 65 #if CONFIG_SYSCALL_DEBUG 66 uint64_t tm_start; 67 uint64_t tm_end; 68 tm_start = hal_get_cycles(); 69 printk("\n[DBG] %s : core[%x,%d] enter / process %x / cycle = %d\n", 70 __FUNCTION__, local_cxy, parent_thread_ptr->core->lid, parent_pid, 71 (uint32_t)tm_start ); 72 #endif 71 73 72 74 // get infos on reference process … … 146 148 thread_unblock( XPTR( target_cxy , child_thread_ptr ) , THREAD_BLOCKED_GLOBAL ); 147 149 148 tm_end = hal_get_cycles(); 149 150 fork_dmsg("\n[DBG] %s : core[%x,%d] parent_process %x exit / cycle %d\n" 151 " child_process %x / child_thread = %x / cost = %d\n", 152 __FUNCTION__, local_cxy, parent_thread_ptr->core->lid, parent_pid, (uint32_t)tm_end, 153 child_pid, child_thread_ptr->trdid , (uint32_t)(tm_end - tm_start) ); 150 #if CONFIG_SYSCALL_DEBUG 151 tm_end = hal_get_cycles(); 152 printk("\n[DBG] %s : core[%x,%d] parent_process %x exit / cost = %d\n", 153 __FUNCTION__, local_cxy, parent_thread_ptr->core->lid, parent_pid, 154 (uint32_t)(tm_end - tm_start) ); 155 #endif 154 156 155 157 return child_pid; … … 158 160 { 159 161 160 tm_end = hal_get_cycles(); 161 162 fork_dmsg("\n[DBG] %s : core[%x,%d] child process %x exit / cycle %d\n", 163 __FUNCTION__, local_cxy, parent_thread_ptr->core->lid, child_pid, (uint32_t)tm_end ); 162 #if CONFIG_SYSCALL_DEBUG 163 tm_end = hal_get_cycles(); 164 printk("\n[DBG] %s : core[%x,%d] child process %x exit / cost = %d\n", 165 __FUNCTION__, local_cxy, parent_thread_ptr->core->lid, child_pid, 166 (uint32_t)(tm_end - tm_start) ); 167 #endif 164 168 165 169 return 0;
Note: See TracChangeset
for help on using the changeset viewer.