On Tue, Apr 24, 2012 at 8:55 AM, JIE CHEN <[email protected]> wrote: > Hello, > > Thanks for previous fast replies which were very helpful. I have a new > question about PC. When I do objdump -Sd myBinary, I can see that for > every instruction, there is an associated PC value. Does marss record > the PC value (as listed in dissembled binary file) for every x86 > instruction somewhere, or as one attribute of instruction object, in > the simulator? > > To be more clear, for every L1 cache miss, I want to capture the PC > value of the x86 instruction which precisely incurs the miss, so that > I can go back to dissembled binary code and figure out where have > cache misses. In the coherentCache.cpp, I have added some code in the > function CacheController::cache_access_cb(void *arg) to trap the PC > values when miss occurs. I tried using > queueEntry->request->get_owner_rip(), but that function call didn't > seem to return the right "RIP" for my own purpose. Is it possible to > augment memory request objects to carry PC values as I described > above? Thank you. > > The function you have used is correct. If the PC value is in 0xffff range then its a kernel instruction. If its in 0x7ffff range then its a library instruction. The rest of the instructions are from user level application.
Now when you try to map PC address to your binary you have to ignore all 0xffff and 0x7fff addresses. Also you have to make sure that core is running your application and no other application. For example if you use 'start_sim' to start simulation, it will take around 1 mil instructions to start your application. - Avadh > Best regards, > > Jie > > _______________________________________________ > http://www.marss86.org > Marss86-Devel mailing list > [email protected] > https://www.cs.binghamton.edu/mailman/listinfo/marss86-devel >
_______________________________________________ http://www.marss86.org Marss86-Devel mailing list [email protected] https://www.cs.binghamton.edu/mailman/listinfo/marss86-devel
