qcacmn: qref debug memory tracker

add multiple history array to keep track of mem allocation and
deallocation for qref table.

Change-Id: I9fa97fbe5a5c36509cbb5a458851a152200318a5
CRs-Fixed: 3475981
这个提交包含在:
Ruben Columbus
2023-05-22 16:42:02 -07:00
提交者 Rahul Choudhary
父节点 9d022375f6
当前提交 d8334769f4
修改 8 个文件,包含 236 行新增1 行删除

查看文件

@@ -170,6 +170,7 @@ QDF_COMPILE_TIME_ASSERT(wlan_cfg_num_int_ctxs,
WLAN_CFG_INT_NUM_CONTEXTS_MAX >=
WLAN_CFG_INT_NUM_CONTEXTS);
static void dp_soc_unset_qref_debug_list(struct dp_soc *soc);
static QDF_STATUS dp_sysfs_deinitialize_stats(struct dp_soc *soc_hdl);
static QDF_STATUS dp_sysfs_initialize_stats(struct dp_soc *soc_hdl);
@@ -2993,6 +2994,7 @@ static void dp_soc_detach(struct cdp_soc_t *txrx_soc)
dp_runtime_deinit();
dp_soc_unset_qref_debug_list(soc);
dp_sysfs_deinitialize_stats(soc);
dp_soc_swlm_detach(soc);
dp_soc_tx_desc_sw_pools_free(soc);
@@ -12062,6 +12064,7 @@ static void dp_soc_txrx_ops_attach(struct dp_soc *soc)
#if defined(QCA_WIFI_QCA8074) || defined(QCA_WIFI_QCA6018) || \
defined(QCA_WIFI_QCA5018) || defined(QCA_WIFI_QCA9574) || \
defined(QCA_WIFI_QCA5332)
/**
* dp_soc_attach_wifi3() - Attach txrx SOC
* @ctrl_psoc: Opaque SOC handle from control plane
@@ -12091,6 +12094,44 @@ static inline void dp_soc_set_def_pdev(struct dp_soc *soc)
}
}
static void dp_soc_unset_qref_debug_list(struct dp_soc *soc)
{
uint32_t max_list_size = soc->wlan_cfg_ctx->qref_control_size;
if (max_list_size == 0)
return;
qdf_mem_free(soc->list_shared_qaddr_del);
qdf_mem_free(soc->reo_write_list);
qdf_mem_free(soc->list_qdesc_addr_free);
qdf_mem_free(soc->list_qdesc_addr_alloc);
}
static void dp_soc_set_qref_debug_list(struct dp_soc *soc)
{
uint32_t max_list_size = soc->wlan_cfg_ctx->qref_control_size;
if (max_list_size == 0)
return;
soc->list_shared_qaddr_del =
(struct test_qaddr_del *)
qdf_mem_malloc(sizeof(struct test_qaddr_del) *
max_list_size);
soc->reo_write_list =
(struct test_qaddr_del *)
qdf_mem_malloc(sizeof(struct test_qaddr_del) *
max_list_size);
soc->list_qdesc_addr_free =
(struct test_mem_free *)
qdf_mem_malloc(sizeof(struct test_mem_free) *
max_list_size);
soc->list_qdesc_addr_alloc =
(struct test_mem_free *)
qdf_mem_malloc(sizeof(struct test_mem_free) *
max_list_size);
}
static uint32_t
dp_get_link_desc_id_start(uint16_t arch_id)
{
@@ -12250,6 +12291,7 @@ dp_soc_attach(struct cdp_ctrl_objmgr_psoc *ctrl_psoc,
dp_soc_swlm_attach(soc);
dp_soc_set_interrupt_mode(soc);
dp_soc_set_def_pdev(soc);
dp_soc_set_qref_debug_list(soc);
dp_info("Mem stats: DMA = %u HEAP = %u SKB = %u",
qdf_dma_mem_stats_read(),