add more logs to debug memory leak problem

This commit is contained in:
Wilson W.K. Thong
2016-12-21 17:20:14 +08:00
parent afeb256604
commit dabdf7933b
30 changed files with 136 additions and 115 deletions
+12 -12
View File
@@ -160,7 +160,7 @@ boolean_t pdcp_data_req(
if (modeP == PDCP_TRANSMISSION_MODE_TRANSPARENT) {
LOG_D(PDCP, " [TM] Asking for a new mem_block of size %d\n",sdu_buffer_sizeP);
pdcp_pdu_p = get_free_mem_block(sdu_buffer_sizeP);
pdcp_pdu_p = get_free_mem_block(sdu_buffer_sizeP, __func__);
if (pdcp_pdu_p != NULL) {
memcpy(&pdcp_pdu_p->data[0], sdu_buffer_pP, sdu_buffer_sizeP);
@@ -201,7 +201,7 @@ boolean_t pdcp_data_req(
/*
* Allocate a new block for the new PDU (i.e. PDU header and SDU payload)
*/
pdcp_pdu_p = get_free_mem_block(pdcp_pdu_size);
pdcp_pdu_p = get_free_mem_block(pdcp_pdu_size, __func__);
if (pdcp_pdu_p != NULL) {
/*
@@ -260,7 +260,7 @@ boolean_t pdcp_data_req(
PROTOCOL_PDCP_CTXT_ARGS(ctxt_pP,pdcp_p),
current_sn);
free_mem_block(pdcp_pdu_p);
free_mem_block(pdcp_pdu_p, __func__);
if (ctxt_pP->enb_flag == ENB_FLAG_NO) {
stop_meas(&eNB_pdcp_stats[ctxt_pP->module_id].data_req);
@@ -510,7 +510,7 @@ pdcp_data_ind(
PROTOCOL_CTXT_FMT"Could not get PDCP instance key 0x%"PRIx64"\n",
PROTOCOL_CTXT_ARGS(ctxt_pP),
key);
free_mem_block(sdu_buffer_pP);
free_mem_block(sdu_buffer_pP, __func__);
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_PDCP_DATA_IND,VCD_FUNCTION_OUT);
return FALSE;
}
@@ -567,7 +567,7 @@ pdcp_data_ind(
PROTOCOL_PDCP_CTXT_FMT"Incoming (from RLC) SDU is short of size (size:%d)! Ignoring...\n",
PROTOCOL_PDCP_CTXT_ARGS(ctxt_pP, pdcp_p),
sdu_buffer_sizeP);
free_mem_block(sdu_buffer_pP);
free_mem_block(sdu_buffer_pP, __func__);
if (ctxt_pP->enb_flag) {
stop_meas(&eNB_pdcp_stats[ctxt_pP->module_id].data_ind);
@@ -598,7 +598,7 @@ pdcp_data_ind(
*/
#if 0
LOG_D(PDCP, "Ignoring PDU...\n");
free_mem_block(sdu_buffer);
free_mem_block(sdu_buffer, __func__);
return FALSE;
#else
//LOG_W(PDCP, "Delivering out-of-order SDU to upper layer...\n");
@@ -645,9 +645,9 @@ pdcp_data_ind(
rb_id,
sdu_buffer_sizeP - pdcp_header_len - pdcp_tailer_len,
(uint8_t*)&sdu_buffer_pP->data[pdcp_header_len]);
free_mem_block(sdu_buffer_pP);
free_mem_block(sdu_buffer_pP, __func__);
// free_mem_block(new_sdu);
// free_mem_block(new_sdu, __func__);
if (ctxt_pP->enb_flag) {
stop_meas(&eNB_pdcp_stats[ctxt_pP->module_id].data_ind);
} else {
@@ -722,7 +722,7 @@ pdcp_data_ind(
ctime,
(const char*)(&sdu_buffer_pP->data[payload_offset]),
sdu_buffer_sizeP - payload_offset ) == 0 ) {
free_mem_block(sdu_buffer_pP);
free_mem_block(sdu_buffer_pP, __func__);
if (ctxt_pP->enb_flag) {
stop_meas(&eNB_pdcp_stats[ctxt_pP->module_id].data_ind);
@@ -739,7 +739,7 @@ pdcp_data_ind(
if (otg_enabled==1) {
LOG_D(OTG,"Discarding received packed\n");
free_mem_block(sdu_buffer_pP);
free_mem_block(sdu_buffer_pP, __func__);
if (ctxt_pP->enb_flag) {
stop_meas(&eNB_pdcp_stats[ctxt_pP->module_id].data_ind);
@@ -794,7 +794,7 @@ pdcp_data_ind(
#endif
if (FALSE == packet_forwarded) {
new_sdu_p = get_free_mem_block(sdu_buffer_sizeP - payload_offset + sizeof (pdcp_data_ind_header_t));
new_sdu_p = get_free_mem_block(sdu_buffer_sizeP - payload_offset + sizeof (pdcp_data_ind_header_t), __func__);
if (new_sdu_p) {
if (pdcp_p->rlc_mode == RLC_MODE_AM ) {
@@ -856,7 +856,7 @@ pdcp_data_ind(
#endif
free_mem_block(sdu_buffer_pP);
free_mem_block(sdu_buffer_pP, __func__);
if (ctxt_pP->enb_flag) {
stop_meas(&eNB_pdcp_stats[ctxt_pP->module_id].data_ind);