aboutsummaryrefslogtreecommitdiff
path: root/linux-user/mmap.c
diff options
context:
space:
mode:
authorAlex Bennée <alex.bennee@linaro.org>2019-12-05 12:25:15 +0000
committerAlex Bennée <alex.bennee@linaro.org>2019-12-19 08:20:16 +0000
commit10d0d505de750590c21a78c0652bf5a9c142302a (patch)
tree3b1038de85afaa311646fcd2f1cba666db4d22f1 /linux-user/mmap.c
parentd0e165ae2bdf107f3c63bf11138097869d91ef2e (diff)
downloadqemu-10d0d505de750590c21a78c0652bf5a9c142302a.zip
qemu-10d0d505de750590c21a78c0652bf5a9c142302a.tar.gz
qemu-10d0d505de750590c21a78c0652bf5a9c142302a.tar.bz2
linux-user: log page table changes under -d page
The CPU_LOG_PAGE flag is woefully underused and could stand to do extra duty tracking page changes. If the user doesn't want to see the details as things change they still have the tracepoints available. We push the locking into log_page_dump and pass a reason for the banner text. Signed-off-by: Alex Bennée <alex.bennee@linaro.org> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Reviewed-by: Laurent Vivier <laurent@vivier.eu> Message-Id: <20191205122518.10010-5-alex.bennee@linaro.org>
Diffstat (limited to 'linux-user/mmap.c')
-rw-r--r--linux-user/mmap.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/linux-user/mmap.c b/linux-user/mmap.c
index 0b1b43a..3d90fa4 100644
--- a/linux-user/mmap.c
+++ b/linux-user/mmap.c
@@ -18,6 +18,7 @@
*/
#include "qemu/osdep.h"
#include "trace.h"
+#include "exec/log.h"
#include "qemu.h"
//#define DEBUG_MMAP
@@ -539,10 +540,9 @@ abi_long target_mmap(abi_ulong start, abi_ulong len, int prot,
page_set_flags(start, start + len, prot | PAGE_VALID);
the_end:
trace_target_mmap_complete(start);
-#ifdef DEBUG_MMAP
- page_dump(stdout);
- printf("\n");
-#endif
+ if (qemu_loglevel_mask(CPU_LOG_PAGE)) {
+ log_page_dump(__func__);
+ }
tb_invalidate_phys_range(start, start + len);
mmap_unlock();
return start;