Skip to contentSkip to conversation

ieee802154: Add trace events for rdev->ops

PATCH In review Guido Günther 2 participants 4 messages Apr 20, 2015 – Apr 25, 2015

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 ieee802154: Add trace events for rdev->ops

Enabling tracing via

echo 1 > /sys/kernel/debug/tracing/events/cfg802154/enable

enables event tracing like

iwpan dev wpan0 set pan_id 0xbeef
cat /sys/kernel/debug/tracing/trace
# tracer: nop
#
# entries-in-buffer/entries-written: 2/2 #P:1
#
# _-----=> irqs-off
# / _----=> need-resched

 #                            | / _---=> hardirq/softirq
 #                            || / _--=> preempt-depth
 #                            ||| /     delay
 #           TASK-PID   CPU#  ||||    TIMESTAMP  FUNCTION
 #              | |       |   ||||       |         |
            iwpan-2663  [000] ....   170.369142: 802154_rdev_set_pan_id: phy0, wpan_dev(1), pan id: 0xbeef
            iwpan-2663  [000] ....   170.369177: 802154_rdev_return_int: phy0, returned: 0

---
Changes from v1:
* delay __le16_to_cpu until we print the argument
* detail usage in ChangeLog

 net/ieee802154/Makefile   |   4 +-
 net/ieee802154/rdev-ops.h |  77 ++++++++++++---
 net/ieee802154/trace.c    |   7 ++
 net/ieee802154/trace.h    | 246 ++++++++++++++++++++++++++++++++++++++++++++++
 4 files changed, 322 insertions(+), 12 deletions(-)
 create mode 100644 net/ieee802154/trace.c
 create mode 100644 net/ieee802154/trace.h
net/ieee802154/Makefile +3 -1
index 05dab29..4adfd4d 100644
@@ -3,7 +3,9 @@ obj-$(CONFIG_IEEE802154_SOCKET) += ieee802154_socket.o
 obj-y += 6lowpan/
 
 ieee802154-y := netlink.o nl-mac.o nl-phy.o nl_policy.o core.o \
-                header_ops.o sysfs.o nl802154.o
+                header_ops.o sysfs.o nl802154.o trace.o
 ieee802154_socket-y := socket.o
 
+CFLAGS_trace.o := -I$(src)
+
 ccflags-y += -D__CHECK_ENDIAN__
net/ieee802154/rdev-ops.h +66 -11

145 lines not on this page · raw message

net/ieee802154/trace.c new file +7 -0
new file mode 100644
index 0000000..95f997f
@@ -0,0 +1,7 @@
+#include <linux/module.h>
+
+#ifndef __CHECKER__
+#define CREATE_TRACE_POINTS
+#include "trace.h"
+
+#endif
net/ieee802154/trace.h new file +246 -0

246 lines not on this page · raw message

Signature · 1 line
2.1.4
maintainer Acked-by on v2 1/1
#1 lore raw
Quoted 22 lines · Guido Günther

Enabling tracing via

echo 1 > /sys/kernel/debug/tracing/events/cfg802154/enable

enables event tracing like

iwpan dev wpan0 set pan_id 0xbeef
cat /sys/kernel/debug/tracing/trace
# tracer: nop
#
# entries-in-buffer/entries-written: 2/2 #P:1
#
# _-----=> irqs-off
# / _----=> need-resched

 #                            | / _---=> hardirq/softirq
 #                            || / _--=> preempt-depth
 #                            ||| /     delay
 #           TASK-PID   CPU#  ||||    TIMESTAMP  FUNCTION
 #              | |       |   ||||       |         |
            iwpan-2663  [000] ....   170.369142: 802154_rdev_set_pan_id: phy0, wpan_dev(1), pan id: 0xbeef
            iwpan-2663  [000] ....   170.369177: 802154_rdev_return_int: phy0, returned: 0
Quoted 1 line

- Alex

#2 lore raw

Hi,

Quoted 23 lines · Alexander Aring
Quoted 22 lines · Guido Günther

Enabling tracing via

echo 1 > /sys/kernel/debug/tracing/events/cfg802154/enable

enables event tracing like

iwpan dev wpan0 set pan_id 0xbeef
cat /sys/kernel/debug/tracing/trace
# tracer: nop
#
# entries-in-buffer/entries-written: 2/2 #P:1
#
# _-----=> irqs-off
# / _----=> need-resched

 #                            | / _---=> hardirq/softirq
 #                            || / _--=> preempt-depth
 #                            ||| /     delay
 #           TASK-PID   CPU#  ||||    TIMESTAMP  FUNCTION
 #              | |       |   ||||       |         |
            iwpan-2663  [000] ....   170.369142: 802154_rdev_set_pan_id: phy0, wpan_dev(1), pan id: 0xbeef
            iwpan-2663  [000] ....   170.369177: 802154_rdev_return_int: phy0, returned: 0
Quoted 3 lines
Quoted 1 line

Thanks for reviewing! Is there any procedure to get these queued for bluetooth-next? Are you forwarding such patches to Marcel? Cheers,
-- Guido

maintainer
#3 lore raw

Hi,

Quoted 25 lines · Guido Günther

Hi,

Quoted 23 lines · Alexander Aring
Quoted 22 lines · Guido Günther

Enabling tracing via

echo 1 > /sys/kernel/debug/tracing/events/cfg802154/enable

enables event tracing like

iwpan dev wpan0 set pan_id 0xbeef
cat /sys/kernel/debug/tracing/trace
# tracer: nop
#
# entries-in-buffer/entries-written: 2/2 #P:1
#
# _-----=> irqs-off
# / _----=> need-resched

 #                            | / _---=> hardirq/softirq
 #                            || / _--=> preempt-depth
 #                            ||| /     delay
 #           TASK-PID   CPU#  ||||    TIMESTAMP  FUNCTION
 #              | |       |   ||||       |         |
            iwpan-2663  [000] ....   170.369142: 802154_rdev_set_pan_id: phy0, wpan_dev(1), pan id: 0xbeef
            iwpan-2663  [000] ....   170.369177: 802154_rdev_return_int: phy0, returned: 0
Quoted 6 lines
Quoted 3 lines
Quoted 1 line

Thanks for reviewing! Is there any procedure to get these queued for bluetooth-next? Are you forwarding such patches to Marcel?

no. The current situation was a conclusion that we had massive changes inside the generic 6LoWPAN branch (net/6lowpan) which is used by ble/802.15.4 . For easier applying without conflicts marcel offers his help to apply everything and I think he has actual a nice setup with:

- some creat testing evironment which checks if patch apply and run tests on it.

- klick one button to send "thanks applied" mail and apply the patch on his bluetooth branch and send a push. (maybe on his iPad ;-))

Currently I don't have such setup environment, but I need something like that. When the time allows then I will try to build something like that.

What I do now is to have a private queue, if Marcel doesn't repsond ~2 weeks after the "Acked-by" then I will send a "ping". I think every maintainer have a timeslot to making his/her "rounds" on the mailinglist to grab patches. I am not forwarding the patches to marcel, he will apply the patches from linux-wpan or netdev mailinglist.

The time will come when linux-wpan have his own repository and send then pull-request to Marcel (if there are too many shared code between 802.15.4 and bt) or netdev.

- Alex