This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Profiling suggestions
- To: ehliar at lysator dot liu dot se, gcc at gcc dot gnu dot org
- Subject: Re: Profiling suggestions
- From: N8TM at aol dot com
- Date: Thu, 17 Feb 2000 08:48:28 EST
In a message dated 2/17/2000 3:48:36 AM Pacific Standard Time,
ehliar@lysator.liu.se 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
them.
Tim
tprince@computer.org