mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-02 07:13:54 -06:00
linux-user: Expand log_page_dump inline
We have extra stuff to log at the same time. Hoist the qemu_log_lock/unlock to the caller and use fprintf. Reviewed-by: Alex Bennée <alex.bennee@linaro.org> Signed-off-by: Richard Henderson <richard.henderson@linaro.org> Message-Id: <20220417183019.755276-23-richard.henderson@linaro.org>
This commit is contained in:
parent
43b761618d
commit
93756fdcf6
3 changed files with 35 additions and 30 deletions
|
@ -42,19 +42,4 @@ static inline void log_cpu_state_mask(int mask, CPUState *cpu, int flags)
|
|||
}
|
||||
}
|
||||
|
||||
#ifdef NEED_CPU_H
|
||||
#if defined(CONFIG_USER_ONLY)
|
||||
/* page_dump() output to the log file: */
|
||||
static inline void log_page_dump(const char *operation)
|
||||
{
|
||||
FILE *logfile = qemu_log_trylock();
|
||||
if (logfile) {
|
||||
fprintf(logfile, "page layout changed following %s\n", operation);
|
||||
page_dump(logfile);
|
||||
}
|
||||
qemu_log_unlock(logfile);
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue