qcacmn: Add qdf api support for mtrace logging
Currently mtrace messages are getting recorded in circular queue but are not getting used for DIAG Infrastructure. Add support to print the mtrace messages on DIAG infrastructure in format such that there will be two 32 bit fields printed on the logs. These two fields will be constructed as explained below: 1. First field will be constructed using below bit positions: a. Bit 0 – 14 ( 15 Bits Lsb ) will contain the messageIDs b. The bit 15-22 will represent the destination module, and the 23-30 will represent the source module which is initiating the message. c. Bit 31 will represent whether the message is from host or from FW. If bit is 0, it indicates the message is from host and if it is 1 it indicates the message is from FW. 2. Second field will be constructed using below bit positions: a. First 16 bits (From LSB )will be used for counter. b. Next 8 bits would be the vdev id. c. Remaining 8 bits are reserved for future use. Here counter is static unsigned 16 bit value which will be used to keep track of number of logs given to QXDM and out of these logs how many logs have been missed. Change-Id: I4cec762ef17222d6adda9fd3e283c101afb92955 CRs-Fixed: 2290898
This commit is contained in:

committed by
nshrivas

父節點
9d0ed2532c
當前提交
27bcaf88dd
@@ -529,6 +529,7 @@ static inline
|
||||
void qdf_trace_enable(uint32_t bitmask_of_module_id, uint8_t enable)
|
||||
{
|
||||
}
|
||||
|
||||
static inline
|
||||
void qdf_trace(uint8_t module, uint8_t code, uint16_t session, uint32_t data)
|
||||
{
|
||||
@@ -548,6 +549,56 @@ QDF_STATUS qdf_trace_spin_lock_init(void)
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef ENABLE_MTRACE_LOG
|
||||
/**
|
||||
* qdf_mtrace_log() - Logs a message tracepoint to DIAG
|
||||
* Infrastructure.
|
||||
* @src_module: Enum of source module (basically module id)
|
||||
* from where the message with message_id is posted.
|
||||
* @dst_module: Enum of destination module (basically module id)
|
||||
* to which the message with message_id is posted.
|
||||
* @message_id: Id of the message to be posted
|
||||
* @vdev_id: Vdev Id
|
||||
*
|
||||
* This function logs to the DIAG Infrastructure a tracepoint for a
|
||||
* message being sent from a source module to a destination module
|
||||
* with a specific ID for the benefit of a specific vdev.
|
||||
* For non-vdev messages vdev_id will be NO_SESSION
|
||||
* Return: None
|
||||
*/
|
||||
void qdf_mtrace_log(QDF_MODULE_ID src_module, QDF_MODULE_ID dst_module,
|
||||
uint16_t message_id, uint8_t vdev_id);
|
||||
#else
|
||||
static inline
|
||||
void qdf_mtrace_log(QDF_MODULE_ID src_module, QDF_MODULE_ID dst_module,
|
||||
uint16_t message_id, uint8_t vdev_id)
|
||||
{
|
||||
}
|
||||
#endif
|
||||
|
||||
/**
|
||||
* qdf_mtrace() - puts the messages in to ring-buffer
|
||||
* and logs a message tracepoint to DIAG Infrastructure.
|
||||
* @src_module: Enum of source module (basically module id)
|
||||
* from where the message with message_id is posted.
|
||||
* @dst_module: Enum of destination module (basically module id)
|
||||
* to which the message with message_id is posted.
|
||||
* @message_id: Id of the message to be posted
|
||||
* @vdev_id: Vdev Id
|
||||
* @data: Actual message contents
|
||||
*
|
||||
* This function will be called from each module which wants to record the
|
||||
* messages in circular queue. Before calling this function make sure you
|
||||
* have registered your module with qdf through qdf_trace_register function.
|
||||
* In addition of the recording the messages in circular queue this function
|
||||
* will log the message tracepoint to the DIAG infrastructure.
|
||||
* these logs will be later used by post processing script.
|
||||
*
|
||||
* Return: None
|
||||
*/
|
||||
void qdf_mtrace(QDF_MODULE_ID src_module, QDF_MODULE_ID dst_module,
|
||||
uint16_t message_id, uint8_t vdev_id, uint32_t data);
|
||||
|
||||
#ifdef CONFIG_DP_TRACE
|
||||
void qdf_dp_set_proto_bitmap(uint32_t val);
|
||||
void qdf_dp_trace_set_verbosity(uint32_t val);
|
||||
|
Reference in New Issue
Block a user