* cycle counter register
@ 2001-01-09 4:16 Mihai-Dan Budiu
2001-01-11 2:34 ` Jeffrey Mogul
0 siblings, 1 reply; 2+ messages in thread
From: Mihai-Dan Budiu @ 2001-01-09 4:16 UTC (permalink / raw)
Hello.
I am sorry if this is not the right forum; I could not find many
newsgroups related to Alpha.
I am trying to get some performance measurements for programs running
on Alpha. What I would like to do is to count the execution time of a
program EXCEPT in a few portions of code. I have the source code of
the programs I am measuring. I am interested in being as much
"cycle-accurate" as possible. I am using 'gcc -O4'.
I have tried to use ATOM, but it is too heavyweight: the code I am
measuring is executed often, and the overhead of inserting procedure
calls is too big (1000%).
Now I have resorted to inserting just a few instructions to read the
cycle counter register (using rpcc), and to make simple computations
with it. I get the counters before and after the code I want to skip,
and I accumulate only the time spent outside this code.
My programs don't run too much, so the counters don't overflow.
However, I encounter two problems with this approach:
1) the results vary from measurement to measurement, even on an
unloaded system (around 10% variance I would say).
2) I believe that the compiler and the OOO execution actually reorder
my instrumentation code, and thus I am not really measuring what I
want.
My questions are:
a) is there a method to measure in a very lightweight fashion just the
user-level runtime of a process? should I expect for such a value
a variance of an order >10%, due to the unpredictable scheduling on
OS and application code on the CPU?
b) is there a way to avoid the reordering of the instrumentation
instructions, without incurring a big overhead (i.e. >10%)?
c) is there some documentation with guidelines on how to carry such
measurements on Alphas (or perhaps any other Unix system)?
Thank you very much for any hint.
Mihai Budiu
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: cycle counter register
2001-01-09 4:16 cycle counter register Mihai-Dan Budiu
@ 2001-01-11 2:34 ` Jeffrey Mogul
0 siblings, 0 replies; 2+ messages in thread
From: Jeffrey Mogul @ 2001-01-11 2:34 UTC (permalink / raw)
In article <uijk885uzq1.fsf@strudel.act-r.cs.cmu.edu>, Mihai-Dan Budiu <mihaib@strudel.act-r.cs.cmu.edu> writes:
|> a) is there a method to measure in a very lightweight fashion just the
|> user-level runtime of a process? should I expect for such a value
|> a variance of an order >10%, due to the unpredictable scheduling on
|> OS and application code on the CPU?
Try DCPI:
http://www.tru64unix.compaq.com/dcpi/
Currently this is an "advanced development kit" and there
isn't an excess of documentation, but it can probably help
you a lot.
See
http://www.usenix.org/publications/login/1999-2/squid.html
for an example of how an older version of DCPI was useful for
isolating a performance problem. (Some of the details of the
tools have changed since then, and I've not kept up with the
changes myself.)
-Jeff
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2001-01-11 2:34 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2001-01-09 4:16 cycle counter register Mihai-Dan Budiu
2001-01-11 2:34 ` Jeffrey Mogul
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox