hpcstruct: fix handling for GPU CFGs

hpcstruct: fix handling for GPU CFGs

  • initialize basic block begin_offset

  • add empty routines to help debugging by providing a single interception point for basic block constructors and a single interception point for instruction constructors

  • improve debugging output for GPU callgraph construction

  • avoid overflow when computing with GPU binary addresses

To Demonstrate

Under certain conditions, an uninitialized field begin_offset in a Block contained a large value, yielding a negative when it was subtracted. This caused large unsigned addresses to appear in affected blocks in hpcstruct output.

Backward Compatibility

  • This MR does not alter the data formats.
  • This MR does not alter any CLIs.

Additional Information

None

Checklist

  • I have run pre-commit run -a on my local checkout and fixed any reported issues.
  • I have confirmed that existing tests and/or the tests added by this MR cover the changes introduced by this MR.
  • I have confirmed that any added tests will be automatically run in CI.
  • I have updated all relevant documentation:
    • The --help text for the tools
    • The man page for the tools
    • The HPCToolkit User's Manual

Merge request reports

Loading