Profiling suggestions
Thu Feb 17 05:49:00 GMT 2000

In a message dated 2/17/2000 3:48:36 AM Pacific Standard Time, writes:

> I thought it would be a good idea to make it possible to use rdtsc (or
>  similar instructions on non ia32 platforms) to improve the granularity of
>  profiling.

I believe this would not be at all portable, even among machines which 
support these instructions.  While rdtsc calls give satisfactory timings on 
this old P II 232 Mhz, the same calls are totally unsatisfactory on the HP 
Kayak XW (P III running 547 to 549 Mhz).  If you wish to attempt it, it 
should be a simply matter of linking in your own replacement for the 
necessary timing functions.  It would be interesting to know which are used 
for profiling.  You should compare the possible alternatives, including use 
of the slightly higher level Windows API QueryPerformance functions.  Yes, 
until I made this comparison, I assumed that these were simple 
implementations based on rdtsc instructions for those machines which support 


More information about the Gcc mailing list