This is the mail archive of the systemtap@sourceware.org mailing list for the systemtap project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] tapset: add a tapset function for reading epoch time in ARM


Hi -

> gettimeofday_ns() for ARM is implemented to return a fake value because
> it depends on get_cycles() which returns 0 in ARM. This patch adds
> a tapset function which uses getnstimeofday() for collecting epoch time.
> [...]

(Another way could be to wrap getnstimeofday into a get_cycles()
emulation function that the normal runtime/time.c code could use.)

Please note that the reason that the other architectures don't just
call getnstimeofday() or equivalent functions is because these are (or
have been) unsafe to call from arbitrary probe contexts, such as
interrupt-related tracepoints, or kprobes triggered from the vicinity
of the clock functions.  It was found to be better to give an
approximate time from all contexts rather than letting the kernel
crash from some of them.  Please analyze whether this is still an
issue for you. 

- FChE


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]