qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [Please discard the previous mail] System call from a


From: Mulyadi Santosa
Subject: Re: [Qemu-devel] [Please discard the previous mail] System call from a Guest Linux
Date: Thu, 4 Feb 2010 02:25:43 +0700

Hi Jong

(Sorry, I am not sure how to politely call a Korean name...so
apologize if it turns out to be rude...)

On Thu, Feb 4, 2010 at 1:08 AM, Jong Chun Park <address@hidden> wrote:
> after compilation in the guest OS:
> int main() {
>    int fd;
>    if (access("hello.txt", R_OK) != 0) {
>      exit(0);
>    }
>    fd=open("hello.txt", O_RDONLY);
>    close(fd);
>    return 0;
> }
>
> For this simple sequence of system calls, acess() -> open() -> close(), QEMU
> goes through disas_insn() and helper_sysenter() more than 3 times. This
> makes me really confused because I believed those should be called 3 times,
> though. It'd be greatly appreciated in advance if someone helps me out this.
> Thanks a lot,
> Jong

Try to run that compile and run that code under strace (without using
Qemu, I mean), then you'll understand how many system calls are
executed.

clues: opening certain libraries, doing mmap() s and so on

-- 
regards,

Mulyadi Santosa
Freelance Linux trainer and consultant

blog: the-hydra.blogspot.com
training: mulyaditraining.blogspot.com




reply via email to

[Prev in Thread] Current Thread [Next in Thread]