Merge pull request #22580 from ClickHouse/qemu-user-disable-profiler

Allow query profiling only on x86_64
This commit is contained in:
alexey-milovidov 2021-04-04 12:04:30 +03:00 committed by GitHub
commit 569cc8638c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -986,7 +986,7 @@ int Server::main(const std::vector<std::string> & /*args*/)
///
/// Look at compiler-rt/lib/sanitizer_common/sanitizer_stacktrace.h
///
#if USE_UNWIND && !WITH_COVERAGE && !defined(SANITIZER)
#if USE_UNWIND && !WITH_COVERAGE && !defined(SANITIZER) && defined(__x86_64__)
/// Profilers cannot work reliably with any other libunwind or without PHDR cache.
if (hasPHDRCache())
{
@ -1023,6 +1023,10 @@ int Server::main(const std::vector<std::string> & /*args*/)
" when two different stack unwinding methods will interfere with each other.");
#endif
#if !defined(__x86_64__)
LOG_INFO(log, "Query Profiler is only tested on x86_64. It also known to not work under qemu-user.");
#endif
if (!hasPHDRCache())
LOG_INFO(log, "Query Profiler and TraceCollector are disabled because they require PHDR cache to be created"
" (otherwise the function 'dl_iterate_phdr' is not lock free and not async-signal safe).");