[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 20/39] util/log: Drop call to setvbuf
From: |
Richard Henderson |
Subject: |
[PULL 20/39] util/log: Drop call to setvbuf |
Date: |
Wed, 20 Apr 2022 11:05:59 -0700 |
Now that the log buffer is flushed after every qemu_log_unlock,
which includes every call to qemu_log, we do not need to force
line buffering (or unbuffering for windows). Block buffer the
entire loggable unit.
Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20220417183019.755276-21-richard.henderson@linaro.org>
---
util/log.c | 6 ------
1 file changed, 6 deletions(-)
diff --git a/util/log.c b/util/log.c
index cab0642a7f..caa38e707b 100644
--- a/util/log.c
+++ b/util/log.c
@@ -136,12 +136,6 @@ bool qemu_set_log(int log_flags, Error **errp)
logfile->fd = stderr;
}
-#if defined(_WIN32)
- /* Win32 doesn't support line-buffering, so use unbuffered output. */
- setvbuf(logfile->fd, NULL, _IONBF, 0);
-#else
- setvbuf(logfile->fd, NULL, _IOLBF, 0);
-#endif
log_append = 1;
qatomic_rcu_set(&qemu_logfile, logfile);
}
--
2.34.1
- [PULL 13/39] exec/log: Remove log_disas and log_target_disas, (continued)
- [PULL 13/39] exec/log: Remove log_disas and log_target_disas, Richard Henderson, 2022/04/20
- [PULL 12/39] exec/translator: Pass the locked filepointer to disas_log hook, Richard Henderson, 2022/04/20
- [PULL 06/39] util/log: Move qemu_log_lock, qemu_log_unlock out of line, Richard Henderson, 2022/04/20
- [PULL 10/39] util/log: Remove qemu_log_vprintf, Richard Henderson, 2022/04/20
- [PULL 11/39] tcg: Pass the locked filepointer to tcg_dump_ops, Richard Henderson, 2022/04/20
- [PULL 14/39] accel/tcg: Use cpu_dump_state between qemu_log_trylock/unlock, Richard Henderson, 2022/04/20
- [PULL 15/39] target/nios2: Remove log_cpu_state from reset, Richard Henderson, 2022/04/20
- [PULL 16/39] util/log: Use qemu_log_trylock/unlock in qemu_log, Richard Henderson, 2022/04/20
- [PULL 19/39] util/log: Remove qemu_log_flush, Richard Henderson, 2022/04/20
- [PULL 18/39] util/log: Mark qemu_log_trylock as G_GNUC_WARN_UNUSED_RESULT, Richard Henderson, 2022/04/20
- [PULL 20/39] util/log: Drop call to setvbuf,
Richard Henderson <=
- [PULL 17/39] util/log: Drop return value from qemu_log, Richard Henderson, 2022/04/20
- [PULL 24/39] include/exec/log: Do not reference QemuLogFile directly, Richard Henderson, 2022/04/20
- [PULL 23/39] tests/unit: Do not reference QemuLogFile directly, Richard Henderson, 2022/04/20
- [PULL 21/39] bsd-user: Expand log_page_dump inline, Richard Henderson, 2022/04/20
- [PULL 25/39] include/qemu/log: Move entire implementation out-of-line, Richard Henderson, 2022/04/20
- [PULL 22/39] linux-user: Expand log_page_dump inline, Richard Henderson, 2022/04/20
- [PULL 27/39] util/log: Introduce qemu_set_log_filename_flags, Richard Henderson, 2022/04/20
- [PULL 26/39] sysemu/os-win32: Test for and use _lock_file/_unlock_file, Richard Henderson, 2022/04/20
- [PULL 29/39] linux-user: Use qemu_set_log_filename_flags, Richard Henderson, 2022/04/20
- [PULL 30/39] softmmu: Use qemu_set_log_filename_flags, Richard Henderson, 2022/04/20