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
document -prof_pcs and provide support for profiling joint DR+client #140
Comments
From bruen...@google.com on September 28, 2011 08:16:33 Labels: GoodContrib |
From bruen...@google.com on September 28, 2011 08:22:33 Owner: --- |
From zhao...@google.com on May 03, 2013 11:59:57 we could also export API to update dcontext->whereami, so the client can have customized information of sampling distribution. |
Two additional issues with profiling clients:
|
Just to clarify, 1. above should say "occurring in client clean callees out of the code cache", not arbitrary client code. |
The two client issues are fixed in 2675a1b. I'm leaving this issue open because the public documentation for |
Revisiting this and leaning toward asking clients to do their own sampling using dr_set_itimer() (on Linux at least), and then providing a get-whereami routine. That allows clients to add their own whereami buckets, do their own bucketing at the granularity they want, get structured data out rather than having to parse our file, and control the sampling interval. (The downside is that it doesn't support diving deep into instrumentation: to do that with client sampling we'd want to export lockless heaps.) |
Added dr_where_am_i() to better support client self-profiling via sampling. This also provides the fragment tag, by refactoring the pcprofile code into a new helper fcache_refine_whereami(). Renamed the whereami types to better avoid name conflicts: s/WHERE_xxx/DR_WHERE_xxx/ and s/where_am_i_t/dr_where_am_i_t/. Exported the dr_where_am_i_t enum. Fixed a bug where an uninitialized mcontext was passed to a client timer callback: we only filled in the mcontext for a DR-internal callback. Added a test of client sampling to client.timer Issue: #140
Added dr_where_am_i() to better support client self-profiling via sampling. This also provides the fragment tag, by refactoring the pcprofile code into a new helper fcache_refine_whereami(). Renamed the whereami types to better avoid name conflicts: s/WHERE_xxx/DR_WHERE_xxx/ and s/where_am_i_t/dr_where_am_i_t/. Exported the dr_where_am_i_t enum. Fixed a bug where an uninitialized mcontext was passed to a client timer callback: we only filled in the mcontext for a DR-internal callback. Added a test of client sampling to client.timer Issue: #140
One problem with the new To fix: enable if client ever called dr_set_itimer()?? Or have a new API |
A couple other
This is literally right after enter_fcache() sets "dcontext->whereami = DR_WHERE_FCACHE":
It's unclear how to handle this one: checking whether in DR is not very precise. |
Adds a new API routine dr_track_where_am_i() which enables tracking of whereami for clean calls. This is off by default for performance reasons, which leads to clean calls being labeled initially DR_WHERE_FCACHE and then refined into DR_WHERE_UNKNOWN. Adds a query routine dr_is_tracking_where_am_i() for use in the tracer where this tracking causes a short jump to not reach (#2147). Cleans up a hole in whereami tracking to include shared context switch code and do_syscall code along with other generated transition code as DR_WHERE_CONTEXT_SWITCH. Adds labeling of DR_WHERE_SIGNAL_HANDLER for at least the ksynch_wait on a suspend signal; including other handler code is trickier and is left for future work. Issue: #140
Adds a new API routine dr_track_where_am_i() which enables tracking of whereami for clean calls. This is off by default for performance reasons, which leads to clean calls being labeled initially DR_WHERE_FCACHE and then refined into DR_WHERE_UNKNOWN. Adds a query routine dr_is_tracking_where_am_i() for use in the tracer where this tracking causes a short jump to not reach (#2147). Cleans up a hole in whereami tracking to include shared context switch code and do_syscall code along with other generated transition code as DR_WHERE_CONTEXT_SWITCH. Adds labeling of DR_WHERE_SIGNAL_HANDLER for at least the ksynch_wait on a suspend signal; including other handler code is trickier and is left for future work. Issue: #140
The client syscall events are called out of dispatch separately from DR's syscall handlers, so today they end up in the DR_WHERE_DISPATCH bucket. Here we mark them as the more appropriate DR_WHERE_SYSCALL_HANDLER. Issue: #140
The client syscall events are called out of dispatch separately from DR's syscall handlers, so today they end up in the DR_WHERE_DISPATCH bucket. Here we mark them as the more appropriate DR_WHERE_SYSCALL_HANDLER. Issue: #140
From derek.br...@gmail.com on May 06, 2009 11:27:32
The older MIT releases documented -prof_pcs and provided other profiling
options. We took out the latter as they weren't worth the effort to support
and could be written as simple clients. It might be worth officially
documenting -prof_pcs, however, and provide support/tools for analyzing
performance of clients.
xref PR 225255: release PROFILE_LINKCOUNT build?
xref PR 225139: expose performance-affecting configuration runtime options
Original issue: http://code.google.com/p/dynamorio/issues/detail?id=140
The text was updated successfully, but these errors were encountered: