-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update clock speed #13293
Update clock speed #13293
Conversation
@GUIDINGLI please fix typo: MARCO -> MACRO Please add commit log explaining why to convert it to MACRO |
f589b53
to
a809572
Compare
done |
Thank you @GUIDINGLI you just missed the commit message, please just explain there why to convert the function to MACRO |
970e813
to
62c1b29
Compare
@GUIDINGLI please fix the conflict. |
Signed-off-by: ligd <liguiding1@xiaomi.com>
Signed-off-by: liaoao <liaoao@xiaomi.com> Signed-off-by: ligd <liguiding1@xiaomi.com>
Signed-off-by: ligd <liguiding1@xiaomi.com>
Using the ts/tick conversion functions provided in clock.h Do this caused we want speed up the time calculation, so change: clock_time2ticks, clock_ticks2time, clock_timespec_add, clock_timespec_compare, clock_timespec_subtract... to MACRO Signed-off-by: ligd <liguiding1@xiaomi.com>
Signed-off-by: ligd <liguiding1@xiaomi.com>
Signed-off-by: ligd <liguiding1@xiaomi.com>
Signed-off-by: ligd <liguiding1@xiaomi.com>
Signed-off-by: ligd <liguiding1@xiaomi.com>
Signed-off-by: ligd <liguiding1@xiaomi.com>
Signed-off-by: ligd <liguiding1@xiaomi.com>
https: //coverity.pt.xiaomi.com/#/project-view/10098/10010?selectedIssue=1275849 Signed-off-by: zhangyuan29 <zhangyuan29@xiaomi.com> Signed-off-by: ligd <liguiding1@xiaomi.com>
CID 1266677: (#2 of 2): Use 32-bit time_t (Y2K38_SAFETY) 1. declaration_with_small_time_t: Declare use of time_t, which is defined as 32 bits wide on this platform, while the minimum safe width is 64. Signed-off-by: yinshengkai <yinshengkai@xiaomi.com> Signed-off-by: ligd <liguiding1@xiaomi.com>
Signed-off-by: ligd <liguiding1@xiaomi.com>
Signed-off-by: ligd <liguiding1@xiaomi.com>
64-by-32-bit divisions are prominent in the NuttX, even on 32-bit machines. Luckily, many of them use a constant divisor that allows for a much faster multiplication by the divisor's reciprocal. The compiler already performs this optimization when compiling a 32-by-32 division with a constant divisor. Unfortunately, on 32-bit machines, gcc does not optimize 64-by-32 divisions in that case, except for constant divisors that happen to be a power of 2. Let's avoid the slow path whenever the divisor is constant by manually computing the reciprocal ourselves and performing the multiplication inline. In most cases, this improves performance of 64-by-32 divisions by about two orders of magnitude compared to the __div64_32() fallback, especially on architectures lacking a native div instruction. Signed-off-by: ligd <liguiding1@xiaomi.com>
https://coverity.pt.xiaomi.com/#/project-view/10098/10010?selectedIssue=1266083 Signed-off-by: zhangyuan29 <zhangyuan29@xiaomi.com> Signed-off-by: ligd <liguiding1@xiaomi.com>
Signed-off-by: ligd <liguiding1@xiaomi.com>
Summary
Update clock system, do this caused we want speed up the time calculation, so change:
clock_time2ticks, clock_ticks2time, clock_timespec_add, clock_timespec_compare, clock_timespec_subtract
to MACRO
mainly include:
Impact
clock
Testing
Vela bes board, sim