Jelajahi Sumber

qcacld-3.0: Add compilation flag for enter/exit macros

Map all enter/exit log macros to enter/exit QDF TRACE macro
to provide option to compile out enter/exit logs if required.

Change-Id: I0c6cd633705e820fcfeb47e3f81a3522c9ef1974
CRs-Fixed: 2274850
Nirav Shah 6 tahun lalu
induk
melakukan
d6fa0f8cd8

+ 2 - 0
Kbuild

@@ -1785,6 +1785,8 @@ cppflags-$(CONFIG_WLAN_LOG_ERROR) += -DWLAN_LOG_ERROR
 cppflags-$(CONFIG_WLAN_LOG_WARN) += -DWLAN_LOG_WARN
 cppflags-$(CONFIG_WLAN_LOG_INFO) += -DWLAN_LOG_INFO
 cppflags-$(CONFIG_WLAN_LOG_DEBUG) += -DWLAN_LOG_DEBUG
+cppflags-$(CONFIG_WLAN_LOG_ENTER) += -DWLAN_LOG_ENTER
+cppflags-$(CONFIG_WLAN_LOG_EXIT) += -DWLAN_LOG_EXIT
 
 cppflags-$(WLAN_OPEN_SOURCE) += -DWLAN_OPEN_SOURCE
 

+ 4 - 3
components/disa/core/inc/wlan_disa_main.h

@@ -38,9 +38,10 @@
 	QDF_TRACE_INFO(QDF_MODULE_ID_DISA, params)
 #define disa_debug(params...) \
 	QDF_TRACE_DEBUG(QDF_MODULE_ID_DISA, params)
