qcacmn: Featurize dp trace
Featurize dp trace to compile out cleanly. Change-Id: If244fba87a50cde57ec55e54249b41dd30dcc92d CRs-Fixed: 2227771
This commit is contained in:
@@ -753,12 +753,14 @@ static inline
|
|||||||
uint32_t qdf_dpt_get_curr_pos_debugfs(qdf_debugfs_file_t file,
|
uint32_t qdf_dpt_get_curr_pos_debugfs(qdf_debugfs_file_t file,
|
||||||
enum qdf_dpt_debugfs_state state)
|
enum qdf_dpt_debugfs_state state)
|
||||||
{
|
{
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline
|
static inline
|
||||||
QDF_STATUS qdf_dpt_dump_stats_debugfs(qdf_debugfs_file_t file,
|
QDF_STATUS qdf_dpt_dump_stats_debugfs(qdf_debugfs_file_t file,
|
||||||
uint32_t curr_pos)
|
uint32_t curr_pos)
|
||||||
{
|
{
|
||||||
|
return QDF_STATUS_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline
|
static inline
|
||||||
@@ -791,6 +793,7 @@ void qdf_dp_trace_clear_buffer(void)
|
|||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static inline
|
||||||
void qdf_dp_trace_data_pkt(qdf_nbuf_t nbuf, uint8_t pdev_id,
|
void qdf_dp_trace_data_pkt(qdf_nbuf_t nbuf, uint8_t pdev_id,
|
||||||
enum QDF_DP_TRACE_ID code, uint16_t msdu_id,
|
enum QDF_DP_TRACE_ID code, uint16_t msdu_id,
|
||||||
enum qdf_proto_dir dir)
|
enum qdf_proto_dir dir)
|
||||||
|
@@ -2488,6 +2488,52 @@ void qdf_dp_trace_dump_all(uint32_t count, uint8_t pdev_id)
|
|||||||
}
|
}
|
||||||
qdf_export_symbol(qdf_dp_trace_dump_all);
|
qdf_export_symbol(qdf_dp_trace_dump_all);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* qdf_dp_trace_throttle_live_mode() - Throttle DP Trace live mode
|
||||||
|
* @high_bw_request: whether this is a high BW req or not
|
||||||
|
*
|
||||||
|
* The function tries to prevent excessive logging into the live buffer by
|
||||||
|
* having an upper limit on number of packets that can be logged per second.
|
||||||
|
*
|
||||||
|
* The intention is to allow occasional pings and data packets and really low
|
||||||
|
* throughput levels while suppressing bursts and higher throughput levels so
|
||||||
|
* that we donot hog the live buffer.
|
||||||
|
*
|
||||||
|
* If the number of packets printed in a particular second exceeds the thresh,
|
||||||
|
* disable printing in the next second.
|
||||||
|
*
|
||||||
|
* Return: None
|
||||||
|
*/
|
||||||
|
void qdf_dp_trace_throttle_live_mode(bool high_bw_request)
|
||||||
|
{
|
||||||
|
static int bw_interval_counter;
|
||||||
|
|
||||||
|
if (g_qdf_dp_trace_data.enable == false ||
|
||||||
|
g_qdf_dp_trace_data.live_mode_config == false)
|
||||||
|
return;
|
||||||
|
|
||||||
|
if (high_bw_request) {
|
||||||
|
g_qdf_dp_trace_data.live_mode = 0;
|
||||||
|
bw_interval_counter = 0;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
bw_interval_counter++;
|
||||||
|
|
||||||
|
if (0 == (bw_interval_counter %
|
||||||
|
g_qdf_dp_trace_data.thresh_time_limit)) {
|
||||||
|
|
||||||
|
spin_lock_bh(&l_dp_trace_lock);
|
||||||
|
if (g_qdf_dp_trace_data.print_pkt_cnt <=
|
||||||
|
g_qdf_dp_trace_data.high_tput_thresh)
|
||||||
|
g_qdf_dp_trace_data.live_mode = 1;
|
||||||
|
|
||||||
|
g_qdf_dp_trace_data.print_pkt_cnt = 0;
|
||||||
|
spin_unlock_bh(&l_dp_trace_lock);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
qdf_export_symbol(qdf_dp_trace_throttle_live_mode);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
struct qdf_print_ctrl print_ctrl_obj[MAX_PRINT_CONFIG_SUPPORTED];
|
struct qdf_print_ctrl print_ctrl_obj[MAX_PRINT_CONFIG_SUPPORTED];
|
||||||
@@ -2720,53 +2766,6 @@ void qdf_trace_msg_cmn(unsigned int idx,
|
|||||||
}
|
}
|
||||||
qdf_export_symbol(qdf_trace_msg_cmn);
|
qdf_export_symbol(qdf_trace_msg_cmn);
|
||||||
|
|
||||||
/**
|
|
||||||
* qdf_dp_trace_throttle_live_mode() - Throttle DP Trace live mode
|
|
||||||
* @high_bw_request: whether this is a high BW req or not
|
|
||||||
*
|
|
||||||
* The function tries to prevent excessive logging into the live buffer by
|
|
||||||
* having an upper limit on number of packets that can be logged per second.
|
|
||||||
*
|
|
||||||
* The intention is to allow occasional pings and data packets and really low
|
|
||||||
* throughput levels while suppressing bursts and higher throughput levels so
|
|
||||||
* that we donot hog the live buffer.
|
|
||||||
*
|
|
||||||
* If the number of packets printed in a particular second exceeds the thresh,
|
|
||||||
* disable printing in the next second.
|
|
||||||
*
|
|
||||||
* Return: None
|
|
||||||
*/
|
|
||||||
void qdf_dp_trace_throttle_live_mode(bool high_bw_request)
|
|
||||||
{
|
|
||||||
static int bw_interval_counter;
|
|
||||||
|
|
||||||
if (g_qdf_dp_trace_data.enable == false ||
|
|
||||||
g_qdf_dp_trace_data.live_mode_config == false)
|
|
||||||
return;
|
|
||||||
|
|
||||||
if (high_bw_request) {
|
|
||||||
g_qdf_dp_trace_data.live_mode = 0;
|
|
||||||
bw_interval_counter = 0;
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
bw_interval_counter++;
|
|
||||||
|
|
||||||
if (0 == (bw_interval_counter %
|
|
||||||
g_qdf_dp_trace_data.thresh_time_limit)) {
|
|
||||||
|
|
||||||
spin_lock_bh(&l_dp_trace_lock);
|
|
||||||
if (g_qdf_dp_trace_data.print_pkt_cnt <=
|
|
||||||
g_qdf_dp_trace_data.high_tput_thresh)
|
|
||||||
g_qdf_dp_trace_data.live_mode = 1;
|
|
||||||
|
|
||||||
g_qdf_dp_trace_data.print_pkt_cnt = 0;
|
|
||||||
spin_unlock_bh(&l_dp_trace_lock);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
qdf_export_symbol(qdf_dp_trace_throttle_live_mode);
|
|
||||||
|
|
||||||
QDF_STATUS qdf_print_setup(void)
|
QDF_STATUS qdf_print_setup(void)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
|
Reference in New Issue
Block a user