* [Qemu-devel] [PATCH] slirp: add tftp tracing
@ 2018-11-13 7:03 Gerd Hoffmann
2018-11-13 7:44 ` Liam Merwick
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Gerd Hoffmann @ 2018-11-13 7:03 UTC (permalink / raw)
To: qemu-devel; +Cc: Jan Kiszka, Samuel Thibault, Gerd Hoffmann
Useful when debugging pxeboot, to see what the guest tries to do.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
---
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 1e1ff387d7..31852eaf8f 100644
--- a/Makefile.objs
+++ b/Makefile.objs
@@ -251,6 +251,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.9.3
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [Qemu-devel] [PATCH] slirp: add tftp tracing
2018-11-13 7:03 [Qemu-devel] [PATCH] slirp: add tftp tracing Gerd Hoffmann
@ 2018-11-13 7:44 ` Liam Merwick
2018-11-13 12:38 ` Philippe Mathieu-Daudé
2018-11-14 0:42 ` Samuel Thibault
2 siblings, 0 replies; 4+ messages in thread
From: Liam Merwick @ 2018-11-13 7:44 UTC (permalink / raw)
To: qemu-devel
On 13/11/2018 07:03, Gerd Hoffmann wrote:
> Useful when debugging pxeboot, to see what the guest tries to do.
>
> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Reviewed-by: Liam Merwick <liam.merwick@oracle.com>
> ---
> 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 1e1ff387d7..31852eaf8f 100644
> --- a/Makefile.objs
> +++ b/Makefile.objs
> @@ -251,6 +251,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"
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [Qemu-devel] [PATCH] slirp: add tftp tracing
2018-11-13 7:03 [Qemu-devel] [PATCH] slirp: add tftp tracing Gerd Hoffmann
2018-11-13 7:44 ` Liam Merwick
@ 2018-11-13 12:38 ` Philippe Mathieu-Daudé
2018-11-14 0:42 ` Samuel Thibault
2 siblings, 0 replies; 4+ messages in thread
From: Philippe Mathieu-Daudé @ 2018-11-13 12:38 UTC (permalink / raw)
To: Gerd Hoffmann, qemu-devel; +Cc: Jan Kiszka, Samuel Thibault
On 13/11/18 8:03, Gerd Hoffmann wrote:
> Useful when debugging pxeboot, to see what the guest tries to do.
Good idea!
>
> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Tested-by: Philippe Mathieu-Daudé <philmd@redhat.com>
> ---
> 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 1e1ff387d7..31852eaf8f 100644
> --- a/Makefile.objs
> +++ b/Makefile.objs
> @@ -251,6 +251,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"
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [Qemu-devel] [PATCH] slirp: add tftp tracing
2018-11-13 7:03 [Qemu-devel] [PATCH] slirp: add tftp tracing Gerd Hoffmann
2018-11-13 7:44 ` Liam Merwick
2018-11-13 12:38 ` Philippe Mathieu-Daudé
@ 2018-11-14 0:42 ` Samuel Thibault
2 siblings, 0 replies; 4+ messages in thread
From: Samuel Thibault @ 2018-11-14 0:42 UTC (permalink / raw)
To: Gerd Hoffmann; +Cc: qemu-devel, Jan Kiszka
Gerd Hoffmann, le mar. 13 nov. 2018 08:03:20 +0100, a ecrit:
> Useful when debugging pxeboot, to see what the guest tries to do.
Applied to my tree, thanks!
Samuel
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2018-11-14 0:42 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-11-13 7:03 [Qemu-devel] [PATCH] slirp: add tftp tracing Gerd Hoffmann
2018-11-13 7:44 ` Liam Merwick
2018-11-13 12:38 ` Philippe Mathieu-Daudé
2018-11-14 0:42 ` Samuel Thibault
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.