Changeset 625 for trunk/kernel/syscalls/sys_barrier.c
- Timestamp:
- Apr 10, 2019, 10:09:39 AM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/kernel/syscalls/sys_barrier.c
r624 r625 2 2 * sys_barrier.c - Access a POSIX barrier. 3 3 * 4 * authors Alain Greiner (2016,2017,2018 )4 * authors Alain Greiner (2016,2017,2018,2019) 5 5 * 6 6 * Copyright (c) UPMC Sorbonne Universites … … 25 25 #include <hal_special.h> 26 26 #include <hal_uspace.h> 27 #include <hal_vmm.h> 27 28 #include <errno.h> 28 29 #include <thread.h> … … 56 57 process_t * process = this->process; 57 58 59 #if (DEBUG_SYS_BARRIER || CONFIG_INSTRUMENTATION_SYSCALLS) 60 uint64_t tm_start = hal_get_cycles(); 61 #endif 62 58 63 #if DEBUG_SYS_BARRIER 59 uint64_t tm_start;60 uint64_t tm_end;61 tm_start = hal_get_cycles();62 64 if( DEBUG_SYS_BARRIER < tm_start ) 63 65 printk("\n[%s] thread[%x,%x] enters for %s / count %d / cycle %d\n", … … 184 186 } // end switch 185 187 188 hal_fence(); 189 190 #if (DEBUG_SYS_BARRIER || CONFIG_INSTRUMENTATION_SYSCALLS) 191 uint64_t tm_end = hal_get_cycles(); 192 #endif 193 186 194 #if DEBUG_SYS_BARRIER 187 tm_end = hal_get_cycles();188 195 if( DEBUG_SYS_BARRIER < tm_end ) 189 printk("\n[%s] thread[%x,%x] exit for %s / cost %d / cycle %d\n", 190 __FUNCTION__, process->pid, this->trdid, sys_barrier_op_str(operation), 191 (uint32_t)(tm_end - tm_start), (uint32_t)tm_end ); 196 printk("\n[%s] thread[%x,%x] exit for %s / cycle %d\n", 197 __FUNCTION__, process->pid, this->trdid, sys_barrier_op_str(operation), (uint32_t)tm_end ); 198 #endif 199 200 #if CONFIG_INSTRUMENTATION_SYSCALLS 201 hal_atomic_add( &syscalls_cumul_cost[SYS_BARRIER] , tm_end - tm_start ); 202 hal_atomic_add( &syscalls_occurences[SYS_BARRIER] , 1 ); 192 203 #endif 193 204
Note: See TracChangeset
for help on using the changeset viewer.