Creating a modified TLB simulator

28 views
Skip to first unread message

Akilesh Kannan

unread,
Sep 8, 2022, 2:06:30 PM9/8/22
to DynamoRIO Users
Hi everyone,

I came across DynamoRIO after reading a few academic papers related to my master's project and found that this is closest to what I need - I am trying to create a TLB analysis tool, that tries to find the reuse distance of TLB entries for various applications.

I saw that there is a TLB simulator tool as well as a reuse distance tool that analyses it for caches. I went through the source code for the reuse distance tool, but am not really sure on how to adapt it to use TLB access/references rather than cache references. Can someone help me out in this regard?

Thanks and Regards,
Akilesh Kannan

Derek Bruening

unread,
Sep 8, 2022, 2:42:28 PM9/8/22
to Akilesh Kannan, DynamoRIO Users
You could subclass tlb_stats_t with a class that records stats into an extractable data structure, subclass tlb_simulator_t and substitute your stats class into its TLB instances, and have your new tool embed your simulator subclass and invoke its process_memref and then act on the recorded stats.

--
You received this message because you are subscribed to the Google Groups "DynamoRIO Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to dynamorio-use...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/dynamorio-users/c7b536ea-4ef3-4449-8a34-ca09e455f84an%40googlegroups.com.

Akilesh Kannan

unread,
Sep 9, 2022, 11:02:19 AM9/9/22
to DynamoRIO Users
Hi Derek,

Please correct me if I'm wrong, but aren't the existing reuse distance/time tools using memory traces to calculate their stats? Can they be adapted (I'm not sure if these traces also contain some information about TLB accesses) to be used for TLBs instead of caches? I'm pretty new to this, and the documentation is pretty sparse here, as far I searched.

Also, can you explain what you mean by an *extractable* data structure? Do you mean something like the shard->time_map and shard->reuse_histogram (an unordered map to store distance<->count pairs) used in the reuse tools?

Regards,
Akilesh

Derek Bruening

unread,
Sep 9, 2022, 4:59:54 PM9/9/22
to Akilesh Kannan, DynamoRIO Users
On Fri, Sep 9, 2022 at 11:02 AM Akilesh Kannan <ee18...@smail.iitm.ac.in> wrote:
Hi Derek,

Please correct me if I'm wrong, but aren't the existing reuse distance/time tools using memory traces to calculate their stats? Can they be adapted (I'm not sure if these traces also contain some information about TLB accesses) to be used for TLBs instead of caches? I'm pretty new to this, and the documentation is pretty sparse here, as far I searched.

That is what my reply described: turning the address trace into a TLB access trace by passing it through a TLB simulator for feeding into whatever tool such as reuse distance.
 

Also, can you explain what you mean by an *extractable* data structure? Do you mean something like the shard->time_map and shard->reuse_histogram (an unordered map to store distance<->count pairs) used in the reuse tools?

Regards,
Akilesh

On Friday, September 9, 2022 at 12:12:28 AM UTC+5:30 Derek Bruening wrote:
You could subclass tlb_stats_t with a class that records stats into an extractable data structure, subclass tlb_simulator_t and substitute your stats class into its TLB instances, and have your new tool embed your simulator subclass and invoke its process_memref and then act on the recorded stats.

On Thu, Sep 8, 2022 at 2:06 PM Akilesh Kannan <ee18...@smail.iitm.ac.in> wrote:
Hi everyone,

I came across DynamoRIO after reading a few academic papers related to my master's project and found that this is closest to what I need - I am trying to create a TLB analysis tool, that tries to find the reuse distance of TLB entries for various applications.

I saw that there is a TLB simulator tool as well as a reuse distance tool that analyses it for caches. I went through the source code for the reuse distance tool, but am not really sure on how to adapt it to use TLB access/references rather than cache references. Can someone help me out in this regard?

Thanks and Regards,
Akilesh Kannan

--
You received this message because you are subscribed to the Google Groups "DynamoRIO Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to dynamorio-use...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/dynamorio-users/c7b536ea-4ef3-4449-8a34-ca09e455f84an%40googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "DynamoRIO Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to dynamorio-use...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages