pyroscope-io 1.3.0__tar.gz → 2.0.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {pyroscope_io-1.3.0 → pyroscope_io-2.0.0}/MANIFEST.in +11 -1
- {pyroscope_io-1.3.0/python/pyroscope_io.egg-info → pyroscope_io-2.0.0}/PKG-INFO +9 -2
- pyroscope_io-2.0.0/README.md +22 -0
- {pyroscope_io-1.3.0 → pyroscope_io-2.0.0}/dd-trace-py/CMakeLists.txt +0 -37
- {pyroscope_io-1.3.0 → pyroscope_io-2.0.0}/dd-trace-py/ddtrace/internal/datadog/profiling/dd_wrapper/include/profiler_stats.hpp +3 -0
- {pyroscope_io-1.3.0 → pyroscope_io-2.0.0}/dd-trace-py/ddtrace/internal/datadog/profiling/dd_wrapper/src/profiler_stats.cpp +22 -0
- {pyroscope_io-1.3.0 → pyroscope_io-2.0.0}/dd-trace-py/ddtrace/internal/datadog/profiling/stack/echion/echion/danger.h +14 -0
- {pyroscope_io-1.3.0 → pyroscope_io-2.0.0}/dd-trace-py/ddtrace/internal/datadog/profiling/stack/echion/echion/threads.h +8 -1
- {pyroscope_io-1.3.0 → pyroscope_io-2.0.0}/dd-trace-py/ddtrace/internal/datadog/profiling/stack/echion/echion/vm.h +7 -9
- pyroscope_io-2.0.0/dd-trace-py/ddtrace/internal/datadog/profiling/stack/include/cpu_sample_ring.hpp +112 -0
- pyroscope_io-2.0.0/dd-trace-py/ddtrace/internal/datadog/profiling/stack/include/cpu_timer.hpp +83 -0
- pyroscope_io-2.0.0/dd-trace-py/ddtrace/internal/datadog/profiling/stack/include/cpu_timer_tid_table.hpp +255 -0
- {pyroscope_io-1.3.0 → pyroscope_io-2.0.0}/dd-trace-py/ddtrace/internal/datadog/profiling/stack/include/sampler.hpp +3 -7
- {pyroscope_io-1.3.0 → pyroscope_io-2.0.0}/dd-trace-py/ddtrace/internal/datadog/profiling/stack/include/stack_renderer.hpp +5 -0
- pyroscope_io-2.0.0/dd-trace-py/ddtrace/internal/datadog/profiling/stack/src/cpu_timer.cpp +1535 -0
- {pyroscope_io-1.3.0 → pyroscope_io-2.0.0}/dd-trace-py/ddtrace/internal/datadog/profiling/stack/src/echion/danger.cc +54 -6
- {pyroscope_io-1.3.0 → pyroscope_io-2.0.0}/dd-trace-py/ddtrace/internal/datadog/profiling/stack/src/echion/threads.cc +439 -10
- pyroscope_io-2.0.0/dd-trace-py/ddtrace/internal/datadog/profiling/stack/src/echion/vm.cc +120 -0
- {pyroscope_io-1.3.0 → pyroscope_io-2.0.0}/dd-trace-py/ddtrace/internal/datadog/profiling/stack/src/sampler.cpp +182 -148
- {pyroscope_io-1.3.0 → pyroscope_io-2.0.0}/dd-trace-py/ddtrace/internal/datadog/profiling/stack/src/stack.cpp +111 -31
- {pyroscope_io-1.3.0 → pyroscope_io-2.0.0}/dd-trace-py/ddtrace/internal/datadog/profiling/stack/src/stack_renderer.cpp +43 -0
- pyroscope_io-2.0.0/dd-trace-py/ddtrace/internal/datadog/profiling/stack/test/test_cpu_sample_ring.cpp +178 -0
- pyroscope_io-2.0.0/dd-trace-py/ddtrace/internal/datadog/profiling/stack/test/test_cpu_timer_tid_table.cpp +164 -0
- {pyroscope_io-1.3.0 → pyroscope_io-2.0.0}/dd-trace-py/pyroscope/Pyroscope.h +0 -85
- pyroscope_io-2.0.0/kindasafe/Cargo.lock +25 -0
- pyroscope_io-2.0.0/kindasafe/Cargo.toml +6 -0
- pyroscope_io-2.0.0/kindasafe/LICENSE +202 -0
- pyroscope_io-2.0.0/kindasafe/kindasafe/Cargo.toml +16 -0
- pyroscope_io-2.0.0/kindasafe/kindasafe/README.md +86 -0
- pyroscope_io-2.0.0/kindasafe/kindasafe/build.rs +10 -0
- pyroscope_io-2.0.0/kindasafe/kindasafe/src/lib.rs +473 -0
- pyroscope_io-2.0.0/kindasafe/kindasafe/tests/asan.rs +257 -0
- pyroscope_io-2.0.0/kindasafe/kindasafe/tests/fallback.rs +4 -0
- pyroscope_io-2.0.0/kindasafe/kindasafe/tests/positive.rs +573 -0
- pyroscope_io-2.0.0/kindasafe/kindasafe/tests/recovered_faults.rs +62 -0
- pyroscope_io-2.0.0/kindasafe/kindasafe_init/Cargo.toml +14 -0
- pyroscope_io-2.0.0/kindasafe/kindasafe_init/README.md +52 -0
- pyroscope_io-2.0.0/kindasafe/kindasafe_init/build.rs +10 -0
- pyroscope_io-2.0.0/kindasafe/kindasafe_init/src/lib.rs +106 -0
- pyroscope_io-2.0.0/kindasafe/kindasafe_init/src/recovery.rs +263 -0
- pyroscope_io-2.0.0/kindasafe/kindasafe_init/tests/asan.rs +37 -0
- pyroscope_io-2.0.0/kindasafe/kindasafe_init/tests/common/errno_guard.rs +41 -0
- pyroscope_io-2.0.0/kindasafe/kindasafe_init/tests/fallback.rs +256 -0
- pyroscope_io-2.0.0/kindasafe/kindasafe_init/tests/publication.rs +235 -0
- pyroscope_io-2.0.0/kindasafe/kindasafe_init/tests/sigprof_mask.rs +122 -0
- pyroscope_io-2.0.0/py-spy/Cargo.toml +60 -0
- pyroscope_io-2.0.0/py-spy/LICENSE +21 -0
- pyroscope_io-2.0.0/py-spy/README.md +304 -0
- pyroscope_io-2.0.0/py-spy/build.rs +22 -0
- pyroscope_io-2.0.0/py-spy/src/asan.rs +224 -0
- pyroscope_io-2.0.0/py-spy/src/binary_parser.rs +333 -0
- pyroscope_io-2.0.0/py-spy/src/chrometrace.rs +122 -0
- pyroscope_io-2.0.0/py-spy/src/config.rs +670 -0
- pyroscope_io-2.0.0/py-spy/src/console_viewer.rs +680 -0
- pyroscope_io-2.0.0/py-spy/src/coredump.rs +538 -0
- pyroscope_io-2.0.0/py-spy/src/cython.rs +277 -0
- pyroscope_io-2.0.0/py-spy/src/dump.rs +163 -0
- pyroscope_io-2.0.0/py-spy/src/flamegraph.rs +102 -0
- pyroscope_io-2.0.0/py-spy/src/lib.rs +59 -0
- pyroscope_io-2.0.0/py-spy/src/main.rs +595 -0
- pyroscope_io-2.0.0/py-spy/src/native_stack_trace.rs +377 -0
- pyroscope_io-2.0.0/py-spy/src/python_bindings/mod.rs +263 -0
- pyroscope_io-2.0.0/py-spy/src/python_bindings/v2_7_15.rs +737 -0
- pyroscope_io-2.0.0/py-spy/src/python_bindings/v3_10_0.rs +1967 -0
- pyroscope_io-2.0.0/py-spy/src/python_bindings/v3_11_0.rs +2100 -0
- pyroscope_io-2.0.0/py-spy/src/python_bindings/v3_12_0.rs +16585 -0
- pyroscope_io-2.0.0/py-spy/src/python_bindings/v3_13_0.rs +13791 -0
- pyroscope_io-2.0.0/py-spy/src/python_bindings/v3_14_0.rs +18419 -0
- pyroscope_io-2.0.0/py-spy/src/python_bindings/v3_15_0.rs +20015 -0
- pyroscope_io-2.0.0/py-spy/src/python_bindings/v3_3_7.rs +902 -0
- pyroscope_io-2.0.0/py-spy/src/python_bindings/v3_4_8.rs +893 -0
- pyroscope_io-2.0.0/py-spy/src/python_bindings/v3_5_5.rs +938 -0
- pyroscope_io-2.0.0/py-spy/src/python_bindings/v3_6_6.rs +965 -0
- pyroscope_io-2.0.0/py-spy/src/python_bindings/v3_7_0.rs +1082 -0
- pyroscope_io-2.0.0/py-spy/src/python_bindings/v3_8_0.rs +1362 -0
- pyroscope_io-2.0.0/py-spy/src/python_bindings/v3_9_5.rs +1478 -0
- pyroscope_io-2.0.0/py-spy/src/python_data_access/string_tests.rs +163 -0
- pyroscope_io-2.0.0/py-spy/src/python_data_access.rs +982 -0
- pyroscope_io-2.0.0/py-spy/src/python_interpreters.rs +1160 -0
- pyroscope_io-2.0.0/py-spy/src/python_process_info.rs +1600 -0
- pyroscope_io-2.0.0/py-spy/src/python_spy.rs +664 -0
- pyroscope_io-2.0.0/py-spy/src/python_threading.rs +165 -0
- pyroscope_io-2.0.0/py-spy/src/sampler.rs +419 -0
- pyroscope_io-2.0.0/py-spy/src/speedscope.rs +318 -0
- pyroscope_io-2.0.0/py-spy/src/stack_trace.rs +521 -0
- pyroscope_io-2.0.0/py-spy/src/timer.rs +73 -0
- pyroscope_io-2.0.0/py-spy/src/utils.rs +82 -0
- pyroscope_io-2.0.0/py-spy/src/version.rs +196 -0
- {pyroscope_io-1.3.0 → pyroscope_io-2.0.0}/pyproject.toml +6 -3
- pyroscope_io-2.0.0/python/pyroscope/__init__.py +185 -0
- {pyroscope_io-1.3.0 → pyroscope_io-2.0.0/python/pyroscope_io.egg-info}/PKG-INFO +9 -2
- {pyroscope_io-1.3.0 → pyroscope_io-2.0.0}/python/pyroscope_io.egg-info/SOURCES.txt +125 -8
- {pyroscope_io-1.3.0 → pyroscope_io-2.0.0}/rust/Cargo.lock +755 -247
- pyroscope_io-2.0.0/rust/Cargo.toml +61 -0
- {pyroscope_io-1.3.0 → pyroscope_io-2.0.0}/rust/build.rs +4 -2
- pyroscope_io-2.0.0/rust/crates/benchmarks/Cargo.toml +24 -0
- pyroscope_io-2.0.0/rust/crates/benchmarks/benches/signal_stack.rs +190 -0
- pyroscope_io-2.0.0/rust/crates/benchmarks/benches/support/profiling.rs +86 -0
- pyroscope_io-2.0.0/rust/crates/benchmarks/build.rs +15 -0
- pyroscope_io-2.0.0/rust/crates/pprof/Cargo.toml +10 -0
- pyroscope_io-1.3.0/rust/src/encode/pprof.rs → pyroscope_io-2.0.0/rust/crates/pprof/src/lib.rs +86 -202
- pyroscope_io-2.0.0/rust/crates/pprof/src/time_range.rs +28 -0
- pyroscope_io-2.0.0/rust/crates/python-offsets/Cargo.toml +13 -0
- pyroscope_io-2.0.0/rust/crates/python-offsets/build.rs +88 -0
- pyroscope_io-2.0.0/rust/crates/python-offsets/python_offsets.c +123 -0
- pyroscope_io-2.0.0/rust/crates/python-offsets/src/lib.rs +36 -0
- pyroscope_io-2.0.0/rust/crates/python-offsets/src/v3_11.rs +25 -0
- pyroscope_io-2.0.0/rust/crates/python-offsets/src/v3_12.rs +27 -0
- pyroscope_io-2.0.0/rust/crates/python-offsets/src/v3_13.rs +26 -0
- pyroscope_io-2.0.0/rust/crates/python-offsets/src/v3_14.rs +28 -0
- pyroscope_io-2.0.0/rust/crates/python-offsets/src/v3_15.rs +27 -0
- pyroscope_io-2.0.0/rust/crates/python-resolve/Cargo.toml +21 -0
- pyroscope_io-2.0.0/rust/crates/python-resolve/build.rs +3 -0
- pyroscope_io-2.0.0/rust/crates/python-resolve/src/lib.rs +189 -0
- pyroscope_io-2.0.0/rust/crates/python-resolve/src/lines/v3_11.rs +151 -0
- pyroscope_io-2.0.0/rust/crates/python-resolve/src/lines.rs +285 -0
- pyroscope_io-2.0.0/rust/crates/python-resolve/src/strings.rs +217 -0
- pyroscope_io-2.0.0/rust/crates/python-resolve/src/tests.rs +339 -0
- pyroscope_io-2.0.0/rust/crates/python-thread-state/Cargo.toml +22 -0
- pyroscope_io-2.0.0/rust/crates/python-thread-state/build.rs +3 -0
- pyroscope_io-2.0.0/rust/crates/python-thread-state/src/glibc.rs +520 -0
- pyroscope_io-2.0.0/rust/crates/python-thread-state/src/lib.rs +79 -0
- pyroscope_io-2.0.0/rust/crates/python-thread-state/src/musl.rs +13 -0
- pyroscope_io-2.0.0/rust/crates/python-thread-state/src/pre_3_15.rs +13 -0
- pyroscope_io-2.0.0/rust/crates/python-thread-state/src/unsupported.rs +13 -0
- pyroscope_io-2.0.0/rust/crates/python-unwind/Cargo.toml +19 -0
- pyroscope_io-2.0.0/rust/crates/python-unwind/build.rs +3 -0
- pyroscope_io-2.0.0/rust/crates/python-unwind/src/lib.rs +706 -0
- pyroscope_io-2.0.0/rust/crates/python-unwind/src/thread_state/glibc.rs +244 -0
- pyroscope_io-2.0.0/rust/crates/python-unwind/src/thread_state/mod.rs +56 -0
- pyroscope_io-2.0.0/rust/crates/python-unwind/src/thread_state/musl.rs +10 -0
- pyroscope_io-2.0.0/rust/crates/python-unwind/src/thread_state/pre_3_15.rs +9 -0
- pyroscope_io-2.0.0/rust/crates/python-unwind/src/thread_state/unsupported.rs +8 -0
- pyroscope_io-2.0.0/rust/crates/ringbuffer/Cargo.toml +9 -0
- pyroscope_io-2.0.0/rust/crates/ringbuffer/src/lib.rs +182 -0
- pyroscope_io-2.0.0/rust/crates/ringbuffer/src/tests/mod.rs +4 -0
- pyroscope_io-2.0.0/rust/crates/ringbuffer/src/tests/ringbuffer.rs +265 -0
- pyroscope_io-2.0.0/rust/crates/ringbuffer/src/tests/ringbuffer_stress.rs +214 -0
- pyroscope_io-2.0.0/rust/crates/signal-timer/Cargo.toml +9 -0
- pyroscope_io-2.0.0/rust/crates/signal-timer/src/ctimer.rs +50 -0
- pyroscope_io-2.0.0/rust/crates/signal-timer/src/itimer.rs +38 -0
- pyroscope_io-2.0.0/rust/crates/signal-timer/src/lib.rs +197 -0
- pyroscope_io-2.0.0/rust/crates/signal-timer/src/tests/common.rs +29 -0
- pyroscope_io-2.0.0/rust/crates/signal-timer/src/tests/ctimer.rs +206 -0
- pyroscope_io-2.0.0/rust/crates/signal-timer/src/tests/itimer.rs +159 -0
- pyroscope_io-2.0.0/rust/crates/signal-timer/src/tests/mod.rs +3 -0
- {pyroscope_io-1.3.0 → pyroscope_io-2.0.0}/rust/include/pyroscope_ffi.h +8 -14
- pyroscope_io-2.0.0/rust/src/encode/gen/mod.rs +3 -0
- pyroscope_io-2.0.0/rust/src/encode/pprof.rs +33 -0
- pyroscope_io-2.0.0/rust/src/ffi.rs +19 -0
- {pyroscope_io-1.3.0 → pyroscope_io-2.0.0}/rust/src/ffikit.rs +1 -7
- {pyroscope_io-1.3.0 → pyroscope_io-2.0.0}/rust/src/lib.rs +72 -39
- {pyroscope_io-1.3.0 → pyroscope_io-2.0.0}/rust/src/pyroscope.rs +112 -30
- {pyroscope_io-1.3.0 → pyroscope_io-2.0.0}/rust/src/pyspy_backend.rs +75 -9
- {pyroscope_io-1.3.0 → pyroscope_io-2.0.0}/rust/src/session.rs +4 -13
- pyroscope_io-2.0.0/rust/src/signal_backend.rs +572 -0
- pyroscope_io-2.0.0/rust/src/signal_sampler/tests/cpython.rs +382 -0
- pyroscope_io-2.0.0/rust/src/signal_sampler.rs +227 -0
- {pyroscope_io-1.3.0 → pyroscope_io-2.0.0}/rust/src/utils.rs +1 -26
- {pyroscope_io-1.3.0 → pyroscope_io-2.0.0}/setup.py +16 -10
- pyroscope_io-1.3.0/README.md +0 -15
- pyroscope_io-1.3.0/dd-trace-py/ddtrace/internal/datadog/profiling/stack/src/echion/vm.cc +0 -237
- pyroscope_io-1.3.0/dd-trace-py/pyroscope/stack_ffi.cpp +0 -133
- pyroscope_io-1.3.0/python/pyroscope/__init__.py +0 -260
- pyroscope_io-1.3.0/rust/Cargo.toml +0 -30
- pyroscope_io-1.3.0/rust/src/encode/gen/mod.rs +0 -3
- pyroscope_io-1.3.0/rust/src/ffi.rs +0 -77
- pyroscope_io-1.3.0/rust/src/stack/faulthandler.rs +0 -85
- pyroscope_io-1.3.0/rust/src/stack/mod.rs +0 -268
- pyroscope_io-1.3.0/rust/src/stack/sampler.rs +0 -76
- pyroscope_io-1.3.0/rust/src/stack/sampler_tests.rs +0 -4
- pyroscope_io-1.3.0/rust/src/stack/tests.rs +0 -201
- pyroscope_io-1.3.0/rust/src/stack/threads.rs +0 -47
- {pyroscope_io-1.3.0 → pyroscope_io-2.0.0}/LICENSE +0 -0
- {pyroscope_io-1.3.0 → pyroscope_io-2.0.0}/dd-trace-py/BundleStaticLibrary.cmake +0 -0
- {pyroscope_io-1.3.0 → pyroscope_io-2.0.0}/dd-trace-py/ddtrace/internal/_threads.cpp +0 -0
- {pyroscope_io-1.3.0 → pyroscope_io-2.0.0}/dd-trace-py/ddtrace/internal/datadog/profiling/dd_wrapper/include/clock.hpp +0 -0
- {pyroscope_io-1.3.0 → pyroscope_io-2.0.0}/dd-trace-py/ddtrace/internal/datadog/profiling/dd_wrapper/include/code_provenance.hpp +0 -0
- {pyroscope_io-1.3.0 → pyroscope_io-2.0.0}/dd-trace-py/ddtrace/internal/datadog/profiling/dd_wrapper/include/constants.hpp +0 -0
- {pyroscope_io-1.3.0 → pyroscope_io-2.0.0}/dd-trace-py/ddtrace/internal/datadog/profiling/dd_wrapper/include/ddup_interface.hpp +0 -0
- {pyroscope_io-1.3.0 → pyroscope_io-2.0.0}/dd-trace-py/ddtrace/internal/datadog/profiling/dd_wrapper/include/defer.hpp +0 -0
- {pyroscope_io-1.3.0 → pyroscope_io-2.0.0}/dd-trace-py/ddtrace/internal/datadog/profiling/dd_wrapper/include/libdatadog_helpers.hpp +0 -0
- {pyroscope_io-1.3.0 → pyroscope_io-2.0.0}/dd-trace-py/ddtrace/internal/datadog/profiling/dd_wrapper/include/native_call_tracker.hpp +0 -0
- {pyroscope_io-1.3.0 → pyroscope_io-2.0.0}/dd-trace-py/ddtrace/internal/datadog/profiling/dd_wrapper/include/profile.hpp +0 -0
- {pyroscope_io-1.3.0 → pyroscope_io-2.0.0}/dd-trace-py/ddtrace/internal/datadog/profiling/dd_wrapper/include/profile_borrow.hpp +0 -0
- {pyroscope_io-1.3.0 → pyroscope_io-2.0.0}/dd-trace-py/ddtrace/internal/datadog/profiling/dd_wrapper/include/profiler_state.hpp +0 -0
- {pyroscope_io-1.3.0 → pyroscope_io-2.0.0}/dd-trace-py/ddtrace/internal/datadog/profiling/dd_wrapper/include/pymacro.hpp +0 -0
- {pyroscope_io-1.3.0 → pyroscope_io-2.0.0}/dd-trace-py/ddtrace/internal/datadog/profiling/dd_wrapper/include/python_helpers.hpp +0 -0
- {pyroscope_io-1.3.0 → pyroscope_io-2.0.0}/dd-trace-py/ddtrace/internal/datadog/profiling/dd_wrapper/include/sample.hpp +0 -0
- {pyroscope_io-1.3.0 → pyroscope_io-2.0.0}/dd-trace-py/ddtrace/internal/datadog/profiling/dd_wrapper/include/sample_manager.hpp +0 -0
- {pyroscope_io-1.3.0 → pyroscope_io-2.0.0}/dd-trace-py/ddtrace/internal/datadog/profiling/dd_wrapper/include/scope.hpp +0 -0
- {pyroscope_io-1.3.0 → pyroscope_io-2.0.0}/dd-trace-py/ddtrace/internal/datadog/profiling/dd_wrapper/include/static_sample_pool.hpp +0 -0
- {pyroscope_io-1.3.0 → pyroscope_io-2.0.0}/dd-trace-py/ddtrace/internal/datadog/profiling/dd_wrapper/include/types.hpp +0 -0
- {pyroscope_io-1.3.0 → pyroscope_io-2.0.0}/dd-trace-py/ddtrace/internal/datadog/profiling/dd_wrapper/include/uploader.hpp +0 -0
- {pyroscope_io-1.3.0 → pyroscope_io-2.0.0}/dd-trace-py/ddtrace/internal/datadog/profiling/dd_wrapper/include/uploader_builder.hpp +0 -0
- {pyroscope_io-1.3.0 → pyroscope_io-2.0.0}/dd-trace-py/ddtrace/internal/datadog/profiling/dd_wrapper/src/code_provenance.cpp +0 -0
- {pyroscope_io-1.3.0 → pyroscope_io-2.0.0}/dd-trace-py/ddtrace/internal/datadog/profiling/dd_wrapper/src/ddup_interface.cpp +0 -0
- {pyroscope_io-1.3.0 → pyroscope_io-2.0.0}/dd-trace-py/ddtrace/internal/datadog/profiling/dd_wrapper/src/libdatadog_helpers.cpp +0 -0
- {pyroscope_io-1.3.0 → pyroscope_io-2.0.0}/dd-trace-py/ddtrace/internal/datadog/profiling/dd_wrapper/src/native_call_tracker.cpp +0 -0
- {pyroscope_io-1.3.0 → pyroscope_io-2.0.0}/dd-trace-py/ddtrace/internal/datadog/profiling/dd_wrapper/src/profile.cpp +0 -0
- {pyroscope_io-1.3.0 → pyroscope_io-2.0.0}/dd-trace-py/ddtrace/internal/datadog/profiling/dd_wrapper/src/profile_borrow.cpp +0 -0
- {pyroscope_io-1.3.0 → pyroscope_io-2.0.0}/dd-trace-py/ddtrace/internal/datadog/profiling/dd_wrapper/src/profiler_state.cpp +0 -0
- {pyroscope_io-1.3.0 → pyroscope_io-2.0.0}/dd-trace-py/ddtrace/internal/datadog/profiling/dd_wrapper/src/sample.cpp +0 -0
- {pyroscope_io-1.3.0 → pyroscope_io-2.0.0}/dd-trace-py/ddtrace/internal/datadog/profiling/dd_wrapper/src/sample_manager.cpp +0 -0
- {pyroscope_io-1.3.0 → pyroscope_io-2.0.0}/dd-trace-py/ddtrace/internal/datadog/profiling/dd_wrapper/src/static_sample_pool.cpp +0 -0
- {pyroscope_io-1.3.0 → pyroscope_io-2.0.0}/dd-trace-py/ddtrace/internal/datadog/profiling/dd_wrapper/src/uploader.cpp +0 -0
- {pyroscope_io-1.3.0 → pyroscope_io-2.0.0}/dd-trace-py/ddtrace/internal/datadog/profiling/dd_wrapper/src/uploader_builder.cpp +0 -0
- {pyroscope_io-1.3.0 → pyroscope_io-2.0.0}/dd-trace-py/ddtrace/internal/datadog/profiling/dd_wrapper/test/test_api.cpp +0 -0
- {pyroscope_io-1.3.0 → pyroscope_io-2.0.0}/dd-trace-py/ddtrace/internal/datadog/profiling/dd_wrapper/test/test_cleanup_race.cpp +0 -0
- {pyroscope_io-1.3.0 → pyroscope_io-2.0.0}/dd-trace-py/ddtrace/internal/datadog/profiling/dd_wrapper/test/test_forking.cpp +0 -0
- {pyroscope_io-1.3.0 → pyroscope_io-2.0.0}/dd-trace-py/ddtrace/internal/datadog/profiling/dd_wrapper/test/test_initialization.cpp +0 -0
- {pyroscope_io-1.3.0 → pyroscope_io-2.0.0}/dd-trace-py/ddtrace/internal/datadog/profiling/dd_wrapper/test/test_threading.cpp +0 -0
- {pyroscope_io-1.3.0 → pyroscope_io-2.0.0}/dd-trace-py/ddtrace/internal/datadog/profiling/dd_wrapper/test/test_utils.hpp +0 -0
- {pyroscope_io-1.3.0 → pyroscope_io-2.0.0}/dd-trace-py/ddtrace/internal/datadog/profiling/profiling_helpers/frame_accessors.h +0 -0
- {pyroscope_io-1.3.0 → pyroscope_io-2.0.0}/dd-trace-py/ddtrace/internal/datadog/profiling/profiling_helpers/linetable_parser.h +0 -0
- {pyroscope_io-1.3.0 → pyroscope_io-2.0.0}/dd-trace-py/ddtrace/internal/datadog/profiling/profiling_helpers/version_compat.h +0 -0
- {pyroscope_io-1.3.0 → pyroscope_io-2.0.0}/dd-trace-py/ddtrace/internal/datadog/profiling/stack/echion/echion/cache.h +0 -0
- {pyroscope_io-1.3.0 → pyroscope_io-2.0.0}/dd-trace-py/ddtrace/internal/datadog/profiling/stack/echion/echion/config.h +0 -0
- {pyroscope_io-1.3.0 → pyroscope_io-2.0.0}/dd-trace-py/ddtrace/internal/datadog/profiling/stack/echion/echion/cpython/tasks.h +0 -0
- {pyroscope_io-1.3.0 → pyroscope_io-2.0.0}/dd-trace-py/ddtrace/internal/datadog/profiling/stack/echion/echion/echion_sampler.h +0 -0
- {pyroscope_io-1.3.0 → pyroscope_io-2.0.0}/dd-trace-py/ddtrace/internal/datadog/profiling/stack/echion/echion/errors.h +0 -0
- {pyroscope_io-1.3.0 → pyroscope_io-2.0.0}/dd-trace-py/ddtrace/internal/datadog/profiling/stack/echion/echion/frame.h +0 -0
- {pyroscope_io-1.3.0 → pyroscope_io-2.0.0}/dd-trace-py/ddtrace/internal/datadog/profiling/stack/echion/echion/greenlets.h +0 -0
- {pyroscope_io-1.3.0 → pyroscope_io-2.0.0}/dd-trace-py/ddtrace/internal/datadog/profiling/stack/echion/echion/interp.h +0 -0
- {pyroscope_io-1.3.0 → pyroscope_io-2.0.0}/dd-trace-py/ddtrace/internal/datadog/profiling/stack/echion/echion/long.h +0 -0
- {pyroscope_io-1.3.0 → pyroscope_io-2.0.0}/dd-trace-py/ddtrace/internal/datadog/profiling/stack/echion/echion/mirrors.h +0 -0
- {pyroscope_io-1.3.0 → pyroscope_io-2.0.0}/dd-trace-py/ddtrace/internal/datadog/profiling/stack/echion/echion/stack_chunk.h +0 -0
- {pyroscope_io-1.3.0 → pyroscope_io-2.0.0}/dd-trace-py/ddtrace/internal/datadog/profiling/stack/echion/echion/stacks.h +0 -0
- {pyroscope_io-1.3.0 → pyroscope_io-2.0.0}/dd-trace-py/ddtrace/internal/datadog/profiling/stack/echion/echion/state.h +0 -0
- {pyroscope_io-1.3.0 → pyroscope_io-2.0.0}/dd-trace-py/ddtrace/internal/datadog/profiling/stack/echion/echion/strings.h +0 -0
- {pyroscope_io-1.3.0 → pyroscope_io-2.0.0}/dd-trace-py/ddtrace/internal/datadog/profiling/stack/echion/echion/task_name.h +0 -0
- {pyroscope_io-1.3.0 → pyroscope_io-2.0.0}/dd-trace-py/ddtrace/internal/datadog/profiling/stack/echion/echion/tasks.h +0 -0
- {pyroscope_io-1.3.0 → pyroscope_io-2.0.0}/dd-trace-py/ddtrace/internal/datadog/profiling/stack/echion/echion/timing.h +0 -0
- {pyroscope_io-1.3.0 → pyroscope_io-2.0.0}/dd-trace-py/ddtrace/internal/datadog/profiling/stack/fuzz/fuzz_common.h +0 -0
- {pyroscope_io-1.3.0 → pyroscope_io-2.0.0}/dd-trace-py/ddtrace/internal/datadog/profiling/stack/fuzz/fuzz_echion_frame_create.cpp +0 -0
- {pyroscope_io-1.3.0 → pyroscope_io-2.0.0}/dd-trace-py/ddtrace/internal/datadog/profiling/stack/fuzz/fuzz_echion_frame_read.cpp +0 -0
- {pyroscope_io-1.3.0 → pyroscope_io-2.0.0}/dd-trace-py/ddtrace/internal/datadog/profiling/stack/fuzz/fuzz_echion_greenlet.cpp +0 -0
- {pyroscope_io-1.3.0 → pyroscope_io-2.0.0}/dd-trace-py/ddtrace/internal/datadog/profiling/stack/fuzz/fuzz_echion_interp.cpp +0 -0
- {pyroscope_io-1.3.0 → pyroscope_io-2.0.0}/dd-trace-py/ddtrace/internal/datadog/profiling/stack/fuzz/fuzz_echion_long.cpp +0 -0
- {pyroscope_io-1.3.0 → pyroscope_io-2.0.0}/dd-trace-py/ddtrace/internal/datadog/profiling/stack/fuzz/fuzz_echion_mirrors.cpp +0 -0
- {pyroscope_io-1.3.0 → pyroscope_io-2.0.0}/dd-trace-py/ddtrace/internal/datadog/profiling/stack/fuzz/fuzz_echion_pyunicode.cpp +0 -0
- {pyroscope_io-1.3.0 → pyroscope_io-2.0.0}/dd-trace-py/ddtrace/internal/datadog/profiling/stack/fuzz/fuzz_echion_stacks.cpp +0 -0
- {pyroscope_io-1.3.0 → pyroscope_io-2.0.0}/dd-trace-py/ddtrace/internal/datadog/profiling/stack/fuzz/fuzz_echion_strings.cpp +0 -0
- {pyroscope_io-1.3.0 → pyroscope_io-2.0.0}/dd-trace-py/ddtrace/internal/datadog/profiling/stack/fuzz/fuzz_echion_task_unwind.cpp +0 -0
- {pyroscope_io-1.3.0 → pyroscope_io-2.0.0}/dd-trace-py/ddtrace/internal/datadog/profiling/stack/fuzz/fuzz_echion_tasks.cpp +0 -0
- {pyroscope_io-1.3.0 → pyroscope_io-2.0.0}/dd-trace-py/ddtrace/internal/datadog/profiling/stack/fuzz/fuzz_echion_thread_unwind.cpp +0 -0
- {pyroscope_io-1.3.0 → pyroscope_io-2.0.0}/dd-trace-py/ddtrace/internal/datadog/profiling/stack/fuzz/fuzz_echion_thread_unwind_tasks.cpp +0 -0
- {pyroscope_io-1.3.0 → pyroscope_io-2.0.0}/dd-trace-py/ddtrace/internal/datadog/profiling/stack/fuzz/fuzz_memory_image.h +0 -0
- {pyroscope_io-1.3.0 → pyroscope_io-2.0.0}/dd-trace-py/ddtrace/internal/datadog/profiling/stack/include/constants.hpp +0 -0
- {pyroscope_io-1.3.0 → pyroscope_io-2.0.0}/dd-trace-py/ddtrace/internal/datadog/profiling/stack/include/gc_frame_tracker.hpp +0 -0
- {pyroscope_io-1.3.0 → pyroscope_io-2.0.0}/dd-trace-py/ddtrace/internal/datadog/profiling/stack/include/origin_task_links.hpp +0 -0
- {pyroscope_io-1.3.0 → pyroscope_io-2.0.0}/dd-trace-py/ddtrace/internal/datadog/profiling/stack/include/span_links.hpp +0 -0
- {pyroscope_io-1.3.0 → pyroscope_io-2.0.0}/dd-trace-py/ddtrace/internal/datadog/profiling/stack/include/util/cast_to_pyfunc.hpp +0 -0
- {pyroscope_io-1.3.0 → pyroscope_io-2.0.0}/dd-trace-py/ddtrace/internal/datadog/profiling/stack/src/echion/frame.cc +0 -0
- {pyroscope_io-1.3.0 → pyroscope_io-2.0.0}/dd-trace-py/ddtrace/internal/datadog/profiling/stack/src/echion/greenlets.cc +0 -0
- {pyroscope_io-1.3.0 → pyroscope_io-2.0.0}/dd-trace-py/ddtrace/internal/datadog/profiling/stack/src/echion/interp.cc +0 -0
- {pyroscope_io-1.3.0 → pyroscope_io-2.0.0}/dd-trace-py/ddtrace/internal/datadog/profiling/stack/src/echion/long.cc +0 -0
- {pyroscope_io-1.3.0 → pyroscope_io-2.0.0}/dd-trace-py/ddtrace/internal/datadog/profiling/stack/src/echion/mirrors.cc +0 -0
- {pyroscope_io-1.3.0 → pyroscope_io-2.0.0}/dd-trace-py/ddtrace/internal/datadog/profiling/stack/src/echion/stack_chunk.cc +0 -0
- {pyroscope_io-1.3.0 → pyroscope_io-2.0.0}/dd-trace-py/ddtrace/internal/datadog/profiling/stack/src/echion/stacks.cc +0 -0
- {pyroscope_io-1.3.0 → pyroscope_io-2.0.0}/dd-trace-py/ddtrace/internal/datadog/profiling/stack/src/echion/strings.cc +0 -0
- {pyroscope_io-1.3.0 → pyroscope_io-2.0.0}/dd-trace-py/ddtrace/internal/datadog/profiling/stack/src/echion/tasks.cc +0 -0
- {pyroscope_io-1.3.0 → pyroscope_io-2.0.0}/dd-trace-py/ddtrace/internal/datadog/profiling/stack/src/gc_frame_tracker.cpp +0 -0
- {pyroscope_io-1.3.0 → pyroscope_io-2.0.0}/dd-trace-py/ddtrace/internal/datadog/profiling/stack/src/origin_task_links.cpp +0 -0
- {pyroscope_io-1.3.0 → pyroscope_io-2.0.0}/dd-trace-py/ddtrace/internal/datadog/profiling/stack/src/span_links.cpp +0 -0
- {pyroscope_io-1.3.0 → pyroscope_io-2.0.0}/dd-trace-py/ddtrace/internal/datadog/profiling/stack/test/test_alt_stack_ownership.cpp +0 -0
- {pyroscope_io-1.3.0 → pyroscope_io-2.0.0}/dd-trace-py/ddtrace/internal/datadog/profiling/stack/test/test_embedded_fast_copy.cpp +0 -0
- {pyroscope_io-1.3.0 → pyroscope_io-2.0.0}/dd-trace-py/ddtrace/internal/datadog/profiling/stack/test/test_frame_state_315.cpp +0 -0
- {pyroscope_io-1.3.0 → pyroscope_io-2.0.0}/dd-trace-py/ddtrace/internal/datadog/profiling/stack/test/test_origin_task_links.cpp +0 -0
- {pyroscope_io-1.3.0 → pyroscope_io-2.0.0}/dd-trace-py/ddtrace/internal/datadog/profiling/stack/test/test_sample_lifecycle.cpp +0 -0
- {pyroscope_io-1.3.0 → pyroscope_io-2.0.0}/dd-trace-py/ddtrace/internal/datadog/profiling/stack/test/test_sampling_cycle_state.cpp +0 -0
- {pyroscope_io-1.3.0 → pyroscope_io-2.0.0}/dd-trace-py/ddtrace/internal/datadog/profiling/stack/test/test_segv_chain.cpp +0 -0
- {pyroscope_io-1.3.0 → pyroscope_io-2.0.0}/dd-trace-py/ddtrace/internal/datadog/profiling/stack/test/test_span_links.cpp +0 -0
- {pyroscope_io-1.3.0 → pyroscope_io-2.0.0}/dd-trace-py/ddtrace/internal/datadog/profiling/stack/test/test_task_traversal.cpp +0 -0
- {pyroscope_io-1.3.0 → pyroscope_io-2.0.0}/dd-trace-py/ddtrace/profiling/collector/_memalloc.cpp +0 -0
- {pyroscope_io-1.3.0 → pyroscope_io-2.0.0}/dd-trace-py/ddtrace/profiling/collector/_memalloc_debug.h +0 -0
- {pyroscope_io-1.3.0 → pyroscope_io-2.0.0}/dd-trace-py/ddtrace/profiling/collector/_memalloc_frame.h +0 -0
- {pyroscope_io-1.3.0 → pyroscope_io-2.0.0}/dd-trace-py/ddtrace/profiling/collector/_memalloc_gc_guard.hpp +0 -0
- {pyroscope_io-1.3.0 → pyroscope_io-2.0.0}/dd-trace-py/ddtrace/profiling/collector/_memalloc_heap.cpp +0 -0
- {pyroscope_io-1.3.0 → pyroscope_io-2.0.0}/dd-trace-py/ddtrace/profiling/collector/_memalloc_heap.h +0 -0
- {pyroscope_io-1.3.0 → pyroscope_io-2.0.0}/dd-trace-py/ddtrace/profiling/collector/_memalloc_reentrant.cpp +0 -0
- {pyroscope_io-1.3.0 → pyroscope_io-2.0.0}/dd-trace-py/ddtrace/profiling/collector/_memalloc_reentrant.h +0 -0
- {pyroscope_io-1.3.0 → pyroscope_io-2.0.0}/dd-trace-py/ddtrace/profiling/collector/_memalloc_tb.cpp +0 -0
- {pyroscope_io-1.3.0 → pyroscope_io-2.0.0}/dd-trace-py/ddtrace/profiling/collector/_memalloc_tb.h +0 -0
- {pyroscope_io-1.3.0 → pyroscope_io-2.0.0}/dd-trace-py/ddtrace/profiling/collector/_pymacro.h +0 -0
- {pyroscope_io-1.3.0 → pyroscope_io-2.0.0}/python/pyroscope_io/__init__.py +0 -0
- {pyroscope_io-1.3.0 → pyroscope_io-2.0.0}/python/pyroscope_io.egg-info/dependency_links.txt +0 -0
- {pyroscope_io-1.3.0 → pyroscope_io-2.0.0}/python/pyroscope_io.egg-info/top_level.txt +0 -0
- /pyroscope_io-1.3.0/rust/src/encode/gen/google.rs → /pyroscope_io-2.0.0/rust/crates/pprof/src/proto.rs +0 -0
- {pyroscope_io-1.3.0 → pyroscope_io-2.0.0}/rust/src/backend/backend.rs +0 -0
- {pyroscope_io-1.3.0 → pyroscope_io-2.0.0}/rust/src/backend/mod.rs +0 -0
- {pyroscope_io-1.3.0 → pyroscope_io-2.0.0}/rust/src/backend/ruleset.rs +0 -0
- {pyroscope_io-1.3.0 → pyroscope_io-2.0.0}/rust/src/backend/tests.rs +0 -0
- {pyroscope_io-1.3.0 → pyroscope_io-2.0.0}/rust/src/backend/types.rs +0 -0
- {pyroscope_io-1.3.0 → pyroscope_io-2.0.0}/rust/src/encode/gen/push.rs +0 -0
- {pyroscope_io-1.3.0 → pyroscope_io-2.0.0}/rust/src/encode/gen/types.rs +0 -0
- {pyroscope_io-1.3.0 → pyroscope_io-2.0.0}/rust/src/encode/interner.rs +0 -0
- {pyroscope_io-1.3.0 → pyroscope_io-2.0.0}/rust/src/encode/mod.rs +0 -0
- {pyroscope_io-1.3.0 → pyroscope_io-2.0.0}/rust/src/error.rs +0 -0
- {pyroscope_io-1.3.0 → pyroscope_io-2.0.0}/rust/src/forksafety.rs +0 -0
- {pyroscope_io-1.3.0 → pyroscope_io-2.0.0}/rust/src/memory.rs +0 -0
- {pyroscope_io-1.3.0 → pyroscope_io-2.0.0}/setup.cfg +0 -0
|
@@ -1,13 +1,23 @@
|
|
|
1
1
|
include rust/Cargo.toml
|
|
2
2
|
include rust/Cargo.lock
|
|
3
3
|
include rust/build.rs
|
|
4
|
+
recursive-include rust/crates/ Cargo.toml build.rs *.rs *.c
|
|
4
5
|
recursive-include rust/src/ *.rs
|
|
5
6
|
include rust/include/pyroscope_ffi.h
|
|
6
7
|
include dd-trace-py/CMakeLists.txt
|
|
7
8
|
include dd-trace-py/BundleStaticLibrary.cmake
|
|
8
9
|
include dd-trace-py/pyroscope/Pyroscope.h
|
|
9
|
-
include dd-trace-py/pyroscope/stack_ffi.cpp
|
|
10
10
|
recursive-include dd-trace-py/ddtrace *.h
|
|
11
11
|
recursive-include dd-trace-py/ddtrace *.cpp
|
|
12
12
|
recursive-include dd-trace-py/ddtrace *.hpp
|
|
13
13
|
recursive-include dd-trace-py/ddtrace *.cc
|
|
14
|
+
include kindasafe/Cargo.toml
|
|
15
|
+
include kindasafe/Cargo.lock
|
|
16
|
+
include kindasafe/LICENSE
|
|
17
|
+
recursive-include kindasafe/kindasafe Cargo.toml README.md *.rs
|
|
18
|
+
recursive-include kindasafe/kindasafe_init Cargo.toml README.md *.rs
|
|
19
|
+
include py-spy/Cargo.toml
|
|
20
|
+
include py-spy/build.rs
|
|
21
|
+
include py-spy/README.md
|
|
22
|
+
include py-spy/LICENSE
|
|
23
|
+
recursive-include py-spy/src *.rs
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: pyroscope-io
|
|
3
|
-
Version:
|
|
3
|
+
Version: 2.0.0
|
|
4
4
|
Summary: Pyroscope Python integration
|
|
5
5
|
Author-email: Tolya Korniltsev <anatoly.korniltsev@grafana.com>
|
|
6
6
|
Maintainer-email: Tolyan Korniltsev <anatoly.korniltsev@grafana.com>
|
|
@@ -13,7 +13,7 @@ Classifier: Programming Language :: Python
|
|
|
13
13
|
Classifier: Topic :: Software Development
|
|
14
14
|
Classifier: Topic :: Software Development :: Debuggers
|
|
15
15
|
Classifier: Topic :: Utilities
|
|
16
|
-
Requires-Python: >=3.
|
|
16
|
+
Requires-Python: >=3.11
|
|
17
17
|
Description-Content-Type: text/markdown
|
|
18
18
|
License-File: LICENSE
|
|
19
19
|
Dynamic: license-file
|
|
@@ -26,10 +26,17 @@ Uses [py-spy](https://github.com/benfred/py-spy) for stack sampling and the [pyr
|
|
|
26
26
|
|
|
27
27
|
## Installation
|
|
28
28
|
|
|
29
|
+
Requires CPython 3.11–3.15 with the GIL enabled. The experimental Signal profiler
|
|
30
|
+
supports CPython 3.11–3.14 everywhere and CPython 3.15 on Linux (glibc on x86-64 and aarch64, musl).
|
|
31
|
+
|
|
29
32
|
```bash
|
|
30
33
|
pip install pyroscope-io
|
|
31
34
|
```
|
|
32
35
|
|
|
36
|
+
For source builds, initialize the native dependency submodules with
|
|
37
|
+
`git submodule update --init --recursive`. Cargo uses the `py-spy` submodule
|
|
38
|
+
as a local path dependency; its version is pinned by the parent repository.
|
|
39
|
+
|
|
33
40
|
## License
|
|
34
41
|
|
|
35
42
|
Apache-2.0
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
# pyroscope-python
|
|
2
|
+
|
|
3
|
+
Pyroscope continuous profiling agent for Python applications.
|
|
4
|
+
|
|
5
|
+
Uses [py-spy](https://github.com/benfred/py-spy) for stack sampling and the [pyroscope](https://crates.io/crates/pyroscope) Rust crate to send profiles to a Pyroscope server.
|
|
6
|
+
|
|
7
|
+
## Installation
|
|
8
|
+
|
|
9
|
+
Requires CPython 3.11–3.15 with the GIL enabled. The experimental Signal profiler
|
|
10
|
+
supports CPython 3.11–3.14 everywhere and CPython 3.15 on Linux (glibc on x86-64 and aarch64, musl).
|
|
11
|
+
|
|
12
|
+
```bash
|
|
13
|
+
pip install pyroscope-io
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
For source builds, initialize the native dependency submodules with
|
|
17
|
+
`git submodule update --init --recursive`. Cargo uses the `py-spy` submodule
|
|
18
|
+
as a local path dependency; its version is pinned by the parent repository.
|
|
19
|
+
|
|
20
|
+
## License
|
|
21
|
+
|
|
22
|
+
Apache-2.0
|
|
@@ -65,28 +65,6 @@ set(MEMALLOC_SOURCES
|
|
|
65
65
|
${COLLECTOR_DIR}/_memalloc_reentrant.cpp
|
|
66
66
|
)
|
|
67
67
|
|
|
68
|
-
set(STACK_SOURCES
|
|
69
|
-
${PROFILING_DIR}/dd_wrapper/src/profiler_state.cpp
|
|
70
|
-
${CMAKE_CURRENT_SOURCE_DIR}/pyroscope/stack_ffi.cpp
|
|
71
|
-
${PROFILING_DIR}/stack/src/echion/danger.cc
|
|
72
|
-
${PROFILING_DIR}/stack/src/echion/frame.cc
|
|
73
|
-
${PROFILING_DIR}/stack/src/echion/greenlets.cc
|
|
74
|
-
${PROFILING_DIR}/stack/src/echion/interp.cc
|
|
75
|
-
${PROFILING_DIR}/stack/src/echion/long.cc
|
|
76
|
-
${PROFILING_DIR}/stack/src/echion/mirrors.cc
|
|
77
|
-
${PROFILING_DIR}/stack/src/echion/stack_chunk.cc
|
|
78
|
-
${PROFILING_DIR}/stack/src/echion/stacks.cc
|
|
79
|
-
${PROFILING_DIR}/stack/src/echion/strings.cc
|
|
80
|
-
${PROFILING_DIR}/stack/src/echion/tasks.cc
|
|
81
|
-
${PROFILING_DIR}/stack/src/echion/threads.cc
|
|
82
|
-
${PROFILING_DIR}/stack/src/echion/vm.cc
|
|
83
|
-
${PROFILING_DIR}/stack/src/gc_frame_tracker.cpp
|
|
84
|
-
${PROFILING_DIR}/stack/src/origin_task_links.cpp
|
|
85
|
-
${PROFILING_DIR}/stack/src/sampler.cpp
|
|
86
|
-
${PROFILING_DIR}/stack/src/span_links.cpp
|
|
87
|
-
${PROFILING_DIR}/stack/src/stack_renderer.cpp
|
|
88
|
-
)
|
|
89
|
-
|
|
90
68
|
set(FULL_EXTENSION_NAME "datadog_mem_profiler")
|
|
91
69
|
|
|
92
70
|
add_library(pyroscope_common INTERFACE)
|
|
@@ -101,25 +79,10 @@ target_include_directories(pyroscope_common SYSTEM INTERFACE ${Python3_INCLUDE_D
|
|
|
101
79
|
add_library(pyroscope_memalloc OBJECT ${MEMALLOC_SOURCES})
|
|
102
80
|
target_link_libraries(pyroscope_memalloc PRIVATE pyroscope_common absl::flat_hash_map)
|
|
103
81
|
|
|
104
|
-
add_library(pyroscope_stack OBJECT ${STACK_SOURCES})
|
|
105
|
-
target_link_libraries(pyroscope_stack PRIVATE pyroscope_common)
|
|
106
|
-
target_include_directories(pyroscope_stack PRIVATE ${PROFILING_DIR}/stack/include)
|
|
107
|
-
target_include_directories(pyroscope_stack PRIVATE ${PROFILING_DIR}/dd_wrapper/include)
|
|
108
|
-
target_include_directories(pyroscope_stack SYSTEM PRIVATE
|
|
109
|
-
${PROFILING_DIR}/stack/echion
|
|
110
|
-
)
|
|
111
|
-
target_compile_definitions(pyroscope_stack PRIVATE
|
|
112
|
-
$<IF:$<BOOL:${APPLE}>,PL_DARWIN,PL_LINUX>
|
|
113
|
-
)
|
|
114
|
-
target_compile_options(pyroscope_stack PRIVATE -Wshadow -Wnon-virtual-dtor -Wold-style-cast)
|
|
115
|
-
|
|
116
82
|
target_compile_options(pyroscope_memalloc PRIVATE -Werror)
|
|
117
|
-
target_compile_options(pyroscope_stack PRIVATE -Werror)
|
|
118
|
-
set_source_files_properties(${PROFILING_DIR}/stack/src/echion/vm.cc PROPERTIES COMPILE_OPTIONS -Wno-unused-function)
|
|
119
83
|
|
|
120
84
|
add_library(${FULL_EXTENSION_NAME} STATIC
|
|
121
85
|
$<TARGET_OBJECTS:pyroscope_memalloc>
|
|
122
|
-
$<TARGET_OBJECTS:pyroscope_stack>
|
|
123
86
|
)
|
|
124
87
|
set_target_properties(${FULL_EXTENSION_NAME} PROPERTIES LINKER_LANGUAGE CXX)
|
|
125
88
|
|
|
@@ -64,6 +64,9 @@ class ProfilerStats
|
|
|
64
64
|
void add_sample_capture_cpu_time_us([[maybe_unused]] size_t cpu_time_us) {}
|
|
65
65
|
size_t get_sample_capture_cpu_time_us() const;
|
|
66
66
|
|
|
67
|
+
void add_wall_sample_capture_cpu_time_us([[maybe_unused]] size_t cpu_time_us) {}
|
|
68
|
+
void add_cpu_timer_drain_cpu_time_us([[maybe_unused]] size_t cpu_time_us) {}
|
|
69
|
+
|
|
67
70
|
// Returns a JSON string containing relevant Profiler Stats to be included
|
|
68
71
|
// in the libdatadog payload.
|
|
69
72
|
std::string get_internal_metadata_json();
|
|
@@ -64,6 +64,8 @@ Datadog::ProfilerStats::reset_state()
|
|
|
64
64
|
asyncio_task_count = std::nullopt;
|
|
65
65
|
greenlet_count = std::nullopt;
|
|
66
66
|
sample_capture_cpu_time_us = 0;
|
|
67
|
+
wall_sample_capture_cpu_time_us = 0;
|
|
68
|
+
cpu_timer_drain_cpu_time_us = 0;
|
|
67
69
|
// fast_copy_memory_* static fields are intentionally not reset (see setters).
|
|
68
70
|
}
|
|
69
71
|
|
|
@@ -232,6 +234,18 @@ Datadog::ProfilerStats::get_sample_capture_cpu_time_us() const
|
|
|
232
234
|
return sample_capture_cpu_time_us;
|
|
233
235
|
}
|
|
234
236
|
|
|
237
|
+
void
|
|
238
|
+
Datadog::ProfilerStats::add_wall_sample_capture_cpu_time_us(size_t cpu_time_us)
|
|
239
|
+
{
|
|
240
|
+
wall_sample_capture_cpu_time_us += cpu_time_us;
|
|
241
|
+
}
|
|
242
|
+
|
|
243
|
+
void
|
|
244
|
+
Datadog::ProfilerStats::add_cpu_timer_drain_cpu_time_us(size_t cpu_time_us)
|
|
245
|
+
{
|
|
246
|
+
cpu_timer_drain_cpu_time_us += cpu_time_us;
|
|
247
|
+
}
|
|
248
|
+
|
|
235
249
|
std::string
|
|
236
250
|
Datadog::ProfilerStats::get_internal_metadata_json()
|
|
237
251
|
{
|
|
@@ -308,6 +322,14 @@ Datadog::ProfilerStats::get_internal_metadata_json()
|
|
|
308
322
|
|
|
309
323
|
internal_metadata_json += R"("sample_capture_cpu_time_us": )";
|
|
310
324
|
append_to_string(internal_metadata_json, sample_capture_cpu_time_us);
|
|
325
|
+
internal_metadata_json += ",";
|
|
326
|
+
|
|
327
|
+
internal_metadata_json += R"("wall_sample_capture_cpu_time_us": )";
|
|
328
|
+
append_to_string(internal_metadata_json, wall_sample_capture_cpu_time_us);
|
|
329
|
+
internal_metadata_json += ",";
|
|
330
|
+
|
|
331
|
+
internal_metadata_json += R"("cpu_timer_drain_cpu_time_us": )";
|
|
332
|
+
append_to_string(internal_metadata_json, cpu_timer_drain_cpu_time_us);
|
|
311
333
|
|
|
312
334
|
internal_metadata_json += "}";
|
|
313
335
|
|
|
@@ -21,6 +21,20 @@
|
|
|
21
21
|
#include <sys/types.h>
|
|
22
22
|
#endif
|
|
23
23
|
|
|
24
|
+
using ProfilingFaultRecover = bool (*)(int signo, siginfo_t* si, void* ucontext);
|
|
25
|
+
|
|
26
|
+
int
|
|
27
|
+
init_profiling_fault_handler();
|
|
28
|
+
|
|
29
|
+
bool
|
|
30
|
+
profiling_fault_handler_still_installed();
|
|
31
|
+
|
|
32
|
+
void
|
|
33
|
+
register_profiling_fault_recover(ProfilingFaultRecover recover);
|
|
34
|
+
|
|
35
|
+
void
|
|
36
|
+
unregister_profiling_fault_recover(ProfilingFaultRecover recover);
|
|
37
|
+
|
|
24
38
|
int
|
|
25
39
|
init_segv_catcher();
|
|
26
40
|
|
|
@@ -25,6 +25,8 @@
|
|
|
25
25
|
#include <mach/mach.h>
|
|
26
26
|
#endif
|
|
27
27
|
|
|
28
|
+
#include "cpu_sample_ring.hpp"
|
|
29
|
+
|
|
28
30
|
#include <echion/errors.h>
|
|
29
31
|
#include <echion/greenlets.h>
|
|
30
32
|
#include <echion/interp.h>
|
|
@@ -62,7 +64,12 @@ class ThreadInfo
|
|
|
62
64
|
|
|
63
65
|
[[nodiscard]] Result<void> update_cpu_time();
|
|
64
66
|
|
|
65
|
-
[[nodiscard]] Result<void> sample(EchionSampler&, PyThreadState*, microsecond_t);
|
|
67
|
+
[[nodiscard]] Result<void> sample(EchionSampler&, PyThreadState*, microsecond_t, bool include_cpu_time = true);
|
|
68
|
+
void sample_cpu_timer(EchionSampler&,
|
|
69
|
+
PyThreadState*,
|
|
70
|
+
FrameStack&&,
|
|
71
|
+
microsecond_t,
|
|
72
|
+
const Datadog::CpuTimer::RawSample&);
|
|
66
73
|
[[nodiscard]] Result<void> unwind(EchionSampler&, PyThreadState*, microsecond_t wall_time_us);
|
|
67
74
|
|
|
68
75
|
// Number of frames in python_stack from the asyncio boundary frame (inclusive) up to the root,
|
|
@@ -69,13 +69,13 @@ mark_fast_copy_syscall_fallback()
|
|
|
69
69
|
// Set at init; survives toggling fast_copy_active.
|
|
70
70
|
inline bool safe_memcpy_initialized = false;
|
|
71
71
|
|
|
72
|
+
// Pyroscope patch: true when safe_memcpy could not be initialized.
|
|
73
|
+
inline bool failed_safe_copy = false;
|
|
74
|
+
|
|
72
75
|
#if defined PL_LINUX
|
|
73
76
|
// Whether the process_vm_readv probe succeeded at constructor time.
|
|
74
77
|
inline bool process_vm_readv_available = false;
|
|
75
78
|
|
|
76
|
-
// True when neither safe_memcpy nor process_vm_readv could be initialized.
|
|
77
|
-
inline bool failed_safe_copy = false;
|
|
78
|
-
|
|
79
79
|
inline ssize_t (*safe_copy)(pid_t,
|
|
80
80
|
const struct iovec*,
|
|
81
81
|
unsigned long,
|
|
@@ -85,14 +85,12 @@ inline ssize_t (*safe_copy)(pid_t,
|
|
|
85
85
|
#endif // PL_LINUX
|
|
86
86
|
|
|
87
87
|
/**
|
|
88
|
-
*
|
|
89
|
-
*
|
|
90
|
-
*
|
|
91
|
-
* mach_vm_read_overwrite.
|
|
92
|
-
* Pyroscope patch: called from pyroscope_stack_configure, not at static init.
|
|
88
|
+
* Install the SIGSEGV/SIGBUS handlers and switch safe_copy to safe_memcpy.
|
|
89
|
+
* Pyroscope patch: called from pyroscope_stack_configure, not at static init;
|
|
90
|
+
* sets failed_safe_copy instead of falling back to a syscall copy.
|
|
93
91
|
*/
|
|
94
92
|
void
|
|
95
|
-
init_safe_copy(
|
|
93
|
+
init_safe_copy();
|
|
96
94
|
|
|
97
95
|
// Switch the active copy method at runtime. Must be called before the
|
|
98
96
|
// sampling thread is started.
|
pyroscope_io-2.0.0/dd-trace-py/ddtrace/internal/datadog/profiling/stack/include/cpu_sample_ring.hpp
ADDED
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
#pragma once
|
|
2
|
+
|
|
3
|
+
#include <array>
|
|
4
|
+
#include <atomic>
|
|
5
|
+
#include <cstdint>
|
|
6
|
+
#include <type_traits>
|
|
7
|
+
|
|
8
|
+
namespace Datadog {
|
|
9
|
+
namespace CpuTimer {
|
|
10
|
+
|
|
11
|
+
// Keep this intentionally below echion's 2048-frame wall-sampler cap. RawSample
|
|
12
|
+
// is embedded in every preallocated ring slot, so high frame caps multiply into
|
|
13
|
+
// large per-thread resident memory and can destabilize thread-heavy processes.
|
|
14
|
+
constexpr uint16_t kMaxCpuTimerFrames = 512;
|
|
15
|
+
constexpr uint8_t kMaxCpuTimerCoroutineFingerprints = 8;
|
|
16
|
+
|
|
17
|
+
struct RawFrame
|
|
18
|
+
{
|
|
19
|
+
void* code_object = nullptr;
|
|
20
|
+
int lasti = -1;
|
|
21
|
+
int first_lineno = 0;
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
struct CoroutineFingerprint
|
|
25
|
+
{
|
|
26
|
+
uintptr_t coroutine = 0;
|
|
27
|
+
uintptr_t code_object = 0;
|
|
28
|
+
int lasti = -1;
|
|
29
|
+
int first_lineno = 0;
|
|
30
|
+
};
|
|
31
|
+
|
|
32
|
+
struct RawSample
|
|
33
|
+
{
|
|
34
|
+
uint64_t cpu_delta_ns = 0;
|
|
35
|
+
uint64_t python_thread_id = 0;
|
|
36
|
+
uint64_t native_tid = 0;
|
|
37
|
+
uintptr_t asyncio_task = 0;
|
|
38
|
+
uintptr_t greenlet_id = 0;
|
|
39
|
+
uint8_t coroutine_fingerprint_count = 0;
|
|
40
|
+
uint16_t depth = 0;
|
|
41
|
+
std::array<CoroutineFingerprint, kMaxCpuTimerCoroutineFingerprints> coroutine_fingerprints{};
|
|
42
|
+
std::array<RawFrame, kMaxCpuTimerFrames> frames{};
|
|
43
|
+
};
|
|
44
|
+
|
|
45
|
+
static_assert(std::is_trivially_copyable<RawSample>::value, "ring slots must be safe to copy without allocation");
|
|
46
|
+
static_assert(std::atomic<uint32_t>::is_always_lock_free,
|
|
47
|
+
"CPU timer signal handler requires lock-free ring index atomics");
|
|
48
|
+
|
|
49
|
+
// Single-producer, single-consumer ring. Each CaptureState owns one ring, so
|
|
50
|
+
// its SIGEV_THREAD_ID target is the sole producer and the sampler thread is the
|
|
51
|
+
// sole consumer. The producer must either publish a reserved slot or abandon it
|
|
52
|
+
// before its next reservation. An abandoned slot remains invisible and can be
|
|
53
|
+
// overwritten by the next reservation.
|
|
54
|
+
class CpuSampleRing
|
|
55
|
+
{
|
|
56
|
+
static constexpr uint32_t kCapacity = 64;
|
|
57
|
+
static_assert(kCapacity > 1, "ring must keep one slot open to distinguish full from empty");
|
|
58
|
+
|
|
59
|
+
std::array<RawSample, kCapacity> samples_{};
|
|
60
|
+
std::atomic<uint32_t> head_{ 0 };
|
|
61
|
+
std::atomic<uint32_t> tail_{ 0 };
|
|
62
|
+
|
|
63
|
+
uint32_t advance(uint32_t index) const noexcept
|
|
64
|
+
{
|
|
65
|
+
const uint32_t next = index + 1;
|
|
66
|
+
return next == kCapacity ? 0 : next;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
public:
|
|
70
|
+
CpuSampleRing() = default;
|
|
71
|
+
CpuSampleRing(const CpuSampleRing&) = delete;
|
|
72
|
+
CpuSampleRing& operator=(const CpuSampleRing&) = delete;
|
|
73
|
+
|
|
74
|
+
[[nodiscard]] uint32_t capacity() const noexcept { return kCapacity; }
|
|
75
|
+
|
|
76
|
+
// The acquire load pairs with the consumer's release store after it has
|
|
77
|
+
// finished copying a slot, so the producer never overwrites an in-use slot.
|
|
78
|
+
[[nodiscard]] RawSample* reserve_for_producer() noexcept
|
|
79
|
+
{
|
|
80
|
+
const uint32_t head = head_.load(std::memory_order_relaxed);
|
|
81
|
+
const uint32_t next = advance(head);
|
|
82
|
+
const uint32_t tail = tail_.load(std::memory_order_acquire);
|
|
83
|
+
if (next == tail) {
|
|
84
|
+
return nullptr;
|
|
85
|
+
}
|
|
86
|
+
return &samples_[head];
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
// The release store publishes all slot writes to the consumer.
|
|
90
|
+
void publish_for_producer() noexcept
|
|
91
|
+
{
|
|
92
|
+
const uint32_t head = head_.load(std::memory_order_relaxed);
|
|
93
|
+
head_.store(advance(head), std::memory_order_release);
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
// The acquire load pairs with publish_for_producer(), so the consumer sees
|
|
97
|
+
// a complete RawSample before copying it.
|
|
98
|
+
[[nodiscard]] bool pop_for_consumer(RawSample& out) noexcept
|
|
99
|
+
{
|
|
100
|
+
const uint32_t tail = tail_.load(std::memory_order_relaxed);
|
|
101
|
+
const uint32_t head = head_.load(std::memory_order_acquire);
|
|
102
|
+
if (tail == head) {
|
|
103
|
+
return false;
|
|
104
|
+
}
|
|
105
|
+
out = samples_[tail];
|
|
106
|
+
tail_.store(advance(tail), std::memory_order_release);
|
|
107
|
+
return true;
|
|
108
|
+
}
|
|
109
|
+
};
|
|
110
|
+
|
|
111
|
+
} // namespace CpuTimer
|
|
112
|
+
} // namespace Datadog
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
#pragma once
|
|
2
|
+
|
|
3
|
+
#define PY_SSIZE_T_CLEAN
|
|
4
|
+
#include <Python.h>
|
|
5
|
+
|
|
6
|
+
#if PY_VERSION_HEX >= 0x030c0000
|
|
7
|
+
// https://github.com/python/cpython/issues/108216#issuecomment-1696565797
|
|
8
|
+
#undef _PyGC_FINALIZED
|
|
9
|
+
#endif
|
|
10
|
+
|
|
11
|
+
#include <cstdint>
|
|
12
|
+
|
|
13
|
+
#include "echion/timing.h"
|
|
14
|
+
|
|
15
|
+
class EchionSampler;
|
|
16
|
+
|
|
17
|
+
namespace Datadog {
|
|
18
|
+
namespace CpuTimer {
|
|
19
|
+
|
|
20
|
+
struct DebugStats
|
|
21
|
+
{
|
|
22
|
+
bool supported = false;
|
|
23
|
+
bool configured = false;
|
|
24
|
+
bool active = false;
|
|
25
|
+
bool permanently_disabled = false;
|
|
26
|
+
uint64_t interval_ms = 0;
|
|
27
|
+
uint64_t live_count = 0;
|
|
28
|
+
uint64_t retired_count = 0;
|
|
29
|
+
uint64_t leaked_altstack_count = 0;
|
|
30
|
+
uint64_t pending_unprepared = 0;
|
|
31
|
+
uint64_t app_altstack_present = 0;
|
|
32
|
+
uint64_t reused_altstack_count = 0;
|
|
33
|
+
uint64_t reused_altstack_too_small_count = 0;
|
|
34
|
+
uint64_t blocked_signal_count = 0;
|
|
35
|
+
uint64_t tid_out_of_bounds = 0;
|
|
36
|
+
uint64_t tid_table_directory_size = 0;
|
|
37
|
+
uint64_t tid_table_allocated_pages = 0;
|
|
38
|
+
uint64_t tid_table_allocation_failures = 0;
|
|
39
|
+
uint64_t timer_syscall_failures = 0;
|
|
40
|
+
uint64_t accepted_signal_oob_tid_count = 0;
|
|
41
|
+
uint64_t handler_hijack_disable_count = 0;
|
|
42
|
+
uint64_t health_disable_count = 0;
|
|
43
|
+
uint64_t dropped_count = 0;
|
|
44
|
+
uint64_t dropped_cpu_ns = 0;
|
|
45
|
+
uint64_t capture_failed_count = 0;
|
|
46
|
+
uint64_t capture_failed_cpu_ns = 0;
|
|
47
|
+
uint64_t residual_cpu_ns = 0;
|
|
48
|
+
uint64_t stage2_invalid_frame_count = 0;
|
|
49
|
+
// Overrun accounting only. cpu_delta_ns already conserves CPU across
|
|
50
|
+
// coalesced expirations (it is measured from the thread CPU clock), so these are a
|
|
51
|
+
// sampling-quality signal, not a sample weight. timer_overrun_total sums si_overrun
|
|
52
|
+
// (missed expirations); coalesced_signal_count counts signals with si_overrun > 0.
|
|
53
|
+
uint64_t timer_overrun_total = 0;
|
|
54
|
+
uint64_t coalesced_signal_count = 0;
|
|
55
|
+
};
|
|
56
|
+
|
|
57
|
+
class Engine
|
|
58
|
+
{
|
|
59
|
+
public:
|
|
60
|
+
static Engine& get();
|
|
61
|
+
|
|
62
|
+
void configure(bool enabled, uint64_t interval_ms);
|
|
63
|
+
bool start();
|
|
64
|
+
void shutdown(EchionSampler& echion);
|
|
65
|
+
void postfork_child();
|
|
66
|
+
void disable_for_fault_handler_swap();
|
|
67
|
+
|
|
68
|
+
void register_thread(uint64_t python_thread_id, uint64_t native_id, const char* name, PyThreadState* tstate);
|
|
69
|
+
void unregister_thread(uint64_t python_thread_id);
|
|
70
|
+
bool has_thread(uint64_t python_thread_id, uint64_t native_id) const;
|
|
71
|
+
void set_current_greenlet(uint64_t native_id, uintptr_t greenlet_id);
|
|
72
|
+
uintptr_t current_greenlet(uint64_t native_id) const;
|
|
73
|
+
void drain(EchionSampler& echion);
|
|
74
|
+
|
|
75
|
+
bool configured_enabled() const;
|
|
76
|
+
microsecond_t drain_interval_us() const;
|
|
77
|
+
|
|
78
|
+
DebugStats debug_stats() const;
|
|
79
|
+
void debug_set_fault_injection(bool enabled);
|
|
80
|
+
};
|
|
81
|
+
|
|
82
|
+
} // namespace CpuTimer
|
|
83
|
+
} // namespace Datadog
|