Wlan: Print the size and the caller if kmalloc takes more than 3 sec
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
diff --git a/CORE/VOSS/src/vos_memory.c b/CORE/VOSS/src/vos_memory.c
index 31db6ef..58148ff 100644
--- a/CORE/VOSS/src/vos_memory.c
+++ b/CORE/VOSS/src/vos_memory.c
@@ -225,8 +225,10 @@
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 ((flags != GFP_ATOMIC) && (NULL == memPtr))
{
WARN_ON(1);
@@ -247,8 +249,10 @@
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)
{
@@ -366,8 +370,10 @@
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_);
if ((flags != GFP_ATOMIC) && (NULL == memPtr))
{