-
Notifications
You must be signed in to change notification settings - Fork 14
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
Draft: PIN-based Tracer engine with visualizations #157
base: devel
Are you sure you want to change the base?
Draft: PIN-based Tracer engine with visualizations #157
Conversation
204c608
to
067e3e5
Compare
04ae5a5
to
f197f03
Compare
f197f03
to
af7f366
Compare
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. |
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: