(no title)
ot | 1 month ago
This is not well documented unfortunately, and I'm not aware of open-source implementations of this.
EDIT: Or maybe not, I'm not sure if PERF_COUNT_SW_TASK_CLOCK allows to select only user time. The kernel can definitely do it, but I don't know if the wiring is there. However this definitely works for overall thread CPU time.
jerrinot|1 month ago
ot|1 month ago
nly|1 month ago
Presumably you mean you just double check the page value after the rdtsc to make sure it hasn't changed and retry if it has?
Tbh I thought clock_gettime was a vdso based virtual syscall anyway
ot|1 month ago
Yes, that's exactly what a seqlock (reader) is.
unknown|1 month ago
[deleted]
mgaunard|1 month ago
jerrinot|1 month ago