[PATCH] D53967: [XRay] Fix TSC and atomic custom/typed event accounting

Dean Michael Berris via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Oct 31 20:23:45 PDT 2018


dberris created this revision.
dberris added a reviewer: mboerger.
Herald added subscribers: jfb, hiraditya, mgorny.

This is a follow-on change to https://reviews.llvm.org/D53858 which turns out to have had a TSC
accounting bug when writing out function exit records in FDR mode.

This change adds a number of tests to ensure that:

- We are handling the delta between the exit TSC and the last TSC we've seen.

- We are writing the custom event and typed event records as a single update to the buffer extents.

- We are able to catch boundary conditions when loading FDR logs.

We introduce a TSC matcher to the test helpers, which we use in the
testing/verification of the TSC accounting change.


https://reviews.llvm.org/D53967

Files:
  compiler-rt/lib/xray/tests/CMakeLists.txt
  compiler-rt/lib/xray/tests/unit/fdr_controller_test.cc
  compiler-rt/lib/xray/tests/unit/fdr_log_writer_test.cc
  compiler-rt/lib/xray/tests/unit/test_helpers.h
  compiler-rt/lib/xray/xray_fdr_controller.h
  compiler-rt/lib/xray/xray_fdr_log_writer.h
  llvm/lib/XRay/FDRRecordProducer.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D53967.172080.patch
Type: text/x-patch
Size: 11025 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20181101/bb08090e/attachment.bin>


More information about the llvm-commits mailing list