s5z / zsim

A fast and scalable x86-64 multicore simulator
GNU General Public License v2.0
335 stars 185 forks source link

Extracting PC of memory requests #187

Open bakhshalipour opened 6 years ago

bakhshalipour commented 6 years ago

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

hlitz commented 6 years ago

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 < notifications@github.com> 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 .

bakhshalipour commented 6 years ago

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.

hlitz commented 6 years ago

RTM gives you INS_Address(ins)

On Wed, Jan 17, 2018 at 2:36 PM, Mohammad Bakhshalipour < notifications@github.com> 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 .