Re: what does it mean about "syscall_entry" and "syscall_exit"?

Mathieu Desnoyers <[email protected]>
Newsgroups gmane.linux.kernel.tracing
Message-ID <20070712121354.GA21341@Krystal>
* yuanbor ([email protected]) wrote:
> 
>    hello everybody,I got the following programme's trace
> 
> 
> 
>    -----------
> 
>    #include <unistd.h>
> 
>    int main(int argc,char **argv)
>    {
>            getegid();
> 
>            return 0;
>    }
> 
>    -----------
> 
> 
> 
>    what disturb me most is that what is the exact time of "getegid()"
>    system call.Here is some trace:
> 
>    -----------
> 
>    kernel_arch.syscall_entry: 427.104490968
>    (/home/yuanbor/trace/syscall/1184273693/cpu_0), 2785, 2785, ./syscall,
>    UNBRANDED, 2738, 0x0, SYSCALL { getegid32, -7152 }
>    locking.hardirqs_off: 427.104491442
>    (/home/yuanbor/trace/syscall/1184273693/cpu_0), 2785, 2785, ./syscall,
>    UNBRANDED, 2738, 0x0, SYSCALL { 3222293953 }
>    locking.hardirqs_on: 427.104491720
>    (/home/yuanbor/trace/syscall/1184273693/cpu_0), 2785, 2785, ./syscall,
>    UNBRANDED, 2738, 0x0, SYSCALL { 3222294237 }
>    kernel_arch.syscall_exit: 427.104492027
>    (/home/yuanbor/trace/syscall/1184273693/cpu_0), 2785, 2785, ./syscall,
>    UNBRANDED, 2738, 0x0, USER_MODE
>    locking.hardirqs_on: 427.104492262
>    (/home/yuanbor/trace/syscall/1184273693/cpu_0), 2785, 2785, ./syscall,
>    UNBRANDED, 2738, 0x0, USER_MODE { 3222294012 }
>    -----------
> 
> 
> 
>    Can I get the exact time of "getegid()" system call by (427.104492027
>    - 427.104490968)?
> 
>    If I can't, what's the way to get it?

It depends on what you are looking for, but generally, yes. Do
syscall_exit - syscall_entry to get the elapsed time in system call
state. You may also do the same, but deduct any IRQ handler nesting over
the system call, to get the syscall CPU time.

Mathieu

> 
>    Thank you for any info.

> _______________________________________________
> Ltt-dev mailing list
> [email protected]
> http://listserv.shafik.org/mailman/listinfo/ltt-dev


-- 
Mathieu Desnoyers
Computer Engineering Ph.D. Student, Ecole Polytechnique de Montreal
OpenPGP key fingerprint: 8CD5 52C3 8E3C 4140 715F  BA06 3F25 A8FE 3BAE 9A68
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.