[PATCH] D52588: [XRay][compiler-rt] FDR Mode Controller

Dean Michael Berris via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Sep 27 00:03:38 PDT 2018


dberris created this revision.
dberris added reviewers: mboerger, eizan.
Herald added subscribers: jfb, mgorny.

This change implements a controller for abstracting away the details of
what happens when tracing with FDR mode. This controller type allows us
to test in isolation the various cases where we're encountering function
entry, exit, and other kinds of events we are handling when FDR mode is
enabled.

This change introduces a number of testing facilities we've needed to
better support expressing the conditions we need for the unit tests. We
leave some TODOs for moving those utilities into the LLVM project,
sitting in the `Testing` library, to make matching conditions on XRay
`Trace` instances through googlemock more manageable and declarative.

We don't wire in the controller right away, to allow us to incrementally
update the implementation(s) as we increase testing coverage of the
controller type. There's a need to re-think the way we're managing
buffers in a multi-threaded environment, which is more invasive than
this implementation.

This step in the process allows us to encode our assumptions in the
implementation of the controller, and then evolve the buffer queue
implementation to support generational buffer management to ensure we
can continue to support the cases we're already supporting with the
controller.


https://reviews.llvm.org/D52588

Files:
  compiler-rt/lib/xray/CMakeLists.txt
  compiler-rt/lib/xray/tests/unit/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.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

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D52588.167241.patch
Type: text/x-patch
Size: 30237 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180927/7df2bec3/attachment.bin>


More information about the llvm-commits mailing list