Skip to content

Commit

Permalink
Merge pull request #8761 from kegilbert/add-all-stats-config-opt
Browse files Browse the repository at this point in the history
Add MBED_ALL_STATS_ENABLED to config system
  • Loading branch information
0xc0170 committed Nov 27, 2018
2 parents 436644b + 2a9c930 commit 29b64e1
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 0 deletions.
7 changes: 7 additions & 0 deletions platform/mbed_lib.json
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,12 @@
"value": null
},

"all-stats-enabled": {
"macro_name": "MBED_ALL_STATS_ENABLED",
"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",
"value": null
},

"sys-stats-enabled": {
"macro_name": "MBED_SYS_STATS_ENABLED",
"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",
Expand Down Expand Up @@ -106,6 +112,7 @@
"help": "HTTP URL string for ARM Mbed-OS Error Decode microsite",
"value": "\"\\nFor more info, visit: https://armmbed.github.io/mbedos-error/?error=0x%08X\""
},

"cthunk_count_max": {
"help": "The maximum CThunk objects used at the same time. This must be greater than 0 and less 256",
"value": 8
Expand Down
12 changes: 12 additions & 0 deletions platform/mbed_stats.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,13 +31,25 @@ extern "C" {
#endif

#ifdef MBED_ALL_STATS_ENABLED

#ifndef MBED_SYS_STATS_ENABLED
#define MBED_SYS_STATS_ENABLED 1
#endif
#ifndef MBED_STACK_STATS_ENABLED
#define MBED_STACK_STATS_ENABLED 1
#endif
#ifndef MBED_CPU_STATS_ENABLED
#define MBED_CPU_STATS_ENABLED 1
#endif
#ifndef MBED_HEAP_STATS_ENABLED
#define MBED_HEAP_STATS_ENABLED 1
#endif
#ifndef MBED_THREAD_STATS_ENABLED
#define MBED_THREAD_STATS_ENABLED 1
#endif

#endif // MBED_ALL_STATS_ENABLED

/** Maximum memory regions reported by mbed-os memory statistics */
#define MBED_MAX_MEM_REGIONS 4

Expand Down

0 comments on commit 29b64e1

Please sign in to comment.