-
Notifications
You must be signed in to change notification settings - Fork 566
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add annotation support to drcachesim to delimit trace boundaries and app phases #3107
Comments
Yes, something exactly like this exists: annotations. However, it is not implemented on aarch*. That is covered by #1672. The other method of doing this is using the start/stop API to create a trace burst: see |
Great thanks! I'll see if I can get that working next week! |
Do you mean the start/stop approach? I see you closed the issue which I had repurposed to be about using annotations in drcachesim: was that deliberate? I'll reopen here. There are some advantages to annotations over start/stop: they can be compiled into the binary with minimal changes as opposed to linking with drcachesim and DR, and they are finer-grained and could be used to do things while tracing like turn on and off online cache filtering or add labels into the trace demarking regions of interest, so I think it's worth considering this as a feature request. |
Ah sorry, I did not realize the re-purposing! I meant annotation support. |
Right, so there are 2 things for the annotations: implement the underlying annotation instruction sequences for aarch*, which is #1672, and then adding a series of named annotations and handlers in drcachesim's tracer, which is this issue. |
Pasting some xref links from #2478: Xref #3995 which is asking for using instruction counts like -trace_after_instrs to delineate multiple app regions Note that one existing method of doing this is to use the start/stop interface. We have specific tests of this for drcachesim offline traces with static linking: the simplest is here: https://github.com/DynamoRIO/dynamorio/blob/master/clients/drcachesim/tests/burst_static.cpp |
Pasing from #2478 to further clarify that this covers annotations not just for starting and stopping a trace but for marking pieces of the trace: For correlating which part of a trace corresponds to which phase of an |
For some of our uses cases we found it useful to limit instrumentation (e.g. mem tracing) to a certain code region, e.g.
We have been using invalid encodings on AArch64, which we replace with labels in app2app and then in later stages we keep track of of whether tracing is enabled or disabled.
Would something like this be useful as a generic API or does something similar already exist and I missed it?
The text was updated successfully, but these errors were encountered: