aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Transforms/Instrumentation/ControlHeightReduction.cpp
diff options
context:
space:
mode:
authorSaleem Abdulrasool <compnerd@compnerd.org>2021-06-11 19:05:42 -0700
committerSaleem Abdulrasool <compnerd@compnerd.org>2021-06-12 09:27:44 -0700
commit76f1baa7875acd88bdd4b431eed6e2d2decfc0fe (patch)
tree60ddbaeb7f2f9ec2bf12dc2d919dbc6e5ef94fd5 /llvm/lib/Transforms/Instrumentation/ControlHeightReduction.cpp
parent1e50c3d785f4563873ab1ce86559f2a1285b5678 (diff)
downloadllvm-76f1baa7875acd88bdd4b431eed6e2d2decfc0fe.zip
llvm-76f1baa7875acd88bdd4b431eed6e2d2decfc0fe.tar.gz
llvm-76f1baa7875acd88bdd4b431eed6e2d2decfc0fe.tar.bz2
Revert "Revert "DirectoryWatcher: add an implementation for Windows""
This reverts commit 0ec1cf13f2a4e31aa2c5ccc665c5fbdcd3a94577. Restore the implementation with some minor tweaks: - Use std::unique_ptr for the path instead of std::vector * Stylistic improvement as the buffer is already heap allocated, this just makes it clearer. - Correct the notification buffer allocation size * Memory usage fix: we were allocating 4x the computed size - Correct the passing of the buffer size to RDC * Memory usage fix: we were reporting 1/4th of the size - Convert the operation event to auto-reset * Bug Fix: we never reset the event - Remove `FILE_NOTIFY_CHANGE_LAST_ACCESS` from RDC events * Memory usage fix: we never needed this notification - Fold events for the notification action * Stylistic improvement to be clear how the events map - Update comment * Stylistic improvement to be clear what the RAII controls - Fix the race condition that was uncovered previously * We would return from the construction before the watcher thread began execution. The test would then proceed to begin execution, and we would miss the initial notifications. We now ensure that the watcher thread is initialized before we return. This ensures that we do not miss the initial notifications. Running the test on a SSD was able to uncover the access pattern. This now seems to pass reliably where it was previously flaky locally.
Diffstat (limited to 'llvm/lib/Transforms/Instrumentation/ControlHeightReduction.cpp')
0 files changed, 0 insertions, 0 deletions