Revision 5c9e9b9d
core/inc/aos_thread.h | ||
---|---|---|
99 | 99 |
extern "C" { |
100 | 100 |
#endif |
101 | 101 |
void aosThdSleepUntilS(const aos_timestamp_t* t); |
102 |
#if (CH_DBG_FILL_THREADS == TRUE) |
|
102 |
#if (AMIROOS_CFG_DBG == true) && (CH_DBG_FILL_THREADS == TRUE)
|
|
103 | 103 |
size_t aosThdGetStackPeakUtilization(thread_t* thread); |
104 | 104 |
#endif |
105 | 105 |
#ifdef __cplusplus |
... | ... | |
240 | 240 |
return; |
241 | 241 |
} |
242 | 242 |
|
243 |
#if (AMIROOS_CFG_DBG == true) || defined(__DOXYGEN__) |
|
244 |
|
|
243 | 245 |
/** |
244 | 246 |
* @brief Retrieve the stack size of a specific thread in bytes. |
245 | 247 |
* |
... | ... | |
263 | 265 |
((size_t)PORT_GUARD_PAGE_SIZE + sizeof(struct port_intctx) + sizeof(struct port_extctx) + (size_t)PORT_INT_REQUIRED_STACK); |
264 | 266 |
} |
265 | 267 |
|
268 |
#endif /* AMIROOS_CFG_DBG == true */ |
|
269 |
|
|
266 | 270 |
#endif /* _AMIROOS_THREAD_H_ */ |
267 | 271 |
|
268 | 272 |
/** @} */ |
core/src/aos_system.c | ||
---|---|---|
523 | 523 |
chprintf(stream, "\tnumber of commands: %u\n", aosShellCountCommands(&aos.shell)); |
524 | 524 |
chprintf(stream, "\tmaximum line width: %u characters\n", aos.shell.linesize); |
525 | 525 |
chprintf(stream, "\tmaximum #arguments: %u\n", aos.shell.arglistsize); |
526 |
#if (AMIROOS_CFG_DBG == true) |
|
526 | 527 |
chprintf(stream, "\tshell thread stack size: %u bytes\n", aosThdGetStacksize(aos.shell.thread)); |
527 | 528 |
#if (CH_DBG_FILL_THREADS == TRUE) |
528 | 529 |
chprintf(stream, "\tstack peak utilization: %u bytes (%.2f%%)\n", aosThdGetStackPeakUtilization(aos.shell.thread), (float)aosThdGetStackPeakUtilization(aos.shell.thread) / (float)aosThdGetStacksize(aos.shell.thread) * 100.0f); |
529 | 530 |
#endif /* CH_DBG_FILL_THREADS == TRUE */ |
531 |
#endif /* AMIROOS_CFG_DBG == true */ |
|
530 | 532 |
_printSystemInfoSeparator(stream, '=', SYSTEM_INFO_WIDTH); |
531 | 533 |
#endif /* AMIROOS_CFG_SHELL_ENABLE == true */ |
532 | 534 |
|
core/src/aos_thread.c | ||
---|---|---|
57 | 57 |
return; |
58 | 58 |
} |
59 | 59 |
|
60 |
#if (CH_DBG_FILL_THREADS == TRUE) || defined(__DOXYGEN__)
|
|
60 |
#if ((AMIROOS_CFG_DBG == true) && (CH_DBG_FILL_THREADS == TRUE)) || defined(__DOXYGEN__)
|
|
61 | 61 |
/** |
62 | 62 |
* @brief Calculate the peak stack utilization for a specific thread so far in bytes. |
63 | 63 |
* |
... | ... | |
81 | 81 |
|
82 | 82 |
return util; |
83 | 83 |
} |
84 |
#endif /* CH_DBG_FILL_THREADS == TRUE */
|
|
84 |
#endif /* (AMIROOS_CFG_DBG == true) && (CH_DBG_FILL_THREADS == TRUE) */
|
|
85 | 85 |
|
86 | 86 |
/** @} */ |
Also available in: Unified diff