[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL 12/65] slirp: add tftp tracing
From: |
Samuel Thibault |
Subject: |
[Qemu-devel] [PULL 12/65] slirp: add tftp tracing |
Date: |
Mon, 14 Jan 2019 01:02:33 +0100 |
From: Gerd Hoffmann <address@hidden>
Useful when debugging pxeboot, to see what the guest tries to do.
Signed-off-by: Gerd Hoffmann <address@hidden>
Reviewed-by: Liam Merwick <address@hidden>
Reviewed-by: Philippe Mathieu-Daudé <address@hidden>
Tested-by: Philippe Mathieu-Daudé <address@hidden>
Signed-off-by: Samuel Thibault <address@hidden>
---
Makefile.objs | 1 +
slirp/tftp.c | 3 +++
slirp/trace-events | 5 +++++
3 files changed, 9 insertions(+)
create mode 100644 slirp/trace-events
diff --git a/Makefile.objs b/Makefile.objs
index 456115992a..2121120492 100644
--- a/Makefile.objs
+++ b/Makefile.objs
@@ -193,6 +193,7 @@ trace-events-subdirs += net
trace-events-subdirs += qapi
trace-events-subdirs += qom
trace-events-subdirs += scsi
+trace-events-subdirs += slirp
trace-events-subdirs += target/arm
trace-events-subdirs += target/i386
trace-events-subdirs += target/mips
diff --git a/slirp/tftp.c b/slirp/tftp.c
index a9bc4bb1b6..735b57aa55 100644
--- a/slirp/tftp.c
+++ b/slirp/tftp.c
@@ -26,6 +26,7 @@
#include "slirp.h"
#include "qemu-common.h"
#include "qemu/cutils.h"
+#include "trace.h"
static inline int tftp_session_in_use(struct tftp_session *spt)
{
@@ -204,6 +205,7 @@ static void tftp_send_error(struct tftp_session *spt,
struct mbuf *m;
struct tftp_t *tp;
+ trace_slirp_tftp_error(msg);
m = m_get(spt->slirp);
if (!m) {
@@ -323,6 +325,7 @@ static void tftp_handle_rrq(Slirp *slirp, struct
sockaddr_storage *srcsas,
break;
}
}
+ trace_slirp_tftp_rrq(req_fname);
/* check mode */
if ((pktlen - k) < 6) {
diff --git a/slirp/trace-events b/slirp/trace-events
new file mode 100644
index 0000000000..ff8f656e8c
--- /dev/null
+++ b/slirp/trace-events
@@ -0,0 +1,5 @@
+# See docs/devel/tracing.txt for syntax documentation.
+
+# slirp/tftp.c
+slirp_tftp_rrq(const char *file) "file: %s"
+slirp_tftp_error(const char *file) "msg: %s"
--
2.20.1
- [Qemu-devel] [PULL 17/65] slirp: remove FULL_BOLT, (continued)
- [Qemu-devel] [PULL 17/65] slirp: remove FULL_BOLT, Samuel Thibault, 2019/01/13
- [Qemu-devel] [PULL 21/65] slirp: remove NO_UNIX_SOCKETS, Samuel Thibault, 2019/01/13
- [Qemu-devel] [PULL 18/65] slirp: remove the disabled readv()/writev() code path, Samuel Thibault, 2019/01/13
- [Qemu-devel] [PULL 01/65] slirp: associate slirp_output callback with the Slirp context, Samuel Thibault, 2019/01/13
- [Qemu-devel] [PULL 02/65] slirp: remove do_pty from fork_exec(), Samuel Thibault, 2019/01/13
- [Qemu-devel] [PULL 07/65] slirp: move internal function declarations, Samuel Thibault, 2019/01/13
- [Qemu-devel] [PULL 09/65] slirp: fix slirp_add_exec() leaks, Samuel Thibault, 2019/01/13
- [Qemu-devel] [PULL 05/65] slirp: remove unused EMU_RSH, Samuel Thibault, 2019/01/13
- [Qemu-devel] [PULL 11/65] slirp: remove dead declarations, Samuel Thibault, 2019/01/13
- [Qemu-devel] [PULL 14/65] slirp: remove unused M_TRAILINGSPACE, Samuel Thibault, 2019/01/13
- [Qemu-devel] [PULL 12/65] slirp: add tftp tracing,
Samuel Thibault <=
- [Qemu-devel] [PULL 15/65] slirp: use a callback structure to interface with qemu, Samuel Thibault, 2019/01/13
- [Qemu-devel] [PULL 24/65] slirp: remove unused HAVE_SYS_WAIT_H, Samuel Thibault, 2019/01/13
- [Qemu-devel] [PULL 22/65] slirp: remove unused HAVE_SYS_STROPTS_H, Samuel Thibault, 2019/01/13
- [Qemu-devel] [PULL 32/65] slirp: replace compile time DO_KEEPALIVE, Samuel Thibault, 2019/01/13
- [Qemu-devel] [PULL 08/65] slirp: remove Monitor dependency, return a string for info, Samuel Thibault, 2019/01/13
- [Qemu-devel] [PULL 04/65] slirp: use a dedicated field for chardev pointer, Samuel Thibault, 2019/01/13
- [Qemu-devel] [PULL 13/65] slirp: move socket pair creation in helper function, Samuel Thibault, 2019/01/13
- [Qemu-devel] [PULL 27/65] slirp: remove HAVE_SYS_FILIO_H, Samuel Thibault, 2019/01/13
- [Qemu-devel] [PULL 28/65] slirp: remove unused DECLARE_IOVEC, Samuel Thibault, 2019/01/13
- [Qemu-devel] [PULL 30/65] slirp: replace HOST_WORDS_BIGENDIAN with glib equivalent, Samuel Thibault, 2019/01/13