[all-commits] [llvm/llvm-project] 159b87: [llvm][telemetry]Change Telemetry-disabling mechan...

Vy Nguyen via All-commits all-commits at lists.llvm.org
Wed Feb 26 10:02:14 PST 2025


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 159b872b37363511a359c800bcc9230bb09f2457
      https://github.com/llvm/llvm-project/commit/159b872b37363511a359c800bcc9230bb09f2457
  Author: Vy Nguyen <vyng at google.com>
  Date:   2025-02-26 (Wed, 26 Feb 2025)

  Changed paths:
    M lldb/source/Core/CMakeLists.txt
    M lldb/source/Core/Telemetry.cpp
    M lldb/unittests/Core/CMakeLists.txt
    M lldb/unittests/Core/TelemetryTest.cpp
    M llvm/CMakeLists.txt
    M llvm/cmake/modules/LLVMConfig.cmake.in
    M llvm/include/llvm/Config/llvm-config.h.cmake
    M llvm/include/llvm/Telemetry/Telemetry.h
    M llvm/lib/CMakeLists.txt
    M llvm/lib/Telemetry/Telemetry.cpp
    M llvm/unittests/CMakeLists.txt
    M llvm/unittests/Telemetry/TelemetryTest.cpp
    M llvm/utils/gn/secondary/llvm/include/llvm/Config/BUILD.gn
    M utils/bazel/llvm_configs/llvm-config.h.cmake

  Log Message:
  -----------
  [llvm][telemetry]Change Telemetry-disabling mechanism. (#128534)

Details:
- Previously, we used the LLVM_BUILD_TELEMETRY flag to control whether
any Telemetry code will be built. This has proven to cause more nuisance
to both users of the Telemetry and any further extension of it. (Eg., we
needed to put #ifdef around caller/user code)

- So the new approach is to:
+ Remove this flag and introduce LLVM_ENABLE_TELEMETRY which would be
true by default.
+ If LLVM_ENABLE_TELEMETRY is set to FALSE (at buildtime), the library
would still be built BUT Telemetry cannot be enabled. And no data can be
collected.

The benefit of this is that it simplifies user (and extension) code
since we just need to put the check on Config::EnableTelemetry. Besides,
the Telemetry library itself is very small, hence the additional code to
be built would not cause any difference in build performance.

---------

Co-authored-by: Pavel Labath <pavel at labath.sk>



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list