mirror of
https://github.com/GorgonMeducer/perf_counter.git
synced 2025-02-07 19:34:18 +08:00
minor update
This commit is contained in:
parent
a05b2d2c24
commit
9c06e5bc58
@ -1,6 +1,6 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
|
||||||
<package schemaVersion="1.4" xmlns:xs="http://www.w3.org/2001/XMLSchema-instance" xs:noNamespaceSchemaLocation="PACK.xsd">
|
<package schemaVersion="1.7.7" xmlns:xs="http://www.w3.org/2001/XMLSchema-instance" xs:noNamespaceSchemaLocation="https://raw.githubusercontent.com/Open-CMSIS-Pack/Open-CMSIS-Pack-Spec/v1.7.7/schema/PACK.xsd">
|
||||||
<vendor>GorgonMeducer</vendor>
|
<vendor>GorgonMeducer</vendor>
|
||||||
<name>perf_counter</name>
|
<name>perf_counter</name>
|
||||||
<description>A dedicated performance counter for the Cortex-M Systick. It shares the SysTick with users' original SysTick function without interfering with it. This library will bring new functionalities, such as performance counter, delay_us and clock() service defined in time.h</description>
|
<description>A dedicated performance counter for the Cortex-M Systick. It shares the SysTick with users' original SysTick function without interfering with it. This library will bring new functionalities, such as performance counter, delay_us and clock() service defined in time.h</description>
|
||||||
|
Binary file not shown.
@ -1,6 +1,6 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
|
||||||
<package schemaVersion="1.4" xmlns:xs="http://www.w3.org/2001/XMLSchema-instance" xs:noNamespaceSchemaLocation="PACK.xsd">
|
<package schemaVersion="1.7.7" xmlns:xs="http://www.w3.org/2001/XMLSchema-instance" xs:noNamespaceSchemaLocation="https://raw.githubusercontent.com/Open-CMSIS-Pack/Open-CMSIS-Pack-Spec/v1.7.7/schema/PACK.xsd">
|
||||||
<vendor>GorgonMeducer</vendor>
|
<vendor>GorgonMeducer</vendor>
|
||||||
<name>perf_counter</name>
|
<name>perf_counter</name>
|
||||||
<description>A dedicated performance counter for the Cortex-M Systick. It shares the SysTick with users' original SysTick function without interfering with it. This library will bring new functionalities, such as performance counter, delay_us and clock() service defined in time.h</description>
|
<description>A dedicated performance counter for the Cortex-M Systick. It shares the SysTick with users' original SysTick function without interfering with it. This library will bring new functionalities, such as performance counter, delay_us and clock() service defined in time.h</description>
|
||||||
|
@ -22,7 +22,7 @@ if [ `uname -s` = "Linux" ]
|
|||||||
PATH_TO_ADD="$CMSIS_PACK_PATH/CMSIS/Utilities/Linux64/"
|
PATH_TO_ADD="$CMSIS_PACK_PATH/CMSIS/Utilities/Linux64/"
|
||||||
else
|
else
|
||||||
CMSIS_PACK_PATH="/C/Users/gabriel/AppData/Local/Arm/Packs/ARM/CMSIS/5.9.0"
|
CMSIS_PACK_PATH="/C/Users/gabriel/AppData/Local/Arm/Packs/ARM/CMSIS/5.9.0"
|
||||||
PATH_TO_ADD="/C/Program Files (x86)/7-Zip/:$CMSIS_PACK_PATH/CMSIS/Utilities/Win32/:/C/xmllint/"
|
PATH_TO_ADD="/C/Program Files/7-Zip/:$CMSIS_PACK_PATH/CMSIS/Utilities/Win32/:/C/xmllint/"
|
||||||
fi
|
fi
|
||||||
[[ ":$PATH:" != *":$PATH_TO_ADD}:"* ]] && PATH="${PATH}:${PATH_TO_ADD}"
|
[[ ":$PATH:" != *":$PATH_TO_ADD}:"* ]] && PATH="${PATH}:${PATH_TO_ADD}"
|
||||||
echo $PATH_TO_ADD appended to PATH
|
echo $PATH_TO_ADD appended to PATH
|
||||||
|
@ -80,10 +80,12 @@ task_cycle_info_t * get_rtos_task_cycle_info(void)
|
|||||||
|
|
||||||
void __perf_os_patch_init(void)
|
void __perf_os_patch_init(void)
|
||||||
{
|
{
|
||||||
#ifdef PKG_USING_PERF_COUNTER
|
#ifdef PKG_PERF_COUNTER_USING_THREAD_STATISTIC
|
||||||
rt_tick_sethook(user_code_insert_to_systick_handler);
|
rt_tick_sethook(user_code_insert_to_systick_handler);
|
||||||
#endif
|
#endif
|
||||||
|
#if !defined(PKG_USING_PERF_COUNTER) || (defined(PKG_PERF_COUNTER_USING_THREAD_STATISTIC))
|
||||||
rt_scheduler_sethook(__rt_thread_scheduler_hook);
|
rt_scheduler_sethook(__rt_thread_scheduler_hook);
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef PKG_USING_PERF_COUNTER
|
#ifdef PKG_USING_PERF_COUNTER
|
||||||
@ -91,6 +93,7 @@ void __ensure_systick_wrapper(void)
|
|||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef PKG_PERF_COUNTER_USING_THREAD_STATISTIC
|
||||||
#define DBG_TAG "perf_counter"
|
#define DBG_TAG "perf_counter"
|
||||||
#define DBG_LVL DBG_INFO
|
#define DBG_LVL DBG_INFO
|
||||||
#include <rtdbg.h>
|
#include <rtdbg.h>
|
||||||
@ -103,4 +106,5 @@ static int _perf_counter_init(void)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
INIT_PREV_EXPORT(_perf_counter_init);
|
INIT_PREV_EXPORT(_perf_counter_init);
|
||||||
|
#endif /* PKG_PERF_COUNTER_USING_THREAD_STATISTIC */
|
||||||
#endif /* PKG_USING_PERF_COUNTER */
|
#endif /* PKG_USING_PERF_COUNTER */
|
||||||
|
Loading…
x
Reference in New Issue
Block a user