how do I measure the time it takes to switch between frequencies?
Hello folks,
I am trying to evaluate the performance of parallel benchmarks at various frequencies and was wondering how would I actually go about measuring the time it takes to switch between 2 frequencies.
(I am guessing since rdtsc is measured based on cycles, it is kindof useless when the frequency itself it changing)
Any ideas on how would I go about doing this?
-Ankur
If your PC has a parallel port, you can use the outb instruction to write arbitrary bytes to the parallel port. One of the system headers has a wrapper for outb, so it is easy to call from C code. Set one bit on the parallel port high before the frequency transition and set it low after the frequency transition. You can use an oscilloscope to measure the transition time.
There are several caveats. First, changing the state of the parallel port takes about 1 microsecond. If 1 microsecond is a significant part of the transition time, then you will have to find a different technique. Second, the outb instruction only works if you are root, or if root uses ioperm or iopl to pass the right to use the port to a child process.
Bill Dieter.
Quoted 17 lines · Ankur Shah
Hello folks,
I am trying to evaluate the performance of parallel benchmarks at various frequencies and was wondering how would I actually go about measuring the time it takes to switch between 2 frequencies.
(I am guessing since rdtsc is measured based on cycles, it is kindof useless
when the frequency itself it changing)
Any ideas on how would I go about doing this?-Ankur
_______________________________________________
Cpufreq mailing list
[email protected]
http://lists.linux.org.uk/mailman/listinfo/cpufreq