Related articles |
---|
Simulating memory accesses punter_pun@yahoo.com (2004-03-06) |
Re: Simulating memory accesses alex@iliasov.org (2004-03-11) |
Re: Simulating memory accesses vbdis@aol.com (2004-03-11) |
From: | alex@iliasov.org (alessio) |
Newsgroups: | comp.compilers |
Date: | 11 Mar 2004 12:55:10 -0500 |
Organization: | http://groups.google.com |
References: | 04-03-023 |
Keywords: | storage, performance |
Posted-Date: | 11 Mar 2004 12:55:09 EST |
punter_pun@yahoo.com (Adi) wrote
> I am writing a code which mimicks the memory accesses of an
> application. Lets assume that array a[] contains all the addresses
> accessed in sequence, check the for loop in the code given below. Now,
> i want to mimick these accesses(not absolutely but atleast
> relatively). I could see only one solution to that - writing a for
> loop(see the code). But it gives extra memory accesses, accesing
> address of index i and a[i] along with the to b mimicked accesses.
It is not quite clear what is the aim of your work. If you are looking
for something like cache hit rate, aligned access or metrics like
access distance (for example to match specific cache design, i.e.
levels number, replace policy, banks number, etc) then you should
better use cpu emulation software. There are many for popular
architectures. After test run you can easily sort out accesses to
different memory regions.
Doing `register int i;' doesn't really gurantees that i is stored in
register, however it may work in small functions for certain archs.
If Application Is Large And Runs Slow Or Crushes Under Emulator Then
Consider Using Advanced Debuggers. Take A Look At Intel'S Vtune,
Valgrind May Be Also Useful.
there is a cool extension to gcc developed in conjunction with SSA
optimizatiom. It's called mudflap, it instruments code (working
inside of gcc) by inserting call to some library function before any
access to the memory. May be quite useful in your case if you work
with gcc
Return to the
comp.compilers page.
Search the
comp.compilers archives again.