[llvm] 1048b7f - [llvm-exegesis] Make sure auxiliary memory is unlinked after usage
Aiden Grossman via llvm-commits
llvm-commits at lists.llvm.org
Fri Jun 30 12:43:28 PDT 2023
Author: Aiden Grossman
Date: 2023-06-30T12:43:20-07:00
New Revision: 1048b7f8e7c467d1265b3d808ab35ea2e42e79b6
URL: https://github.com/llvm/llvm-project/commit/1048b7f8e7c467d1265b3d808ab35ea2e42e79b6
DIFF: https://github.com/llvm/llvm-project/commit/1048b7f8e7c467d1265b3d808ab35ea2e42e79b6.diff
LOG: [llvm-exegesis] Make sure auxiliary memory is unlinked after usage
Currently the shm_unlink is never called on the auxiliary memory shared
memory, so it stays around after running llvm-exegesis (including
running the llvm-exegesis tests). This patch adds the auxiliary memory
shared memory name to the SharedMemoryNames list so that it gets
unlinked when the destructor of SubprocessMemory is called.
Added:
Modified:
llvm/tools/llvm-exegesis/lib/SubprocessMemory.cpp
Removed:
################################################################################
diff --git a/llvm/tools/llvm-exegesis/lib/SubprocessMemory.cpp b/llvm/tools/llvm-exegesis/lib/SubprocessMemory.cpp
index 28dfa06283e898..750e49d8e304b6 100644
--- a/llvm/tools/llvm-exegesis/lib/SubprocessMemory.cpp
+++ b/llvm/tools/llvm-exegesis/lib/SubprocessMemory.cpp
@@ -37,6 +37,7 @@ Error SubprocessMemory::initializeSubprocessMemory(pid_t ProcessID) {
return make_error<Failure>("Truncating the auxiliary memory failed: " +
Twine(strerror(errno)));
}
+ SharedMemoryNames.push_back(AuxiliaryMemoryName);
return Error::success();
}
More information about the llvm-commits
mailing list