Displaying 2 results from an estimated 2 matches for "tsc_end".
2007 Apr 18
1
[RFC, PATCH 21/24] i386 Vmi proc node
...line unsigned long long get_tsc(void)
+{
+ unsigned long long tsc;
+ asm volatile("rdtsc" : "=&A" (tsc));
+ return tsc;
+}
+
+static unsigned long long hypercall_cycles = 0xffffffffULL;
+static void time_hypercall(void)
+{
+ unsigned long long tsc_start, tsc_end, cycles;
+ int i;
+ for (i = 0; i < 1000; i++) {
+ tsc_start = get_tsc();
+ vmi_rdtsc();
+ tsc_end = get_tsc();
+ cycles = tsc_end - tsc_start;
+ if (cycles < hypercall_cycles)
+ hypercall_cycles = cycles;
+ }
+}
+
+static unsigned long long page_fault_cycles = 0xffffffffULL;
+static v...
2007 Apr 18
1
[RFC, PATCH 21/24] i386 Vmi proc node
...line unsigned long long get_tsc(void)
+{
+ unsigned long long tsc;
+ asm volatile("rdtsc" : "=&A" (tsc));
+ return tsc;
+}
+
+static unsigned long long hypercall_cycles = 0xffffffffULL;
+static void time_hypercall(void)
+{
+ unsigned long long tsc_start, tsc_end, cycles;
+ int i;
+ for (i = 0; i < 1000; i++) {
+ tsc_start = get_tsc();
+ vmi_rdtsc();
+ tsc_end = get_tsc();
+ cycles = tsc_end - tsc_start;
+ if (cycles < hypercall_cycles)
+ hypercall_cycles = cycles;
+ }
+}
+
+static unsigned long long page_fault_cycles = 0xffffffffULL;
+static v...