mm/mm_heap: change CONFIG_MM_BACKTRACE to int type

Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
This commit is contained in:
Jiuzhu Dong
2022-07-04 15:41:06 +08:00
committed by Xiang Xiao
parent 8a1e985e71
commit 9899dd0ec0
13 changed files with 65 additions and 46 deletions
+7 -7
View File
@@ -90,7 +90,7 @@ enum proc_node_e
#ifdef CONFIG_SCHED_CRITMONITOR
PROC_CRITMON, /* Critical section monitor */
#endif
#ifdef CONFIG_MM_BACKTRACE
#if CONFIG_MM_BACKTRACE >= 0
PROC_HEAP, /* Task heap info */
#endif
PROC_STACK, /* Task stack info */
@@ -178,7 +178,7 @@ static ssize_t proc_critmon(FAR struct proc_file_s *procfile,
FAR struct tcb_s *tcb, FAR char *buffer, size_t buflen,
off_t offset);
#endif
#ifdef CONFIG_MM_BACKTRACE
#if CONFIG_MM_BACKTRACE >= 0
static ssize_t proc_heap(FAR struct proc_file_s *procfile,
FAR struct tcb_s *tcb, FAR char *buffer,
size_t buflen, off_t offset);
@@ -279,7 +279,7 @@ static const struct proc_node_s g_critmon =
};
#endif
#ifdef CONFIG_MM_BACKTRACE
#if CONFIG_MM_BACKTRACE >= 0
static const struct proc_node_s g_heap =
{
"heap", "heap", (uint8_t)PROC_HEAP, DTYPE_FILE /* Task heap info */
@@ -326,7 +326,7 @@ static FAR const struct proc_node_s * const g_nodeinfo[] =
#ifdef CONFIG_SCHED_CRITMONITOR
&g_critmon, /* Critical section Monitor */
#endif
#ifdef CONFIG_MM_BACKTRACE
#if CONFIG_MM_BACKTRACE >= 0
&g_heap, /* Task heap info */
#endif
&g_stack, /* Task stack info */
@@ -352,7 +352,7 @@ static const struct proc_node_s * const g_level0info[] =
#ifdef CONFIG_SCHED_CRITMONITOR
&g_critmon, /* Critical section monitor */
#endif
#ifdef CONFIG_MM_BACKTRACE
#if CONFIG_MM_BACKTRACE >= 0
&g_heap, /* Task heap info */
#endif
&g_stack, /* Task stack info */
@@ -904,7 +904,7 @@ static ssize_t proc_critmon(FAR struct proc_file_s *procfile,
* Name: proc_heap
****************************************************************************/
#ifdef CONFIG_MM_BACKTRACE
#if CONFIG_MM_BACKTRACE >= 0
static ssize_t proc_heap(FAR struct proc_file_s *procfile,
FAR struct tcb_s *tcb, FAR char *buffer,
size_t buflen, off_t offset)
@@ -1575,7 +1575,7 @@ static ssize_t proc_read(FAR struct file *filep, FAR char *buffer,
ret = proc_critmon(procfile, tcb, buffer, buflen, filep->f_pos);
break;
#endif
#ifdef CONFIG_MM_BACKTRACE
#if CONFIG_MM_BACKTRACE >= 0
case PROC_HEAP: /* Task heap info */
ret = proc_heap(procfile, tcb, buffer, buflen, filep->f_pos);
break;