- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
There is rdtsc to read processor time-stamp counter on x64. Could someone tell me how to read time-stamp counter on IA-64 platform.
Thanks,
Victor
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
unsigned long result;
/* gcc-IA64 version */
__asm__ __volatile__("mov %0=ar.itc" : "=r"(result) :: "memory");
while (__builtin_expect ((int) result == -1, 0))
__asm__ __volatile__("mov %0=ar.itc" : "=r"(result) ::
"memory");
return result;
Not tested on any current IA-64 platform.
If you use Microsoft or Intel C++, simply use the __rdtsc() built-in.
There is no guarantee of consistent results among nodes of a NUMA platform.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I used Microsoft Visual Studio .NET 2003 compiler and linker to build a UEFI driver. The link failed because of
unresolved external symbol .__rdtsc referenced in function ....
I have searched on web on rdtsc support with IA64 platform before I submitted my original request. What I have found was that there is a AR44 register on IA64 to replace rdtsc call to read the time-stamp count. Is that the case? If so, could you give me a sample code to access that register.
Thanks a lot,
Victor
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
I forgot to mention, I have a #pragma statement
#pragma intrinsic(__rdtsc)
and my calling function is
ts_expire = __rdtsc() + (u64_t)(cnt) * cycle_per_us;
and this leads to the unresolved external symbol .__rdtsc.
Thanks,
Victor
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
http://www.sfr-fresh.com/unix/privat/iometer-2008-06-22-rc1.tgz:a/iometer-2008-06-22-rc1/src/IOTime.cpp
You didn't say in the original post which compiler or OS you wanted to use, nor have I tried this on Windows.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
http://www.sfr-fresh.com/unix/privat/iometer-2008-06-22-rc1.tgz:a/iometer-2008-06-22-rc1/src/IOTime.cpp

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page