This is the mail archive of the
systemtap@sourceware.org
mailing list for the systemtap project.
[PATCH 4/6] New Infiniband (OFED) tapset - example
- From: "David J. Wilder" <dwilder at us dot ibm dot com>
- To: systemtap at sourceware dot org, xma at us dot ibm dot com, pradeep at us dot ibm dot com, prasad at linux dot vnet dot ibm dot com
- Date: Thu, 05 Feb 2009 16:29:24 -0800
- Subject: [PATCH 4/6] New Infiniband (OFED) tapset - example
This patch adds an example tapscript utilizing the ofed tapsets.
Signed-off-by: David Wilder <dwilder@us.ibm.com>
------------------------------------------------------
testsuite/systemtap.examples/ofed/ipoib-trace.meta | 37 +++++++++++++
testsuite/systemtap.examples/ofed/ipoib-trace.stp | 58 ++++++++++++++++++++
testsuite/systemtap.examples/ofed/ipoib-trace.txt | 31 +++++++++++
3 files changed, 126 insertions(+), 0 deletions(-)
diff --git a/testsuite/systemtap.examples/ofed/ipoib-trace.meta b/testsuite/systemtap.examples/ofed/ipoib-trace.meta
new file mode 100644
index 0000000..24697ea
--- /dev/null
+++ b/testsuite/systemtap.examples/ofed/ipoib-trace.meta
@@ -0,0 +1,37 @@
+title: Ofed IP over infiniband tracer
+name: ipoib-trace.stp
+version: 1.0
+author: David J. Wilder <dwilder@ibm.com>
+requires: Several structure definitions are needed that are found
+in .../drivers/infiniband/ulp/ipoib/ipoib.h. If ipoib.h is located
+at /usr/src/linux/drivers/infiniband/ulp/ipoib/ipoib.h it will
+automatically be found. Otherwise you will need to specify
+the location of the include file in this tap script, for example:
+
+%{
+#include "path-to-ipobi.h"
+%}
+
+Or, You may use one the predefined search paths defined in
+/usr/local/systemtap/tapset/ofed_ipoib.stp by adding
+the appropriate #define to this script..
+
+Example:
+
+%{
+#define SLES_OFED_1_3
+%}
+
+If you add any of the above examples to the script
+it will be necessary to execute stap in guru mode (stap -g ).
+
+The following kernel modules must be present and loaded:
+ib_ipoib, ib_umad, ib_cm, ib_sa, ib_mad, ib_core, one or more hca drivers.
+
+keywords: ofed ipoib
+subsystem: ofed infiniband stack
+status: production
+exit: user-controlled
+output: ASCII trace
+description: The script produces a function trace of the ofed ip over ib module.
+test_check: stap -p4 ipoib-trace.stp
diff --git a/testsuite/systemtap.examples/ofed/ipoib-trace.stp b/testsuite/systemtap.examples/ofed/ipoib-trace.stp
new file mode 100644
index 0000000..3c8acdc
--- /dev/null
+++ b/testsuite/systemtap.examples/ofed/ipoib-trace.stp
@@ -0,0 +1,58 @@
+#! /usr/bin/env stap
+/*
+ * ipoib-trace.stp
+ * Copyright (C) 2009 IBM Corp.
+ *
+ * This file is part of systemtap, and is free software. You can
+ * redistribute it and/or modify it under the terms of the GNU General
+ * Public License (GPL); either version 2, or (at your option) any
+ * later version.
+ *
+ * Version 1.0: wilder@us.ibm.com 2009/01/30
+ * -----------------------------------------------------------------
+ *
+ * This script produces a function trace of the the ofed
+ * ip over ib module. For this script to produce any output
+ * your system must have infiniband hardware (HCA) installed,
+ * the ib_ipoib kernel modules must be loaded and one or more
+ * ipoib interfaces must be configured.
+ *
+ * Several structure definitions are needed that are found in
+ * .../drivers/infiniband/ulp/ipoib/ipoib.h. If ipoib.h is located
+ * at /usr/src/linux/drivers/infiniband/ulp/ipoib/ipoib.h it will
+ * automatically be found. Otherwise you will need to specify
+ * the location of the include file in this tap script, for example:
+ *
+ * %{
+ * #include "path-to-ipobi.h"
+ * %}
+ *
+ * Or, You may use one the predefined search paths defined in
+ * /usr/local/systemtap/tapset/ofed_ipoib.stp by adding
+ * the appropriate #define to this script.
+ *
+ * Examples:
+ *
+ * %{
+ * #define SLES_OFED_1_3
+ * %}
+ *
+ * If you add any of the above examples to the script
+ * it will be necessary to execute stap in guru mode (stap -g ).
+ *
+ */
+
+probe begin
+{
+printf("Ready...\n")
+ib_dprint_on()
+}
+
+# Enable all the ib_ipoib.UD probes
+probe ib_ipoib.UD.*{}
+
+# Enable all the ib_ipoib CM probes
+probe ib_ipoib.CM.*{}
+
+# Enable all ib_cm probes
+probe ib_cm.*{}
diff --git a/testsuite/systemtap.examples/ofed/ipoib-trace.txt b/testsuite/systemtap.examples/ofed/ipoib-trace.txt
new file mode 100644
index 0000000..4024dab
--- /dev/null
+++ b/testsuite/systemtap.examples/ofed/ipoib-trace.txt
@@ -0,0 +1,31 @@
+Ready.....
+ib_ehca.ehca_post_send(ipoib ud post send): ( ): 183(036)---> IB_WR_SEND:IB_SEND_SIGNALED
+ib_ipoib.ipoib_ib_handle_rx_wc(ud receive completion): (ib0): <--- 183(025) IB_WC_SUCCESS
+ib_ehca.ehca_post_recv(ipoib ud post recv): ( ): <--- 183(025)
+ib_ipoib.ipoib_ib_handle_rx_wc(ud receive completion): (ib0): <--- 183(026) IB_WC_SUCCESS
+ib_ehca.ehca_post_recv(ipoib ud post recv): ( ): <--- 183(026)
+ib_cm.ib_create_cm_id: CREATE_CM_ID (ehca0): cm_id=0xc0000000da9d4080
+ib_cm.ib_send_cm_req: SEND_REQ ( ): cm_id=0xc0000000da9d4080 qp_num=184
+ib_cm.cm_recv_handler: IB_CM_REP_RECEIVED ( ):
+ib_ipoib.ipoib_cm_tx_handler(TX connection event): ( ): IB_CM_REP_RECEIVED cm_id=0xc0000000da9d4080 state=IB_CM_REP_RCVD
+ib_ehca.ehca_post_send(ipoib cm post send): ( ): 184(000)---> IB_WR_SEND:IB_SEND_SIGNALED
+ib_cm.ib_send_cm_rtu: SEND_RTU ( ): cm_id=0xc0000000da9d4080 cm_state=IB_CM_REP_RCVD
+ib_cm.cm_send_handler: IB_WC_WR_FLUSH_ERR ( ): cm_id=0xc0000000da9d4080 cm_state=IB_CM_REQ_SENT
+ib_cm.cm_send_handler: IB_WC_SUCCESS ( ): cm_id=0xc0000000da9d4080
+ib_cm.cm_recv_handler: IB_CM_REQ_RECEIVED ( ):
+ib_cm.ib_create_cm_id: CREATE_CM_ID (ehca0): cm_id=0xc0000001beae2580
+ib_ipoib.ipoib_cm_rx_handler(RX connection event): ( ): IB_CM_REQ_RECEIVED cm_id=0xc0000001beae2580 state=IB_CM_REQ_RCVD
+ib_cm.ib_send_cm_rep: SEND_REP ( ): cm_id=0xc0000001beae2580 cm_state=IB_CM_REQ_RCVD qp_num=185
+ib_cm.cm_recv_handler: IB_CM_RTU_RECEIVED ( ):
+ib_ipoib.ipoib_cm_rx_handler(RX connection event): ( ): IB_CM_RTU_RECEIVED cm_id=0xc0000001beae2580 state=IB_CM_ESTABLISHED
+ib_cm.cm_send_handler: IB_WC_WR_FLUSH_ERR ( ): cm_id=0xc0000001beae2580 cm_state=IB_CM_REP_SENT
+ib_ipoib.ipoib_ib_handle_rx_wc(ud receive completion): (ib0): <--- 183(027) IB_WC_SUCCESS
+ib_ehca.ehca_post_send(ipoib ud post send): ( ): 183(037)---> IB_WR_SEND:IB_SEND_SIGNALED
+ib_ehca.ehca_post_recv(ipoib ud post recv): ( ): <--- 183(027)
+ib_cm.cm_recv_handler: IB_CM_DREQ_RECEIVED ( ):
+ib_ipoib.ipoib_cm_rx_handler(RX connection event): ( ): IB_CM_DREQ_RECEIVED cm_id=0xc0000001beae2580 state=IB_CM_DREQ_RCVD
+ib_cm.ib_send_cm_drep: SEND_DREP ( ): cm_id=0xc0000001beae2580 cm_state=IB_CM_DREQ_RCVD
+ib_ipoib.ipoib_cm_rx_event_handler(RX event): ( ): IB_EVENT_QP_FATAL cm_id=0xc0000001beae2580 state=IPOIB_CM_RX_LIVE
+ib_ipoib.ipoib_cm_rx_event_handler(RX event): ( ): IB_EVENT_QP_LAST_WQE_REACHED cm_id=0xc0000001beae2580 state=IPOIB_CM_RX_LIVE
+ib_cm.cm_send_handler: IB_WC_SUCCESS ( ): cm_id=0xc0000001beae2580
+ib_ipoib.ipoib_cm_rx_handler(RX connection event): ( ): IB_CM_TIMEWAIT_EXIT cm_id=0xc0000001beae2580 state=IB_CM_IDLE