-
Notifications
You must be signed in to change notification settings - Fork 134
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
[PATCH v3] timer: tick does not need to start from zero #1968
Conversation
9f1c7c7
to
84ebace
Compare
test/performance/odp_timer_perf.c
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Copyright can be updated.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed in v3
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Copyright can be updated.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed in v3
platform/linux-generic/odp_timer.c
Outdated
@@ -1471,16 +1453,15 @@ void odp_timer_pool_destroy(odp_timer_pool_t tpid) | |||
|
|||
uint64_t odp_timer_current_tick(odp_timer_pool_t tpid) | |||
{ | |||
timer_pool_t *tp = timer_pool_from_hdl(tpid); | |||
(void)tpid; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ODP_UNUSED
would save one line.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cast to void is used with other inline functions. This function moves into inline header in the next patch.
Check that ticks and converted nanosecond value will not wrap in 10 years. Signed-off-by: Petri Savolainen <petri.savolainen@nokia.com> Reviewed-by: Matias Elo <matias.elo@nokia.com>
Measure and report timer start cycles in expire and start mode (-m 2). Signed-off-by: Petri Savolainen <petri.savolainen@nokia.com> Reviewed-by: Matias Elo <matias.elo@nokia.com>
API does not require tick to start from zero. Optimize timer implementation by removing per timer pool start time subtraction. Signed-off-by: Petri Savolainen <petri.savolainen@nokia.com> Reviewed-by: Matias Elo <matias.elo@nokia.com>
Inline current tick function as it does not depend on timer pool structure any more. Signed-off-by: Petri Savolainen <petri.savolainen@nokia.com> Reviewed-by: Matias Elo <matias.elo@nokia.com>
84ebace
to
5ceb9fb
Compare
Optimize timer current tick and other functions by using nsec time directly as the tick. API does not require tick to start from zero.