| 文件 | 最后提交记录 | 最后更新时间 |
|---|---|---|
[ctxprof] root autodetection mechanism (#133147) This is an optional mechanism that automatically detects roots. It's a best-effort mechanism, and its main goal is to *avoid* pointing at the message pump function as a root. This is the function that polls message queue(s) in an infinite loop, and is thus a bad root (it never exits). High-level, when collection is requested - which should happen when a server has already been set up and handing requests - we spend a bit of time sampling all the server's threads. Each sample is a stack which we insert in a PerThreadCallsiteTrie. After a while, we run for each PerThreadCallsiteTrie the root detection logic. We then traverse all the FunctionData, find the ones matching the detected roots, and allocate a ContextRoot for them. From here, we special case FunctionData objects, in __llvm_ctx_profile_get_context, that have a CtxRoot and route them to __llvm_ctx_profile_start_context. For this to work, on the llvm side, we need to have all functions call __llvm_ctx_profile_release_context because they _might_ be roots. This comes at a slight (percentages) penalty during collection - which we can afford since the overall technique is ~5x faster than normal instrumentation. We can later explore conditionally enabling autoroot detection and avoiding this penalty, if desired. Note that functions that musttail call` can't have their return instrumented this way, and a subsequent patch will harden the mechanism against this case. The mechanism could be used in combination with explicit root specification, too. | 1 年前 | |
[compiler-rt] Avoid assertions when using LLVM_ENABLE_PER_TARGET_RUNTIME_DIR (#90127) Previously, the memprof and ctx_profile lit.site.cfg would assert if the enable_per_target_runtime_dir was set and the config.target_arch != config.host_arch. However, config.host_arch would never be set, meaning this would always fail in a when using LLVM_ENABLE_PER_TARGET_RUNTIME_DIR. This patch follows the example in the ASAN lit.site.cfg.py that updates the compiler_rt_libdir appropriately. | 2 年前 | |
[compiler-rt] Cleanup use of COMPILER_RT_INCLUDE_TESTS (#98246) 1. Move checks into parent test/CMakeLists.txt 2. COMPILER_RT_INCLUDE_TESTS disable both lit and gtests. Before it was very inconsistent between sanitizers. | 2 年前 | |
Rename config.host_os to config.target_os. config.host_os is derived from CMAKE_SYSTEM_NAME which specifies the target. See: https://cmake.org/cmake/help/latest/variable/CMAKE_SYSTEM_NAME.html To reduce confusion, rename it to config.target_os. The variable name config.target_os was already being used by the Orc tests. Rename it to config.orc_test_target_os with a FIXME to remove. Reviewers: JDevlieghere, MaskRay Reviewed By: MaskRay Pull Request: https://github.com/llvm/llvm-project/pull/149015 | 1 年前 | |
[ctx_profile] Pull ContextNode in a .inc file (#91669) This pulls out ContextNode as we need to use it pretty much as-is to implement a writer. The writer will be implemented on the LLVM side because it takes a dependency on BitStreamWriter. Since we can't reuse a header between compiler-rt and llvm, we use a header file which is copied on both sides, and test that the 2 copies are identical. The changes adds the necessary other stuff for compiler-rt/ctx_profile testing. | 2 年前 |
| 文件 | 最后提交记录 | 最后更新时间 |
|---|---|---|
| 1 年前 | ||
| 2 年前 | ||
| 2 年前 | ||
| 1 年前 | ||
| 2 年前 |