mirror of
https://github.com/GorgonMeducer/perf_counter.git
synced 2025-01-17 19:13:03 +08:00
v2.2.4
This commit is contained in:
parent
d9557b59ba
commit
f6bf640649
@ -16,7 +16,13 @@
|
||||
<repository type="git">https://github.com/GorgonMeducer/perf_counter.git</repository>
|
||||
|
||||
<releases>
|
||||
<release date="2023-08-30" version="2.2.3" url="https://raw.githubusercontent.com/GorgonMeducer/perf_counter/CMSIS-Pack/cmsis-pack/GorgonMeducer.perf_counter.2.2.3.pack">
|
||||
<release date="2023-10-19" version="2.2.4" url="https://raw.githubusercontent.com/GorgonMeducer/perf_counter/CMSIS-Pack/cmsis-pack/GorgonMeducer.perf_counter.2.2.4.pack">
|
||||
- Add support for RT-Thread-nano
|
||||
- Add an API for checking stack overflow
|
||||
- Improve the support for the Arm Compiler 6.21
|
||||
- Other minor updates
|
||||
</release>
|
||||
<release date="2023-08-30" version="2.2.3" url="https://github.com/GorgonMeducer/perf_counter/raw/5660b13ea30005e31fa713cb4e6c6d7dbe0bcaa3/cmsis-pack/GorgonMeducer.perf_counter.2.2.3.pack">
|
||||
- Mitigate time-rolling-back issue when calling get_system_ticks in exception handlers that have higher priorities than the SysTick_Handler.
|
||||
- Other minor updates
|
||||
</release>
|
||||
|
@ -1,4 +1,4 @@
|
||||
# perf_counter (v2.2.4-dev)
|
||||
# perf_counter (v2.2.4)
|
||||
A dedicated performance counter for Cortex-M Systick. It shares the SysTick with users' original SysTick function(s) without interfering with it. This library will bring new functionalities, such as performance counter,` delay_us` and `clock()` service defined in `time.h`.
|
||||
|
||||
### Features:
|
||||
@ -31,7 +31,8 @@ A dedicated performance counter for Cortex-M Systick. It shares the SysTick with
|
||||
- **Support both RTOS and bare-metal environments**
|
||||
- Support SysTick Reconfiguration
|
||||
- Support changing System Frequency
|
||||
|
||||
- **[new]** Support stack-overflow detection in RTOS environment via `perfc_check_task_stack_canary_safe()`
|
||||
|
||||
- **Utilities for C language enhancement**
|
||||
- Macros to detect compilers, e.g. `__IS_COMPILER_ARM_COMPILER_6__`, `__IS_COMPILER_LLVM__` etc.
|
||||
- Macro to create atomicity for specified code block, i.e. `__IRQ_SAFE{...}`
|
||||
|
Binary file not shown.
@ -16,7 +16,13 @@
|
||||
<repository type="git">https://github.com/GorgonMeducer/perf_counter.git</repository>
|
||||
|
||||
<releases>
|
||||
<release date="2023-08-30" version="2.2.3" url="https://raw.githubusercontent.com/GorgonMeducer/perf_counter/CMSIS-Pack/cmsis-pack/GorgonMeducer.perf_counter.2.2.3.pack">
|
||||
<release date="2023-10-19" version="2.2.4" url="https://raw.githubusercontent.com/GorgonMeducer/perf_counter/CMSIS-Pack/cmsis-pack/GorgonMeducer.perf_counter.2.2.4.pack">
|
||||
- Add support for RT-Thread-nano
|
||||
- Add an API for checking stack overflow
|
||||
- Improve the support for the Arm Compiler 6.21
|
||||
- Other minor updates
|
||||
</release>
|
||||
<release date="2023-08-30" version="2.2.3" url="https://github.com/GorgonMeducer/perf_counter/raw/5660b13ea30005e31fa713cb4e6c6d7dbe0bcaa3/cmsis-pack/GorgonMeducer.perf_counter.2.2.3.pack">
|
||||
- Mitigate time-rolling-back issue when calling get_system_ticks in exception handlers that have higher priorities than the SysTick_Handler.
|
||||
- Other minor updates
|
||||
</release>
|
||||
|
@ -2,8 +2,8 @@
|
||||
<index schemaVersion="1.0.0" xs:noNamespaceSchemaLocation="PackIndex.xsd" xmlns:xs="http://www.w3.org/2001/XMLSchema-instance">
|
||||
<vendor>GorgonMeducer</vendor>
|
||||
<url>https://raw.githubusercontent.com/GorgonMeducer/perf_counter/CMSIS-Pack/cmsis-pack/</url>
|
||||
<timestamp>2023-06-12T08:36:00</timestamp>
|
||||
<timestamp>2023-10-19T22:47:00</timestamp>
|
||||
<pindex>
|
||||
<pdsc url="https://raw.githubusercontent.com/GorgonMeducer/perf_counter/CMSIS-Pack/cmsis-pack/" vendor="GorgonMeducer" name="perf_counter" version="2.2.2"/>
|
||||
<pdsc url="https://raw.githubusercontent.com/GorgonMeducer/perf_counter/CMSIS-Pack/cmsis-pack/" vendor="GorgonMeducer" name="perf_counter" version="2.2.4"/>
|
||||
</pindex>
|
||||
</index>
|
||||
|
@ -10,6 +10,7 @@
|
||||
<project>
|
||||
<PathAndName>.\example.uvprojx</PathAndName>
|
||||
<NodeIsActive>1</NodeIsActive>
|
||||
<NodeIsExpanded>1</NodeIsExpanded>
|
||||
</project>
|
||||
|
||||
<project>
|
||||
|
@ -73,9 +73,9 @@
|
||||
<LExpSel>0</LExpSel>
|
||||
</OPTXL>
|
||||
<OPTFL>
|
||||
<tvExp>0</tvExp>
|
||||
<tvExp>1</tvExp>
|
||||
<tvExpOptDlg>0</tvExpOptDlg>
|
||||
<IsCurrentTarget>1</IsCurrentTarget>
|
||||
<IsCurrentTarget>0</IsCurrentTarget>
|
||||
</OPTFL>
|
||||
<CpuCode>7</CpuCode>
|
||||
<DebugOpt>
|
||||
@ -297,7 +297,7 @@
|
||||
<OPTFL>
|
||||
<tvExp>1</tvExp>
|
||||
<tvExpOptDlg>0</tvExpOptDlg>
|
||||
<IsCurrentTarget>0</IsCurrentTarget>
|
||||
<IsCurrentTarget>1</IsCurrentTarget>
|
||||
</OPTFL>
|
||||
<CpuCode>7</CpuCode>
|
||||
<DebugOpt>
|
||||
|
@ -75,7 +75,7 @@
|
||||
<OPTFL>
|
||||
<tvExp>1</tvExp>
|
||||
<tvExpOptDlg>0</tvExpOptDlg>
|
||||
<IsCurrentTarget>1</IsCurrentTarget>
|
||||
<IsCurrentTarget>0</IsCurrentTarget>
|
||||
</OPTFL>
|
||||
<CpuCode>7</CpuCode>
|
||||
<DebugOpt>
|
||||
@ -278,9 +278,9 @@
|
||||
<LExpSel>0</LExpSel>
|
||||
</OPTXL>
|
||||
<OPTFL>
|
||||
<tvExp>1</tvExp>
|
||||
<tvExp>0</tvExp>
|
||||
<tvExpOptDlg>0</tvExpOptDlg>
|
||||
<IsCurrentTarget>0</IsCurrentTarget>
|
||||
<IsCurrentTarget>1</IsCurrentTarget>
|
||||
</OPTFL>
|
||||
<CpuCode>7</CpuCode>
|
||||
<DebugOpt>
|
||||
|
Binary file not shown.
@ -37,7 +37,7 @@ extern "C" {
|
||||
#define __PERF_COUNTER_VER_MINOR__ 2
|
||||
#define __PERF_COUNTER_VER_REVISE__ 4
|
||||
|
||||
#define __PERF_COUNTER_VER_STR__ "dev"
|
||||
#define __PERF_COUNTER_VER_STR__ ""
|
||||
|
||||
#define __PER_COUNTER_VER__ (__PERF_COUNTER_VER_MAJOR__ * 10000ul \
|
||||
+__PERF_COUNTER_VER_MINOR__ * 100ul \
|
||||
@ -722,6 +722,13 @@ bool __perfc_is_time_out(int64_t lPeriod, int64_t *plTimestamp, bool bAutoReload
|
||||
*/
|
||||
extern void init_task_cycle_counter(void);
|
||||
|
||||
/*! \brief check whether the task stack canary is safe or not
|
||||
* \retval false likely to be a stack-overflow
|
||||
* \retval true task stack is safe
|
||||
*/
|
||||
extern
|
||||
bool perfc_check_task_stack_canary_safe(void);
|
||||
|
||||
/*! \brief provide cycle information for target task
|
||||
* \details Support RTOS List:
|
||||
* - RTX5
|
||||
|
Binary file not shown.
@ -537,6 +537,24 @@ void init_task_cycle_counter(void)
|
||||
ptRootAgent->wMagicWord = MAGIC_WORD_CANARY;
|
||||
}
|
||||
|
||||
bool perfc_check_task_stack_canary_safe(void)
|
||||
{
|
||||
struct __task_cycle_info_t * ptRootAgent =
|
||||
(struct __task_cycle_info_t *)get_rtos_task_cycle_info();
|
||||
do {
|
||||
if (NULL == ptRootAgent) {
|
||||
break;
|
||||
}
|
||||
|
||||
if ( (ptRootAgent->wMagicWord = MAGIC_WORD_CANARY)
|
||||
|| (ptRootAgent->wMagicWord = MAGIC_WORD_AGENT_LIST_VALID)) {
|
||||
return true;
|
||||
}
|
||||
} while(0);
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
task_cycle_info_t *init_task_cycle_info(task_cycle_info_t *ptInfo)
|
||||
{
|
||||
do {
|
||||
|
@ -37,7 +37,7 @@ extern "C" {
|
||||
#define __PERF_COUNTER_VER_MINOR__ 2
|
||||
#define __PERF_COUNTER_VER_REVISE__ 4
|
||||
|
||||
#define __PERF_COUNTER_VER_STR__ "dev"
|
||||
#define __PERF_COUNTER_VER_STR__ ""
|
||||
|
||||
#define __PER_COUNTER_VER__ (__PERF_COUNTER_VER_MAJOR__ * 10000ul \
|
||||
+__PERF_COUNTER_VER_MINOR__ * 100ul \
|
||||
@ -722,6 +722,13 @@ bool __perfc_is_time_out(int64_t lPeriod, int64_t *plTimestamp, bool bAutoReload
|
||||
*/
|
||||
extern void init_task_cycle_counter(void);
|
||||
|
||||
/*! \brief check whether the task stack canary is safe or not
|
||||
* \retval false likely to be a stack-overflow
|
||||
* \retval true task stack is safe
|
||||
*/
|
||||
extern
|
||||
bool perfc_check_task_stack_canary_safe(void);
|
||||
|
||||
/*! \brief provide cycle information for target task
|
||||
* \details Support RTOS List:
|
||||
* - RTX5
|
||||
|
Loading…
x
Reference in New Issue
Block a user