The following patch is useful for x86_64 machines.
--- ocamlutil/perfcount.c.in (revision 2237)
+++ ocamlutil/perfcount.c.in (working copy)
@@ -17,7 +17,7 @@
#define longlong long long
// RDTSC puts the result in EAX and EDX. We tell gcc to use those
// for "low" and "high"
- #if defined(__i386__)
+ #if defined(__i386__) || defined(__x86_64__)=20
#define GETCOUNTER(low,high) \
__asm__ volatile ("rdtsc" : "=3Da" (low), "=3Dd" (high));
Testing has been quite minimal:
Without the patch, CIL prints an error message and exits
With the patch, CIL runs the same as on a 32-bit x86 box.
I didn't check whether the performance information gathered is correct
because I don't know where that information is used.
Alastair Reid, Principal Engineer, R&D
ARM Ltd, 110 Fulbourn Rd, Cambridge, CB1 9NJ.
T: +44 1223 406 109
-- IMPORTANT NOTICE: The contents of this email and any attachments are =
confidential and may also be privileged. If you are not the intended =
recipient, please notify the sender immediately and do not disclose the =
contents to any other person, use it for any purpose, or store or copy =
the information in any medium. Thank you.
Get latest updates about Open Source Projects, Conferences and News.