qcacmn: Log memory stats in host driver

Add logs in driver to log current memory footprint
in init functions. Add wlan_mem_stats to sysfs node
in both perf and defconfig builds.
The stats are included under MCL feature
DCONFIG_WLAN_SYSFS_MEM_STATS.

Change-Id: I79c6d418a5762cddf52ab3bc0b0c93993fa7fd84
CRs-Fixed: 2635192
This commit is contained in:
Nisha Menon
2020-01-21 16:54:12 -08:00
zatwierdzone przez nshrivas
rodzic b725ee6291
commit 0bbaedb23c
5 zmienionych plików z 122 dodań i 56 usunięć

Wyświetl plik

@@ -1620,7 +1620,12 @@ static inline qdf_nbuf_t
qdf_nbuf_alloc_fl(qdf_device_t osdev, qdf_size_t size, int reserve, int align,
int prio, const char *func, uint32_t line)
{
return __qdf_nbuf_alloc(osdev, size, reserve, align, prio, func, line);
qdf_nbuf_t nbuf;
nbuf = __qdf_nbuf_alloc(osdev, size, reserve, align, prio, func, line);
if (qdf_likely(nbuf))
qdf_mem_skb_inc(nbuf->truesize);
return nbuf;
}
static inline void qdf_nbuf_free(qdf_nbuf_t buf)