Ignore:
Timestamp:
Oct 4, 2018, 11:50:21 PM (6 years ago)
Author:
alain
Message:

Complete restructuration of kernel locks.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/kernel/syscalls/sys_is_fg.c

    r506 r566  
    4848    process_t * process = this->process;
    4949
     50#if (DEBUG_SYS_IS_FG || CONFIG_INSTRUMENTATION_SYSCALLS)
     51uint64_t     tm_start = hal_get_cycles();
     52#endif
     53
    5054#if DEBUG_SYS_IS_FG
    51 uint64_t    tm_start;
    52 uint64_t    tm_end;
    5355tm_start = hal_get_cycles();
    54 if( DEBUG_SYS_FG < tm_start )
     56if( DEBUG_SYS_IS_FG < tm_start )
    5557printk("\n[DBG] %s : thread %x in process %x enter for pid %x / cycle %d\n",
    5658__FUNCTION__ , this->trdid , process->pid, pid, (uint32_t)tm_start );
     
    9294    hal_fence();
    9395
     96#if (DEBUG_SYS_IS_FG || CONFIG_INSTRUMENTATION_SYSCALLS)
     97uint64_t     tm_end = hal_get_cycles();
     98#endif
     99
    94100#if DEBUG_SYS_IS_FG
    95101tm_end = hal_get_cycles();
    96 if( DEBUG_SYS_FG < tm_end )
     102if( DEBUG_SYS_IS_FG < tm_end )
    97103printk("\n[DBG] %s : thread %x in process %x exit / is_txt_owner %d / cycle %d\n",
    98104__FUNCTION__, this->trdid, process->pid, is_txt_owner, (uint32_t)tm_end );
    99105#endif
    100106
    101         return 0;
     107#if CONFIG_INSTRUMENTATION_SYSCALLS
     108hal_atomic_add( &syscalls_cumul_cost[SYS_IS_FG] , tm_end - tm_start );
     109hal_atomic_add( &syscalls_occurences[SYS_IS_FG] , 1 );
     110#endif
     111
     112return 0;
    102113
    103114}  // end sys_is_fg()
Note: See TracChangeset for help on using the changeset viewer.