This is the mail archive of the
systemtap@sourceware.org
mailing list for the systemtap project.
Re: [PATCH] tapset: add a tapset function for reading epoch time in ARM
- From: "Frank Ch. Eigler" <fche at redhat dot com>
- To: Jey Jay <rjayavrp2 at gmail dot com>
- Cc: systemtap at sourceware dot org, jeyaraman dot rangasamy at lge dot com
- Date: Thu, 12 Jun 2014 06:38:20 -0400
- Subject: Re: [PATCH] tapset: add a tapset function for reading epoch time in ARM
- Authentication-results: sourceware.org; auth=none
- References: <CAAKGpwRhhQAcCkATd4LAPxFnvH6M99PeCwzD33aVXpSNAmwFVg at mail dot gmail dot com>
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