This is an archive of the discontinued LLVM Phabricator instance.

[wip] [trace] Hierarchical Trace Representation (HTR) redesign and "call stack trace" visualization
Needs ReviewPublic

Authored by jj10306 on Aug 13 2021, 12:00 PM.
This revision needs review, but there are no reviewers specified.

Details

Reviewers
None
Summary

Creating this patch so all the work from my internship is public and so I can continue to work on HTR if I'm able to get a hold of a machine supports Intel PT (-:

  • Refactor/redesign the first iteration HTR implementation from https://reviews.llvm.org/D105741
  • Add HTR support for TSC and add ability to see approximate timestamps in the trace visualization
  • Change BasicSuperBlockPass to PatternMerge and the pass now is aware of functions

Here's an example of the "call stack trace" visualization:

The arrows in the image above point from a function call in the program to the corresponding block in the trace. Looking at the visualization on the right, you'll notice that the first two push_back blocks are significantly smaller than the third push_back block.
Well, if we look at the code on the left, this is exactly what we would expect; the third call to push_back on line 9 will require a reallocation since we defined the capacity of the vector to be 2 on line 6!
Although contrived, this example illustrates how the "call stack trace" visualization allows you to gain deeper insight about the behavior of a program.

Diff Detail

Event Timeline

jj10306 created this revision.Aug 13 2021, 12:00 PM
jj10306 requested review of this revision.Aug 13 2021, 12:00 PM
Herald added a project: Restricted Project. · View Herald TranscriptAug 13 2021, 12:01 PM
jj10306 updated this revision to Diff 378464.Oct 9 2021, 11:02 AM

Pulling in the request stitching changes so I can see what modifications were made to the "call stack trace" visualization along the way.