|
|
|
|
|
|
|
|
|
|
xen-changelog
[Xen-changelog] Add get_cycles(), to be defined in asm/time.h, as a
# HG changeset patch
# User kaf24@xxxxxxxxxxxxxxxxxxxx
# Node ID f1b6dd997716d28ea40d201450c1d29c80eb58fc
# Parent 6be0d21bb8638e63db97588324ffe4f3d3a24e8c
Add get_cycles(), to be defined in asm/time.h, as a
generic method to access cpu-specific local cycle counter.
Signed-off-by: Keir Fraser <keir@xxxxxxxxxxxxx>
diff -r 6be0d21bb863 -r f1b6dd997716 xen/common/trace.c
--- a/xen/common/trace.c Mon Oct 31 16:14:59 2005
+++ b/xen/common/trace.c Tue Nov 1 09:28:41 2005
@@ -260,7 +260,7 @@
}
rec = &t_recs[smp_processor_id()][buf->prod % nr_recs];
- rdtscll(rec->cycles);
+ rec->cycles = (u64)get_cycles();
rec->event = event;
rec->data[0] = d1;
rec->data[1] = d2;
diff -r 6be0d21bb863 -r f1b6dd997716 xen/include/asm-x86/time.h
--- a/xen/include/asm-x86/time.h Mon Oct 31 16:14:59 2005
+++ b/xen/include/asm-x86/time.h Tue Nov 1 09:28:41 2005
@@ -1,6 +1,8 @@
#ifndef __X86_TIME_H__
#define __X86_TIME_H__
+
+#include <asm/msr.h>
extern int timer_ack;
@@ -10,4 +12,13 @@
struct domain;
extern void init_domain_time(struct domain *d);
+typedef u64 cycles_t;
+
+static inline cycles_t get_cycles(void)
+{
+ cycles_t c;
+ rdtscll(c);
+ return c;
+}
+
#endif /* __X86_TIME_H__ */
_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog
|
<Prev in Thread] |
Current Thread |
[Next in Thread> |
- [Xen-changelog] Add get_cycles(), to be defined in asm/time.h, as a,
Xen patchbot -unstable <=
|
|
|
|
|