zsim icon indicating copy to clipboard operation
zsim copied to clipboard

Extracting PC of memory requests

Open bakhshalipour opened this issue 7 years ago • 3 comments

Hi,

Is there any way to get the program counter of a load/store instruction in higher levels of the memory hierarchy (e.g., L3)? What about lower levels (e.g., Filter Cache)? Does adding the PC to memory requests require co-ordinating with PIN or its interfaces?

Thanks

bakhshalipour avatar Jan 17 '18 17:01 bakhshalipour

there is no easy way. You have to extract it in the decoder using a PIN API, then add it to the ld/st uop, then feed it to filter_cache->load() and add it to the MemReq defined in memory_hierarchy.h

On Wed, Jan 17, 2018 at 9:19 AM, Mohammad Bakhshalipour < [email protected]> wrote:

Hi,

Is there any way to get the program counter of a load/store instruction in higher levels of the memory hierarchy (e.g., L3)? What about lower levels (e.g., Filter Cache)? Is adding the PC to the memory requests requires co-ordinate with the PIN or its interfaces?

Thanks

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/s5z/zsim/issues/187, or mute the thread https://github.com/notifications/unsubscribe-auth/ADZKfuIcEnfoVRN7YQIhHhCerCM_4Vlhks5tLiuVgaJpZM4RhsRH .

hlitz avatar Jan 17 '18 18:01 hlitz

Thanks for the response. Any hint regarding what should I do with PIN? Actually, I am unfamiliar with PIN. I found that I should modify a function pointer in zsim.cpp to include PC as one of the arguments that PIN pass to the ZSim. But cannot find where/how PIN treats with this function pointer.

bakhshalipour avatar Jan 17 '18 22:01 bakhshalipour

RTM gives you INS_Address(ins)

On Wed, Jan 17, 2018 at 2:36 PM, Mohammad Bakhshalipour < [email protected]> wrote:

Reopened #187 https://github.com/s5z/zsim/issues/187.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/s5z/zsim/issues/187#event-1429311413, or mute the thread https://github.com/notifications/unsubscribe-auth/ADZKfgltGgqME6FJOQwaq0pIIGpQl6xZks5tLnX3gaJpZM4RhsRH .

hlitz avatar Jan 17 '18 23:01 hlitz