forked from luck/tmp_suning_uos_patched
d331a73994
A private debug logging infrastructure is currently provided via $debug_fs/batman_adv/*/log when CONFIG_BATMAN_ADV_DEBUG is enabled. This is not well integrated in the rest of the tracing infrastructure of the kernel. Other components (like mac80211 or ath10k) allow to gather the debug messages using generic trace events which are better integrated. This makes it possible to interact with them using the existing userspace tools. The tracepoint batadv:batadv_dbg will now be available when CONFIG_BATMAN_ADV_DEBUG and CONFIG_BATMAN_ADV_TRACING is activated. The log level mask is still used for filtering as usual. A full system trace for offline parsing can be created (and read) using: $ batctl ll all $ trace-cmd record -e batadv:batadv_dbg $ trace-cmd report The same can also be done without recording to a file $ batctl ll all $ trace-cmd stream -e batadv:batadv_dbg The trace infrastructure is especially helpful when tracing processes: $ batctl ll all $ ./tools/perf/perf trace --event "batadv:*" batctl p 10.204.32.1 0.000 batadv:batadv_dbg:batman_adv bat0 Parsing outgoing ARP REQUEST 0.045 batadv:batadv_dbg:batman_adv bat0 ARP MSG = [src: a2:64:14:53:f8:22-10.204.32.185 dst: 00:00:00:00:00:00-10.204.32.1] 0.067 batadv:batadv_dbg:batman_adv bat0 Entry updated: 10.204.32.185 a2:64:14:53:f8:22 (vid: -1) 0.099 batadv:batadv_dbg:batman_adv bat0 batadv_dat_select_candidates(): IP=10.204.32.1 hash(IP)=48902 0.757 batadv:batadv_dbg:batman_adv bat0 dat_select_candidates() 0: selected fe:2c:91:68:29:2b addr=48977 dist=65460 1.178 batadv:batadv_dbg:batman_adv bat0 dat_select_candidates() 1: selected fe:81:ab:c5:e3:03 addr=49181 dist=65256 1.809 batadv:batadv_dbg:batman_adv bat0 dat_select_candidates() 2: selected 66:25:a7:48:37:fb addr=49328 dist=65109 1.828 batadv:batadv_dbg:batman_adv bat0 DHT_SEND for 10.204.32.1 Signed-off-by: Sven Eckelmann <sven@narfation.org> Signed-off-by: Simon Wunderlich <sw@simonwunderlich.de>
51 lines
1.8 KiB
Makefile
51 lines
1.8 KiB
Makefile
# SPDX-License-Identifier: GPL-2.0
|
|
# Copyright (C) 2007-2018 B.A.T.M.A.N. contributors:
|
|
#
|
|
# Marek Lindner, Simon Wunderlich
|
|
#
|
|
# This program is free software; you can redistribute it and/or
|
|
# modify it under the terms of version 2 of the GNU General Public
|
|
# License as published by the Free Software Foundation.
|
|
#
|
|
# This program is distributed in the hope that it will be useful, but
|
|
# WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
# General Public License for more details.
|
|
#
|
|
# You should have received a copy of the GNU General Public License
|
|
# along with this program; if not, see <http://www.gnu.org/licenses/>.
|
|
#
|
|
|
|
obj-$(CONFIG_BATMAN_ADV) += batman-adv.o
|
|
batman-adv-y += bat_algo.o
|
|
batman-adv-y += bat_iv_ogm.o
|
|
batman-adv-$(CONFIG_BATMAN_ADV_BATMAN_V) += bat_v.o
|
|
batman-adv-$(CONFIG_BATMAN_ADV_BATMAN_V) += bat_v_elp.o
|
|
batman-adv-$(CONFIG_BATMAN_ADV_BATMAN_V) += bat_v_ogm.o
|
|
batman-adv-y += bitarray.o
|
|
batman-adv-$(CONFIG_BATMAN_ADV_BLA) += bridge_loop_avoidance.o
|
|
batman-adv-$(CONFIG_BATMAN_ADV_DEBUGFS) += debugfs.o
|
|
batman-adv-$(CONFIG_BATMAN_ADV_DAT) += distributed-arp-table.o
|
|
batman-adv-y += fragmentation.o
|
|
batman-adv-y += gateway_client.o
|
|
batman-adv-y += gateway_common.o
|
|
batman-adv-y += hard-interface.o
|
|
batman-adv-y += hash.o
|
|
batman-adv-$(CONFIG_BATMAN_ADV_DEBUGFS) += icmp_socket.o
|
|
batman-adv-$(CONFIG_BATMAN_ADV_DEBUG) += log.o
|
|
batman-adv-y += main.o
|
|
batman-adv-$(CONFIG_BATMAN_ADV_MCAST) += multicast.o
|
|
batman-adv-y += netlink.o
|
|
batman-adv-$(CONFIG_BATMAN_ADV_NC) += network-coding.o
|
|
batman-adv-y += originator.o
|
|
batman-adv-y += routing.o
|
|
batman-adv-y += send.o
|
|
batman-adv-y += soft-interface.o
|
|
batman-adv-y += sysfs.o
|
|
batman-adv-$(CONFIG_BATMAN_ADV_TRACING) += trace.o
|
|
batman-adv-y += tp_meter.o
|
|
batman-adv-y += translation-table.o
|
|
batman-adv-y += tvlv.o
|
|
|
|
CFLAGS_trace.o := -I$(src)
|