Skip to content

Commit 29b64e1

Browse files
authored
Merge pull request #8761 from kegilbert/add-all-stats-config-opt
Add MBED_ALL_STATS_ENABLED to config system
2 parents 436644b + 2a9c930 commit 29b64e1

File tree

2 files changed

+19
-0
lines changed

2 files changed

+19
-0
lines changed

platform/mbed_lib.json

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,12 @@
7272
"value": null
7373
},
7474

75+
"all-stats-enabled": {
76+
"macro_name": "MBED_ALL_STATS_ENABLED",
77+
"help": "Set to 1 to enable all platform stats. When enabled the functions mbed_stats_*_get returns non-zero data. See mbed_stats.h for more information",
78+
"value": null
79+
},
80+
7581
"sys-stats-enabled": {
7682
"macro_name": "MBED_SYS_STATS_ENABLED",
7783
"help": "Set to 1 to enable system stats. When enabled the function mbed_stats_sys_get returns non-zero data. See mbed_stats.h for more information",
@@ -106,6 +112,7 @@
106112
"help": "HTTP URL string for ARM Mbed-OS Error Decode microsite",
107113
"value": "\"\\nFor more info, visit: https://armmbed.github.io/mbedos-error/?error=0x%08X\""
108114
},
115+
109116
"cthunk_count_max": {
110117
"help": "The maximum CThunk objects used at the same time. This must be greater than 0 and less 256",
111118
"value": 8

platform/mbed_stats.h

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,13 +31,25 @@ extern "C" {
3131
#endif
3232

3333
#ifdef MBED_ALL_STATS_ENABLED
34+
35+
#ifndef MBED_SYS_STATS_ENABLED
3436
#define MBED_SYS_STATS_ENABLED 1
37+
#endif
38+
#ifndef MBED_STACK_STATS_ENABLED
3539
#define MBED_STACK_STATS_ENABLED 1
40+
#endif
41+
#ifndef MBED_CPU_STATS_ENABLED
3642
#define MBED_CPU_STATS_ENABLED 1
43+
#endif
44+
#ifndef MBED_HEAP_STATS_ENABLED
3745
#define MBED_HEAP_STATS_ENABLED 1
46+
#endif
47+
#ifndef MBED_THREAD_STATS_ENABLED
3848
#define MBED_THREAD_STATS_ENABLED 1
3949
#endif
4050

51+
#endif // MBED_ALL_STATS_ENABLED
52+
4153
/** Maximum memory regions reported by mbed-os memory statistics */
4254
#define MBED_MAX_MEM_REGIONS 4
4355

0 commit comments

Comments
 (0)