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 <jou...@gmail.com> 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