Ignore:
Timestamp:
Jul 18, 2019, 2:06:55 PM (5 years ago)
Author:
alain
Message:

Introduce the non-standard pthread_parallel_create() system call
and re-write the <fft> and <sort> applications to improve the
intrinsic paralelism in applications.

File:
1 edited

Legend:

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

    r566 r637  
    22 * sys_trace.c - activate / desactivate the context switches trace for a given core
    33 *
    4  * Author    Alain Greiner (c) (2016,2017,2018)
     4 * Author    Alain Greiner (c) (2016,2017,2018,2019)
    55 *
    66 * Copyright (c) UPMC Sorbonne Universites
     
    4040    process_t * process = this->process;
    4141
     42#if (DEBUG_SYS_TRACE || CONFIG_INSTRUMENTATION_SYSCALLS)
     43uint64_t     tm_start = hal_get_cycles();
     44#endif
     45
    4246#if DEBUG_SYS_TRACE
    43 uint64_t    tm_start;
    44 uint64_t    tm_end;
    45 tm_start = hal_get_cycles();
    4647if( DEBUG_SYS_TRACE < tm_start )
    47 printk("\n[DBG] %s : thread %d enter / process %x / cycle = %d\n",
    48 __FUNCTION__, this, this->process->pid, (uint32_t)tm_start );
     48printk("\n[%s] thread[%x,%x] enters / cycle = %d\n",
     49__FUNCTION__, this->process->pid, this->trdid, (uint32_t)tm_start );
    4950#endif
    5051
    5152    // check cluster identifier
    52     if( cluster_is_undefined( cxy ) )
     53    if( cluster_is_active( cxy ) == false )
    5354    {
    5455
     
    8586    hal_fence();
    8687
    87 #if DEBUG_SYS_TRACE
    88 tm_end = hal_get_cycles();
    89 if( DEBUG_SYS_TRACE < tm_end )
    90 printk("\n[DBG] %s : thread %x exit / process %x / cost = %d / cycle %d\n",
    91 __FUNCTION__, this, this->process->pid, (uint32_t)(tm_end - tm_start) , (uint32_t)tm_end );
     88#if (DEBUG_SYS_TRACE || CONFIG_INSTRUMENTATION_SYSCALLS)
     89uint64_t     tm_end = hal_get_cycles();
    9290#endif
    9391
     92#if DEBUG_SYS_TRACE
     93if( DEBUG_SYS_TRACE < tm_end )
     94printk("\n[%s] thread[%x,%x] exit / cycle %d\n",
     95__FUNCTION__, this->process->pid, this->trdid, (uint32_t)tm_end );
     96#endif
     97
     98#if CONFIG_INSTRUMENTATION_SYSCALLS
     99hal_atomic_add( &syscalls_cumul_cost[SYS_TRACE] , tm_end - tm_start );
     100hal_atomic_add( &syscalls_occurences[SYS_TRACE] , 1 );
     101#endif
    94102    return 0;
    95103
Note: See TracChangeset for help on using the changeset viewer.