Code Review
/
vpp.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
calculate per-thread time offset
[vpp.git]
/
src
/
vlib
/
main.h
diff --git
a/src/vlib/main.h
b/src/vlib/main.h
index
f89ecd3
..
4192c3f
100644
(file)
--- a/
src/vlib/main.h
+++ b/
src/vlib/main.h
@@
-63,6
+63,9
@@
typedef struct vlib_main_t
CLIB_CACHE_LINE_ALIGN_MARK (cacheline0);
/* Instruction level timing state. */
clib_time_t clib_time;
CLIB_CACHE_LINE_ALIGN_MARK (cacheline0);
/* Instruction level timing state. */
clib_time_t clib_time;
+ /* Offset from main thread time */
+ f64 time_offset;
+ f64 time_last_barrier_release;
/* Time stamp of last node dispatch. */
u64 cpu_time_last_node_dispatch;
/* Time stamp of last node dispatch. */
u64 cpu_time_last_node_dispatch;
@@
-232,7
+235,7
@@
void vlib_worker_loop (vlib_main_t * vm);
always_inline f64
vlib_time_now (vlib_main_t * vm)
{
always_inline f64
vlib_time_now (vlib_main_t * vm)
{
- return clib_time_now (&vm->clib_time);
+ return clib_time_now (&vm->clib_time)
+ vm->time_offset
;
}
always_inline f64
}
always_inline f64