summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAbhishek Singh <absingh@qti.qualcomm.com>2015-12-28 15:15:46 +0530
committerAnjaneedevi Kapparapu <akappa@codeaurora.org>2016-01-07 16:57:49 +0530
commit905c193841a035ac34c5dc9c073ba014c87c0e7e (patch)
tree6449725c5f47e72071f10b7483298b05d5488a9c
parent75de4f03741574a836ac1bbce68e43bdd97e18b8 (diff)
qcacld-2.0: Print the size and caller if kmalloc takes more than 3 sec
prima to qcacld-2.0 propagation If kmalloc takes more than 3 sec the current logs only print the time taken by kmalloc. With this change it will also log the size and the caller. Change-Id: Ia76ea62e2af8cfc02bc78cb1f34d096f4b6ff4be CRs-Fixed: 951135
-rw-r--r--CORE/VOSS/src/vos_memory.c14
1 files changed, 9 insertions, 5 deletions
diff --git a/CORE/VOSS/src/vos_memory.c b/CORE/VOSS/src/vos_memory.c
index 13df3b7f14c5..f12e2cb8f533 100644
--- a/CORE/VOSS/src/vos_memory.c
+++ b/CORE/VOSS/src/vos_memory.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2012-2015 The Linux Foundation. All rights reserved.
+ * Copyright (c) 2012-2016 The Linux Foundation. All rights reserved.
*
* Previously licensed under the ISC license by Qualcomm Atheros, Inc.
*
@@ -432,8 +432,10 @@ v_VOID_t *vos_mem_malloc_debug(v_SIZE_t size, const char *fileName,
if (vos_timer_get_system_time() - time_before_kmalloc >=
VOS_GET_MEMORY_TIME_THRESHOLD)
VOS_TRACE(VOS_MODULE_ID_VOSS, VOS_TRACE_LEVEL_ERROR,
- "%s: kmalloc took %lu msec", __func__,
- vos_timer_get_system_time() - time_before_kmalloc);
+ "%s: kmalloc took %lu msec for size %d called from %pS at line %d",
+ __func__,
+ vos_timer_get_system_time() - time_before_kmalloc,
+ size, (void *)_RET_IP_, lineNum);
if(memStruct != NULL)
{
@@ -547,8 +549,10 @@ v_VOID_t * vos_mem_malloc( v_SIZE_t size )
if (vos_timer_get_system_time() - time_before_kmalloc >=
VOS_GET_MEMORY_TIME_THRESHOLD)
VOS_TRACE(VOS_MODULE_ID_VOSS, VOS_TRACE_LEVEL_ERROR,
- "%s: kmalloc took %lu msec", __func__,
- vos_timer_get_system_time() - time_before_kmalloc);
+ "%s: kmalloc took %lu msec for size %d from %pS",
+ __func__,
+ vos_timer_get_system_time() - time_before_kmalloc,
+ size, (void *)_RET_IP_);
return memPtr;
}