[PATCH] Event Recording trace generation example
Ravindra Meena
rmeena840 at gmail.com
Thu Jun 13 15:55:03 UTC 2019
---
user/tracing/eventrecording.rst | 72 ++++++++++++++++++++++++++++++++++++++++-
1 file changed, 71 insertions(+), 1 deletion(-)
diff --git a/user/tracing/eventrecording.rst b/user/tracing/eventrecording.rst
index 09dc68b..554e5bc 100644
--- a/user/tracing/eventrecording.rst
+++ b/user/tracing/eventrecording.rst
@@ -78,6 +78,9 @@ IRQ Table etc.), Linux Kernel(Control Flow, Resources etc.)
Advanced support for Trace Compass includes dynamic memory traces, stack usage,
network packet flow, etc.
+Currently the event recording infrastructure lacks the generation of trace
+data in CTF format.
+
This scheme of tracing goes through the flow of events described in a subsequent
flowchart. This requires the environment setup of
`rtems-libbsd <https://github.com/RTEMS/rtems-libbsd>`_ and
@@ -100,4 +103,71 @@ and write CTF. The converted CTF ca be passed to any of these softwares.
.. figure:: ../../images/user/event-recording-trace.png
:align: center
- :width: 75%
\ No newline at end of file
+ :width: 75%
+
+RTEMS Trace Item Generation Example
+===================================
+
+Step 1: Clone the repositories
+`rtems-libbsd <https://github.com/rmeena840/rtems-libbsd/tree/ravindra-rtems>`_
+and
+`rtems-tools <https://github.com/rmeena840/rtems-tools/tree/ravindra-rtems>`_.
+
+Step 2: The Qemu command line varies by board support package, here is an
+example for the arm/xilinx_zynq_a9_qemu BSP:
+
+.. code-block:: none
+
+ cd rtems-libbsd
+
+ qemu-system-arm -serial null -serial mon:stdio -nographic \
+ -M xilinx-zynq-a9 -m 256M \
+ -net tap,ifname=qtap,script=no,downscript=no \
+ -net nic,model=cadence_gem,macaddr=0e:b0:ba:5e:ba:12 \
+ -kernel build/arm-rtems5-xilinx_zynq_a9_qemu-default/media01.exe
+
+Step 3: This requires to TAP virtual Ethernet interface for this:
+
+.. code-block:: none
+
+ sudo tunctl -p -t qtap -u $(whoami)
+ sudo ip link set dev qtap up
+ sudo ip addr add 169.254.1.1/16 dev qtap
+
+After some seconds it will acquire a IPv4 link-local address, e.g.
+
+.. code-block:: none
+
+ info: cgem0: probing for an IPv4LL address
+ debug: cgem0: checking for 169.254.XXX.XXX
+
+Use telnet command to connect host to target.
+
+.. code-block:: none
+
+ telnet 169.254.XXX.XXX
+
+Step 4: After successfully connected to the target, we can get event records
+item from QEMU target text format by using the following commands:
+
+.. code-block:: none
+
+ cd rtems-tools
+ ./build/misc/rtems-record -H 169.254.XXX.XXX -p 1234 | head
+
+The received trace generated on host will look like this:
+
+.. code-block:: none
+
+ 0.003629099:0:THREAD_SWITCH_OUT:9010001
+ 0.003629099:0:THREAD_STACK_CURRENT:e68
+ 0.003629099:0:THREAD_SWITCH_IN:a010005
+ 0.003847169:0:THREAD_SWITCH_OUT:a010005
+ 0.003847169:0:THREAD_STACK_CURRENT:7ea8
+ 0.003847169:0:THREAD_SWITCH_IN:9010001
+ 0.004627569:0:THREAD_SWITCH_OUT:9010001
+ 0.004627569:0:THREAD_STACK_CURRENT:e68
+ 0.004627569:0:THREAD_SWITCH_IN:a010005
+ 0.004912869:0:THREAD_SWITCH_OUT:a010005
+
+The received event records items is not in CTF format.
--
2.7.4
More information about the devel
mailing list