mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-02 23:33:54 -06:00
linux-user: convert target_mmap debug to tracepoint
It is a pain to re-compile when you need to debug and tracepoints are a fairly low impact way to instrument QEMU. 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-3-alex.bennee@linaro.org>
This commit is contained in:
parent
11d9605623
commit
5a67bb96b0
2 changed files with 2 additions and 26 deletions
|
@ -363,32 +363,7 @@ abi_long target_mmap(abi_ulong start, abi_ulong len, int prot,
|
|||
abi_ulong ret, end, real_start, real_end, retaddr, host_offset, host_len;
|
||||
|
||||
mmap_lock();
|
||||
#ifdef DEBUG_MMAP
|
||||
{
|
||||
printf("mmap: start=0x" TARGET_ABI_FMT_lx
|
||||
" len=0x" TARGET_ABI_FMT_lx " prot=%c%c%c flags=",
|
||||
start, len,
|
||||
prot & PROT_READ ? 'r' : '-',
|
||||
prot & PROT_WRITE ? 'w' : '-',
|
||||
prot & PROT_EXEC ? 'x' : '-');
|
||||
if (flags & MAP_FIXED)
|
||||
printf("MAP_FIXED ");
|
||||
if (flags & MAP_ANONYMOUS)
|
||||
printf("MAP_ANON ");
|
||||
switch(flags & MAP_TYPE) {
|
||||
case MAP_PRIVATE:
|
||||
printf("MAP_PRIVATE ");
|
||||
break;
|
||||
case MAP_SHARED:
|
||||
printf("MAP_SHARED ");
|
||||
break;
|
||||
default:
|
||||
printf("[MAP_TYPE=0x%x] ", flags & MAP_TYPE);
|
||||
break;
|
||||
}
|
||||
printf("fd=%d offset=" TARGET_ABI_FMT_lx "\n", fd, offset);
|
||||
}
|
||||
#endif
|
||||
trace_target_mmap(start, len, prot, flags, fd, offset);
|
||||
|
||||
if (!len) {
|
||||
errno = EINVAL;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue