]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
common: add admin socket control and CMake flag for cputrace
authorJaya Prakash <jayaprakash@ibm.com>
Thu, 3 Jul 2025 11:25:39 +0000 (11:25 +0000)
committerJaya Prakash <jayaprakash@ibm.com>
Tue, 7 Oct 2025 14:13:47 +0000 (14:13 +0000)
commit905d2a0714ed48e5e6757a5a3839fe09e79b7c5c
tree83d3ed3c13e99032dc5433cfda58e5e908131fce
parentefc8b483664dc5b0d3b4ba61e5aa6ceaaa566a2d
common: add admin socket control and CMake flag for cputrace

- Introduced a separate CMake flag to enable cputrace:
    cmake -DWITH_CPUTRACE=1 ...

- Added admin socket interface for runtime control:
    - `ceph tell osd.X cputrace start`   → Start profiling
    - `ceph tell osd.X cputrace stop`    → Stop profiling
    - `ceph tell osd.X cputrace dump`    → Dump collected metrics
    - `ceph tell osd.X cputrace reset`   → Reset profiling state

This enables developers to dynamically control profiling during runtime
without rebuilding or restarting the OSD, and ensures `cputrace` remains
disabled in production unless explicitly enabled at build time.

Signed-off-by: Jaya Prakash <jayaprakash@ibm.com>
CMakeLists.txt
src/CMakeLists.txt
src/common/CMakeLists.txt
src/common/ceph_context.cc