A few general questions

29 views
Skip to first unread message

Anita Müller

unread,
Oct 14, 2022, 3:18:13 PM10/14/22
to DynamoRIO Users
Hello

Dynamorio seems like a really good tool for what I need but I had a few questions regarding it's functionality

1) Is there a good way to prepopulate certain instructions in the cache? I have seen the dr_prepopulate_cache() function and that it's supposed to be called between dr_app_setup() and dr_app_start(). I'm confused on how this is done since I might not know the module base address (that I get from the module onload event) of blocks I want to populate. Additionally, does prepopulating them allow for any instrumentation similar to a basic block event?
2) Is there a way to trigger an event when an indirect branch takes a branch it hasn't taken before? This would be applied to every indirect instruction. I could do this via meta instructions but just wondered if Dynamorio provided a convenient way to do this
3) For the -thread_private option, is there a way to group certain threads to use the same code caches? For example if there were 3 threads and I needed to instrument 2 of them using method A and 1 using method B, could I have the two threads using method A to share the same code cache instead of having their own individual ones. The one using method B would still have it's own code cache

Thanks

Derek Bruening

unread,
Oct 18, 2022, 2:07:50 AM10/18/22
to Anita Müller, DynamoRIO Users
On Fri, Oct 14, 2022 at 3:18 PM Anita Müller <mulle...@gmail.com> wrote:
Hello

Dynamorio seems like a really good tool for what I need but I had a few questions regarding it's functionality

1) Is there a good way to prepopulate certain instructions in the cache? I have seen the dr_prepopulate_cache() function and that it's supposed to be called between dr_app_setup() and dr_app_start(). I'm confused on how this is done since I might not know the module base address (that I get from the module onload event) of blocks I want to populate. Additionally, does prepopulating them allow for any instrumentation similar to a basic block event?

The tags are typically obtained from sampling or possibly a plain-DR pass and then a heavyweight client is set up and prepopulated with that instrumentation.
 
2) Is there a way to trigger an event when an indirect branch takes a branch it hasn't taken before? This would be applied to every indirect instruction. I could do this via meta instructions but just wondered if Dynamorio provided a convenient way to do this

There is no built-in event, no.
 
3) For the -thread_private option, is there a way to group certain threads to use the same code caches? For example if there were 3 threads and I needed to instrument 2 of them using method A and 1 using method B, could I have the two threads using method A to share the same code cache instead of having their own individual ones. The one using method B would still have it's own code cache

This is not implemented, no.  I think there is an issue filed on it somewhere.
 

Thanks

--
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/a50b1810-9dfa-44a1-9300-1ced282182b4n%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages