Ignore:
Timestamp:
Jan 4, 2018, 10:05:47 AM (4 years ago)
Author:
alain
Message:

Improve sys_exec.

File:
1 edited

Legend:

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

    r408 r416  
    160160// and this sys_exec() function uses a RPC to access the owner cluster if required.
    161161//
    162 // TODO : the args & envs arguments are not supported yet : both must be NULL
     162// TODO : the args & envs arguments are not supported yet : both must be NULL  [AG]
    163163/////////////////////////////////////////////////////////////////////////////////////////
    164164int sys_exec( char  * pathname,     // .elf file pathname
     
    169169    error_t       error;
    170170
    171         uint64_t      tm_start;
    172         uint64_t      tm_end;
    173 
    174         tm_start = hal_get_cycles();
    175 
    176171    // get parent process pid
    177172    thread_t   * this    = CURRENT_THREAD;
     
    179174    pid_t        pid     = process->pid;
    180175
    181 exec_dmsg("\n[DBG] %s : core[%x,%d] enters for process %x / cycle %d\n",
    182 __FUNCTION__, local_cxy, this->core->lid, pid, (uint32_t)hal_get_cycles() );
     176#if CONFIG_SYSCALL_DEBUG
     177uint64_t      tm_start;
     178uint64_t      tm_end;
     179tm_start = hal_get_cycles();
     180printk("\n[DBG] %s : core[%x,%d] enter / process %x / path = %s / cycle = %d\n",
     181__FUNCTION__, local_cxy, this->core->lid, pid, exec_info.path, (uint32_t)tm_start );
     182#endif
    183183
    184184    // get owner cluster
     
    249249    }
    250250
    251     tm_end = hal_get_cycles();
    252 
    253 exec_dmsg("\n[DBG] %s : core[%x,%d] exit for process %x / cycle %d\n"
    254 "     pathname = %s / cost = %d\n",
    255 __FUNCTION__, local_cxy, this->core->lid, pid, (uint32_t)tm_start,
    256 exec_info.path , (uint32_t)(tm_end - tm_start) );
     251#if CONFIG_SYSCALL_DEBUG
     252tm_end = hal_get_cycles();
     253printk("\n[DBG] %s : core[%x,%d] exit / process %x / path = %s / cost = %d\n",
     254__FUNCTION__, local_cxy, this->core->lid, pid, exec_info.path, (uint32_t)(tm_end - tm_start) );
     255#endif
    257256
    258257    return 0;
Note: See TracChangeset for help on using the changeset viewer.