From a04fac976f02377237bb827d46854b669ebc2397 Mon Sep 17 00:00:00 2001 From: Brandon Potter Date: Thu, 17 Mar 2016 10:24:17 -0700 Subject: syscall_emul: extend mmap system call to support file backed mmaps For O3, which has a stat that counts reg reads, there is an additional reg read per mmap() call since there's an arg we no longer ignore. Otherwise, stats should not be affected. --- src/sim/syscall_emul.cc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/sim/syscall_emul.cc') diff --git a/src/sim/syscall_emul.cc b/src/sim/syscall_emul.cc index 517580d79..392658c5a 100644 --- a/src/sim/syscall_emul.cc +++ b/src/sim/syscall_emul.cc @@ -324,7 +324,9 @@ _llseekFunc(SyscallDesc *desc, int num, LiveProcess *p, ThreadContext *tc) SyscallReturn munmapFunc(SyscallDesc *desc, int num, LiveProcess *p, ThreadContext *tc) { - // given that we don't really implement mmap, munmap is really easy + // With mmap more fully implemented, it might be worthwhile to bite + // the bullet and implement munmap. Should allow us to reuse simulated + // memory. return 0; } -- cgit v1.2.3