[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-devel] [PATCH V2 6/9] xentrace: Support for ARM platform

Modified to provide support for xentrace on the ARM platform. Moved
get_cycles() to time.c and modified to return the core timestamp tick
count for use by the trace buffer timestamping routines in xentrace.
get_cycles() was moved to the C file to avoid including the register
specific header file in time.h and to commonize it with the
get_s_time() function.

get_s_time() was also modified to now use the updated get_cycles() to
retrieve the tick count instead of directly reading it.

Signed-off-by: Benjamin Sanda <ben.sanda@xxxxxxxxxxxxxxx>
 xen/arch/arm/time.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/xen/arch/arm/time.c b/xen/arch/arm/time.c
index 7dae28b..9aface3 100644
--- a/xen/arch/arm/time.c
+++ b/xen/arch/arm/time.c
@@ -192,10 +192,17 @@ int __init init_xen_time(void)
 /* Return number of nanoseconds since boot */
 s_time_t get_s_time(void)
-    uint64_t ticks = READ_SYSREG64(CNTPCT_EL0) - boot_count;
+    cycles_t ticks = get_cycles();
     return ticks_to_ns(ticks);
+/* Return the number of ticks since boot */
+cycles_t get_cycles(void)
+        /* return raw tick count of main timer */
+        return READ_SYSREG64(CNTPCT_EL0) - boot_count;
 /* Set the timer to wake us up at a particular time.
  * Timeout is a Xen system time (nanoseconds since boot); 0 disables the timer.
  * Returns 1 on success; 0 if the timeout is too soon or is in the past. */

Xen-devel mailing list



Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.