flushing entire code cache

13 views
Skip to first unread message

Mah

unread,
Nov 3, 2022, 11:32:49 AM11/3/22
to DynamoRIO Users
Hi, 

I want to flush the entire code cache in DR once a certain condition is met. How do I do that with dr_flush_region(), as it requires the PC of a particular instruction. 

sharma...@google.com

unread,
Nov 3, 2022, 11:45:41 AM11/3/22
to DynamoRIO Users
Hi,
I think you can pass it start = NULL and a very large size, to flush the entire code cache. We used this in drcachesim a while ago: https://github.com/DynamoRIO/dynamorio/blob/2b261ed4742b3ec616e5f116cd1dc3283419cd71/clients/drcachesim/tracer/tracer.cpp#L1462.

Let me know if this helps.

Abhinav

Reply all
Reply to author
Forward
0 new messages