Files
kernel_common_drivers/include/linux/amlogic/mem_debug.h
T
Jianxiong Pan 4fa9cce6f5 mm: profile cma pool usage. [1/1]
PD#SWPL-225018

Problem:
statistic cma pool usage.

Solution:
echo cma_name > /proc/cma_stat
cat /proc/cma_stat
or call get_cma_stat() to get info;

Verify:
local.

Change-Id: I39ad7e9fbc6ad8b1bf75e40d2f3074ccd77b0f2b
Signed-off-by: Jianxiong Pan <jianxiong.pan@amlogic.com>
2025-09-05 04:49:33 -07:00

25 lines
505 B
C

/* SPDX-License-Identifier: (GPL-2.0+ OR MIT) */
/*
* Copyright (c) 2019 Amlogic, Inc. All rights reserved.
*/
#ifndef __MEM_DEBUG_H
#define __MEM_DEBUG_H
void dump_mem_layout(char *buf);
void dump_mem_layout_boot_phase(void);
extern unsigned long mlock_fault_size;
struct cma_stat {
unsigned int driver_c;
unsigned int anon_c;
unsigned int file_c;
unsigned int free_c;
char *buffer;
unsigned long buf_size;
};
int get_cma_stat(struct cma *cma, struct cma_stat *stat, bool print_log);
#endif