-
-#define DISA_ENTER() disa_debug("enter")
-#define DISA_EXIT() disa_debug("exit")
+#define DISA_ENTER() \
+	QDF_TRACE_ENTER(QDF_MODULE_ID_DISA, "enter")
+#define DISA_EXIT() \
+	QDF_TRACE_EXIT(QDF_MODULE_ID_DISA, "exit")
 
 /**
  * disa_allocate_ctx() - Api to allocate disa ctx

+ 16 - 14
components/ipa/core/inc/wlan_ipa_main.h

@@ -31,18 +31,18 @@
 #include <wlan_ipa_priv.h>
 
 #define ipa_log(level, args...) QDF_TRACE(QDF_MODULE_ID_IPA, level, ## args)
-#define ipa_logfl(level, format, args...) ipa_log(level, FL(format), ## args)
-
-#define ipa_fatal(format, args...) \
-		ipa_logfl(QDF_TRACE_LEVEL_FATAL, format, ## args)
-#define ipa_err(format, args...) \
-		ipa_logfl(QDF_TRACE_LEVEL_ERROR, format, ## args)
-#define ipa_warn(format, args...) \
-		ipa_logfl(QDF_TRACE_LEVEL_WARN, format, ## args)
-#define ipa_info(format, args...) \
-		ipa_logfl(QDF_TRACE_LEVEL_INFO, format, ## args)
-#define ipa_debug(format, args...) \
-		ipa_logfl(QDF_TRACE_LEVEL_DEBUG, format, ## args)
+#define ipa_logfl(level, params...) ipa_log(level, FL(format), ## args)
+
+#define ipa_fatal(params...) \
+	QDF_TRACE_FATAL(QDF_MODULE_ID_IPA, params)
+#define ipa_err(params...) \
+	QDF_TRACE_ERROR(QDF_MODULE_ID_IPA, params)
+#define ipa_warn(params...) \
+	QDF_TRACE_WARN(QDF_MODULE_ID_IPA, params)
+#define ipa_info(params...) \
+	QDF_TRACE_INFO(QDF_MODULE_ID_IPA, params)
+#define ipa_debug(params...) \
+	QDF_TRACE_DEBUG(QDF_MODULE_ID_IPA, params)
 
 #define ipa_fatal_rl(params...) QDF_TRACE_FATAL_RL(QDF_MODULE_ID_IPA, params)
 #define ipa_err_rl(params...) QDF_TRACE_ERROR_RL(QDF_MODULE_ID_IPA, params)
@@ -50,8 +50,10 @@
 #define ipa_info_rl(params...) QDF_TRACE_INFO_RL(QDF_MODULE_ID_IPA, params)
 #define ipa_debug_rl(params...) QDF_TRACE_DEBUG_RL(QDF_MODULE_ID_IPA, params)
 
-#define IPA_ENTER() ipa_debug("enter")
-#define IPA_EXIT() ipa_debug("exit")
+#define IPA_ENTER() \
+	QDF_TRACE_ENTER(QDF_MODULE_ID_IPA, "enter")
+#define IPA_EXIT() \
+	QDF_TRACE_EXIT(QDF_MODULE_ID_IPA, "exit")
 
 /**
  * ipa_check_hw_present() - get IPA hw status

+ 2 - 2
components/pmo/core/inc/wlan_pmo_main.h

@@ -36,8 +36,8 @@
 #define pmo_info(params...) QDF_TRACE_INFO(QDF_MODULE_ID_PMO, params)
 #define pmo_debug(params...) QDF_TRACE_DEBUG(QDF_MODULE_ID_PMO, params)
 
-#define pmo_enter() pmo_debug("enter")
-#define pmo_exit() pmo_debug("exit")
+#define pmo_enter() QDF_TRACE_ENTER(QDF_MODULE_ID_PMO, "enter")
+#define pmo_exit() QDF_TRACE_EXIT(QDF_MODULE_ID_PMO, "exit")
 
 #define PMO_VDEV_IN_STA_MODE(mode) \
 	((mode) == QDF_STA_MODE || (mode) == QDF_P2P_CLIENT_MODE ? 1 : 0)

+ 2 - 0
configs/default_defconfig

@@ -351,6 +351,8 @@ CONFIG_WLAN_LOG_ERROR := y
 CONFIG_WLAN_LOG_WARN := y
 CONFIG_WLAN_LOG_INFO := y
 CONFIG_WLAN_LOG_DEBUG := y
+CONFIG_WLAN_LOG_ENTER := y
+CONFIG_WLAN_LOG_EXIT := y
 
 #Enable OL debug and wmi unified functions
 CONFIG_ATH_PERF_PWR_OFFLOAD := y

+ 2 - 0
configs/genoa.pci.debug_defconfig

@@ -32,6 +32,8 @@ CONFIG_MPC_UT_FRAMEWORK := y
 CONFIG_FEATURE_EPPING := y
 CONFIG_WLAN_NAPI_DEBUG := n
 CONFIG_WLAN_FEATURE_P2P_DEBUG := y
+CONFIG_WLAN_LOG_ENTER := y
+CONFIG_WLAN_LOG_EXIT := y
 
 # Features gets enabled on slub debug
 CONFIG_FEATURE_PKTLOG := y

+ 2 - 0
configs/genoa.pci.perf_defconfig

@@ -31,6 +31,8 @@ CONFIG_MPC_UT_FRAMEWORK := n
 CONFIG_FEATURE_EPPING := n
 CONFIG_WLAN_NAPI_DEBUG := n
 CONFIG_WLAN_FEATURE_P2P_DEBUG := n
+CONFIG_WLAN_LOG_ENTER := n
+CONFIG_WLAN_LOG_EXIT := n
 
 # Features gets enabled on slub debug
 CONFIG_FEATURE_PKTLOG := y

+ 2 - 0
configs/genoa.sdio.debug_defconfig

@@ -21,6 +21,8 @@ CONFIG_CREDIT_REP_THROUGH_CREDIT_UPDATE := y
 CONFIG_MPC_UT_FRAMEWORK := y
 CONFIG_FEATURE_EPPING := y
 CONFIG_WLAN_FEATURE_P2P_DEBUG := y
+CONFIG_WLAN_LOG_ENTER := y
+CONFIG_WLAN_LOG_EXIT := y
 
 ifeq ($(CONFIG_DEBUG_FS), y)
        CONFIG_WLAN_DEBUGFS := y

+ 2 - 0
configs/genoa.sdio.perf_defconfig

@@ -20,6 +20,8 @@ CONFIG_CREDIT_REP_THROUGH_CREDIT_UPDATE := y
 CONFIG_MPC_UT_FRAMEWORK := n
 CONFIG_FEATURE_EPPING := n
 CONFIG_WLAN_FEATURE_P2P_DEBUG := n
+CONFIG_WLAN_LOG_ENTER := n
+CONFIG_WLAN_LOG_EXIT := n
 
 # Features gets enabled on slub debug
 CONFIG_FEATURE_PKTLOG := y

+ 2 - 0
configs/genoa.snoc.debug_defconfig

@@ -50,6 +50,8 @@ CONFIG_WLAN_NAPI_DEBUG := n
 CONFIG_WLAN_FEATURE_P2P_DEBUG := y
 CONFIG_MPC_UT_FRAMEWORK := y
 CONFIG_FEATURE_EPPING := y
+CONFIG_WLAN_LOG_ENTER := y
+CONFIG_WLAN_LOG_EXIT := y
 
 # Features gets enabled on slub debug
 CONFIG_WLAN_OBJMGR_DEBUG:= y

+ 2 - 0
configs/genoa.snoc.perf_defconfig

@@ -49,6 +49,8 @@ CONFIG_WLAN_NAPI_DEBUG := n
 CONFIG_WLAN_FEATURE_P2P_DEBUG := n
 CONFIG_MPC_UT_FRAMEWORK := n
 CONFIG_FEATURE_EPPING := n
+CONFIG_WLAN_LOG_ENTER := n
+CONFIG_WLAN_LOG_EXIT := n
 
 # Features gets enabled on slub debug
 CONFIG_WLAN_OBJMGR_DEBUG:= n

+ 2 - 0
configs/genoa.usb.debug_defconfig

@@ -18,6 +18,8 @@ CONFIG_CREDIT_REP_THROUGH_CREDIT_UPDATE := y
 CONFIG_MPC_UT_FRAMEWORK := y
 CONFIG_FEATURE_EPPING := y
 CONFIG_WLAN_FEATURE_P2P_DEBUG := y
+CONFIG_WLAN_LOG_ENTER := y
+CONFIG_WLAN_LOG_EXIT := y
 
 ifeq ($(CONFIG_DEBUG_FS), y)
        CONFIG_WLAN_DEBUGFS := y

+ 2 - 0
configs/genoa.usb.perf_defconfig

@@ -18,6 +18,8 @@ CONFIG_CREDIT_REP_THROUGH_CREDIT_UPDATE := y
 CONFIG_MPC_UT_FRAMEWORK := n
 CONFIG_FEATURE_EPPING := n
 CONFIG_WLAN_FEATURE_P2P_DEBUG := n
+CONFIG_WLAN_LOG_ENTER := n
+CONFIG_WLAN_LOG_EXIT := n
 
 # Features gets enabled on slub debug
 CONFIG_FEATURE_PKTLOG := y

+ 2 - 2
core/cds/inc/cds_utils.h

@@ -71,8 +71,8 @@
 #define cds_info(params...) QDF_TRACE_INFO(QDF_MODULE_ID_QDF, params)
 #define cds_debug(params...) QDF_TRACE_DEBUG(QDF_MODULE_ID_QDF, params)
 
-#define cds_enter() cds_debug("enter")
-#define cds_exit() cds_debug("exit")
+#define cds_enter() QDF_TRACE_ENTER(QDF_MODULE_ID_QDF, "enter")
+#define cds_exit() QDF_TRACE_EXIT(QDF_MODULE_ID_QDF, "exit")
 
 /**
  * enum cds_band_type - Band type - 2g, 5g or all

+ 4 - 3
core/hdd/inc/wlan_hdd_main.h

@@ -317,9 +317,10 @@ static inline bool in_compat_syscall(void) { return is_compat_task(); }
 #define hdd_info_rl(params...) QDF_TRACE_INFO_RL(QDF_MODULE_ID_HDD, params)
 #define hdd_debug_rl(params...) QDF_TRACE_DEBUG_RL(QDF_MODULE_ID_HDD, params)
 
-#define hdd_enter() hdd_debug("enter")
-#define hdd_enter_dev(dev) hdd_debug("enter(%s)", (dev)->name)
-#define hdd_exit() hdd_debug("exit")
+#define hdd_enter() QDF_TRACE_ENTER(QDF_MODULE_ID_HDD, "enter")
+#define hdd_enter_dev(dev) \
+	QDF_TRACE_ENTER(QDF_MODULE_ID_HDD, "enter(%s)", (dev)->name)
+#define hdd_exit() QDF_TRACE_EXIT(QDF_MODULE_ID_HDD, "exit")
 
 #define WLAN_HDD_GET_PRIV_PTR(__dev__) \
 		(struct hdd_adapter *)(netdev_priv((__dev__)))

+ 2 - 2
core/mac/src/include/sir_debug.h

@@ -50,6 +50,6 @@
 #define pe_info(params...) QDF_TRACE_INFO(QDF_MODULE_ID_PE, params)
 #define pe_debug(params...) QDF_TRACE_DEBUG(QDF_MODULE_ID_PE, params)
 
-#define PE_ENTER() pe_debug("enter")
-#define PE_EXIT() pe_debug("exit")
+#define PE_ENTER() QDF_TRACE_ENTER(QDF_MODULE_ID_PE, "enter")
+#define PE_EXIT() QDF_TRACE_EXIT(QDF_MODULE_ID_PE, "exit")
 #endif

+ 2 - 2
core/sme/inc/sme_api.h

@@ -64,8 +64,8 @@
 #define sme_info_rl(params...) QDF_TRACE_INFO_RL(QDF_MODULE_ID_SME, params)
 #define sme_debug_rl(params...) QDF_TRACE_DEBUG_RL(QDF_MODULE_ID_SME, params)
 
-#define SME_ENTER() sme_debug("enter")
-#define SME_EXIT() sme_debug("exit")
+#define SME_ENTER() QDF_TRACE_ENTER(QDF_MODULE_ID_SME, "enter")
+#define SME_EXIT() QDF_TRACE_EXIT(QDF_MODULE_ID_SME, "exit")
 
 #define SME_SESSION_ID_ANY        50
 #define SME_SESSION_ID_BROADCAST  0xFF