Draft: PIN-based Tracer engine with visualizations#157
Draft
PeterMocary wants to merge 14 commits intoPerfexionists:develfrom
Draft
Draft: PIN-based Tracer engine with visualizations#157PeterMocary wants to merge 14 commits intoPerfexionists:develfrom
PeterMocary wants to merge 14 commits intoPerfexionists:develfrom
Conversation
204c608 to
067e3e5
Compare
04ae5a5 to
f197f03
Compare
f197f03 to
af7f366
Compare
Author
|
There is currently a problem with using hash tables with PIN kit and g++ 12 and newer. The standard library within the kit triggers an uninitialized variable warning that is treated as error by default. Therefore I added a pragma to ignore this warning until the problem is resolved by the PIN kit developers. |
Introduces a new Tracer engine implemented using the Intel's PIN framework. The PIN based tracer supports three modes of execution: time, memory and instructions. The time mode allows collection of function (and basic block) run-times as well as collection of simple function arguments. The time mode is collects only information about functions by default and collection of basic blocks needs to be explicitly enabled. It also provides option to collect information only about basic blocks and infer the function run-times based on them instead. The memory mode allows collection of information about memory manipulation functions (malloc, calloc, realloc, new, free and delete are supported). This includes collection of their arguments and location as well as the return values. The instruction mode allows collection of number of executed instructions in basic blocks (and functions). This mode collects basic blocks only.
Three new visualizations are introduced in this commit: basicblocks, funcargs, and treemap. The basicblocks visualization is a sunburst graph that contains run-times (or number of executions) of functions with their basic blocks. It supports basic mapping of the basic blocks to the source code. The mapping is, however bit tricky to incorporate into the graph, thus treemap visualization utilizing different library was created. This visualization uses old version of bokehlibrary and might be retired in the future. The funcargs visualization is a scatter graph that shows dependency between function run-time and values of collected arguments. The treemap visualization has multiple forms of representation as a graph: tree-map, sunburst, and flame graph. Each visualizes the call graph as a tree in a slightly different way. It supports mapping of basic blocks to source code.
There is a variable in the standard library of C++ within PIN kit that causes uninitialized warning to trigger when using g++ 12 and newer. Since the kit treats warnings as errors by default, the pragma to ignore this warning was added until the release of new PIN kit with this issue fixed is released.
89f189f to
2fb4e66
Compare
417abed to
e96c17d
Compare
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## devel #157 +/- ##
==========================================
- Coverage 99.07% 95.87% -3.20%
==========================================
Files 150 156 +6
Lines 10470 10910 +440
==========================================
+ Hits 10373 10460 +87
- Misses 97 450 +353
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Introduces a new Tracer engine implemented using the Intel's PIN framework
and new visualizations. The PIN based tracer supports three modes of
execution: time, memory and instructions.
time mode - allows collection of function (and basic block)
run-times as well as collection of simple function arguments. The time
mode is collects only information about functions by default and
collection of basic blocks needs to be explicitly enabled. It also
provides option to collect information only about basic blocks
and infer the function run-times based on them instead.
memory mode - allows collection of information about memory
manipulation functions (malloc, calloc, realloc, new, free and delete
are supported). This includes collection of their arguments and location
as well as the return values.
instruction mode - allows collection of number of executed
instructions in basic blocks (and functions). This mode collects basic
blocks only.
Execution examples:
The three new visualizations introduced are: basicblocks,
funcargs, and treemap.
basicblocks visualization - a sunburst graph that contains
run-times (or number of executions) of functions with their basic
blocks. It supports basic mapping of the basic blocks to the source
code. The mapping is, however bit tricky to incorporate into the graph,
thus treemap visualization utilizing different library was created.
This visualization uses old version of bokehlibrary and might be retired
in the future.
funcargs visualization - a scatter graph that shows dependency
between function run-time and values of collected arguments.
treemap visualization - has multiple forms of representation as a
graph: tree-map, sunburst, and flame graph. Each visualizes
the call graph as a tree in a slightly different way. It supports
mapping of basic blocks to source code.
Execution examples:
How to setup pin:
TODO: