-
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
generalize drcachesim to support arbitrary trace analysis tools #2006
Comments
We've put a bunch of work into this:
However, we still have not finalized the best way to split non-simulator and simulator tools: today the simulator is dispatching on non-simulator tools, though we do have support for making simple front ends for other tools. |
Marks the file_reader_t::is_complete() and analyzer_t::init_file_reader() methods as virtual to provide more flexibility in subclassing. Cleans up some now-stale comments about drcachesim optimizations. Issue: #2006
Marks the file_reader_t::is_complete() and analyzer_t::init_file_reader() methods as virtual to provide more flexibility in subclassing. Cleans up some now-stale comments about drcachesim optimizations. Issue: #2006
Adds an explicit index field to drmodtrack_info_t so that the data structure can be passed around without an accompanying iterator index. Issue: #2006
Marks the file_reader_t::is_complete() and analyzer_t::init_file_reader() methods as virtual to provide more flexibility in subclassing. Cleans up some now-stale comments about drcachesim optimizations. Issue: #2006
We have settled on a drmemtrace_analyzer library that includes a reader and two iterator modes (internal vs external control). I am now exporting libraries and headers. Some decisions:
Still TODO:
|
Exports a new drmemtrace_analyzer library along with all trace analysis libraries as drmemtrace_basic_counts, drmemtrace_histogram, drmemtrace_reuse_distance, drmemtrace_reuse_time, and drmemtrace_simulator. Renames the drmemtrace_histogram executable to histogram_launcher to avoid clashing with the new public library drmemtrace_ prefix. Exports header files for building trace analysis tools and using our provided tools in a new location tools/include/drmemtrace/. Adds a new DynamoRIO CMake package command use_DynamoRIO_drmemtrace() to facilitate building third-party trace analysis tools. Adds a new DynamoRIO CMake package command configure_DynamoRIO_main_headers() to facilitate using just drfrontendlib and finding dr_frontend.h, and fixes dr_frontend.h typedef issues when used by itself. Adds a build-and-test test of using the framework from a separate CMake project. Adds documentation of the new features. Manually tested in a release package. Tweaks the package.cmake for a missing utils function. Still missing: adding extensive doxygen comments in all of the headers, and including the headers in genapi so they show up in the html docs. Issue: #2006
A point point is the zlib link:
|
…2780) Exports a new drmemtrace_analyzer library along with all trace analysis libraries as drmemtrace_basic_counts, drmemtrace_histogram, drmemtrace_reuse_distance, drmemtrace_reuse_time, and drmemtrace_simulator. Renames the drmemtrace_histogram executable to histogram_launcher to avoid clashing with the new public library drmemtrace_ prefix. Exports header files for building trace analysis tools and using our provided tools in a new location tools/include/drmemtrace/. Adds a new DynamoRIO CMake package command use_DynamoRIO_drmemtrace() to facilitate building third-party trace analysis tools. Adds a new DynamoRIO CMake package command configure_DynamoRIO_main_headers() to facilitate using just drfrontendlib and finding dr_frontend.h, and fixes dr_frontend.h typedef issues when used by itself. Adds a build-and-test test of using the framework from a separate CMake project. Adds documentation of the new features. Manually tested in a release package. Tweaks the package.cmake for a missing utils function. Still missing: adding extensive doxygen comments in all of the headers, and including the headers in genapi so they show up in the html docs. Issue: #2006
Adds doxygen docs to the exported headers in the drmemtrace framework and includes them all in the doxygen-generated html docs. Adds hierarchy to the html docs file list to group the drmemtrace headers together. Moves drmemtrace.h from ext/include/ to tools/include/drmemtrace with the analysis tool headers and adds a new CMake function use_DynamoRIO_drmemtrace_tracer() for finding the header. Adds a tracer customization section to the drcachesim prose docs. Installation tested manually and tweaked to remove superfluous drcachesim debug files. Issue: #2006
We may also want to doxygen-ize and make public all of the simulator headers for subclassing and extending the simulator? Perhaps we should also split off drmemtrace from drcachesim in the docs, with a separate Memory Trace Analysis page instead of having it underneath the cache simulator? |
) Adds doxygen docs to the exported headers in the drmemtrace framework and includes them all in the doxygen-generated html docs. Adds hierarchy to the html docs file list to group the drmemtrace headers together. Moves drmemtrace.h from ext/include/ to tools/include/drmemtrace with the analysis tool headers and adds a new CMake function use_DynamoRIO_drmemtrace_tracer() for finding the header. Adds a tracer customization section to the drcachesim prose docs. Installation tested manually and tweaked to remove superfluous drcachesim debug files. Issue: #2006
Adds further support for tools that want information beyond just memory addresses by adding an API to leverage the raw2trace code to map in the binaries used during traced execution and examine the instruction bytes. This takes the shape of two new routines: raw2trace_t::do_module_parsing_and_mapping() and raw2trace_t::find_mapped_trace_address(). Adds a new simulator tool "opcode_mix" which uses the new API to decode the opcode for each executed instruction and print out the dynamic count of each opcode. The tool only operates with offline traces and needs access to the modules.log and binaries of the traced execution. Adds documentation and a test. Issue: #2006
Quoting from #975:
Right now we live with that and we just avoid mid-run malloc calls. The regression mentioned above only happens mid-run with custom user data and dynamic app library loading. |
Adds a feature where a client library can request that the private loader complain if malloc & co. are called at any time other than process init or exit, to help clients that want to support being linked statically with the app. Because it has to be early, the feature is triggered by a variable declaration DR_DISALLOW_UNSAFE_STATIC. It can be overridden dynamically by a new API routine dr_allow_unsafe_static_behavior(). Fixes drcachesim to use placement new for its offline custom module data allocations. Issue: #975, #2006
…ts (#2940) This change changes the modules.log format to provide a separate entry for each segment instead of combining entries for contiguous segments mapped from each image. The module file version is incremented to 4 and adds a new field called offset after the "entry" field. The file offset information for unix is added to DR's module_segment_data_t and propagated to drmodtrack to be written out with each segment. The client-interface/drmodtrack-test.dll.cpp test is extended to check whether the offset recorded by drmodtrack matches the offset for the segment in DR's module data. Also fixed lint issue. Issue: #2006
Eliminates the too-early destruction of raw2trace_directory_t, as we need to reference the vdso contents later on. Issue: #2006
Eliminates the too-early destruction of raw2trace_directory_t, as we need to reference the vdso contents later on. Issue: #2006
Xref ba12147 |
Changes the drcachesim configuration file interface to use a std::istream rather than a file path string, to support non-standard filesystems. Tested with a proprietary filesystem library. Issue: #2006
Changes the drcachesim configuration file interface to use a std::istream rather than a file path string, to support non-standard filesystems. Tested with a proprietary filesystem library. Issue: #2006
This is complete: we have a variety of tools now. |
We plan to generalize drcachesim to support two types of trace analysis tools:
The text was updated successfully, but these errors were encountered: