pyroscope-io 1.4.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.
Files changed (300) hide show
  1. {pyroscope_io-1.4.0 → pyroscope_io-2.0.0}/MANIFEST.in +11 -1
  2. {pyroscope_io-1.4.0/python/pyroscope_io.egg-info → pyroscope_io-2.0.0}/PKG-INFO +9 -2
  3. pyroscope_io-2.0.0/README.md +22 -0
  4. {pyroscope_io-1.4.0 → pyroscope_io-2.0.0}/dd-trace-py/CMakeLists.txt +0 -38
  5. {pyroscope_io-1.4.0 → pyroscope_io-2.0.0}/dd-trace-py/pyroscope/Pyroscope.h +0 -85
  6. pyroscope_io-2.0.0/kindasafe/Cargo.lock +25 -0
  7. pyroscope_io-2.0.0/kindasafe/Cargo.toml +6 -0
  8. pyroscope_io-2.0.0/kindasafe/LICENSE +202 -0
  9. pyroscope_io-2.0.0/kindasafe/kindasafe/Cargo.toml +16 -0
  10. pyroscope_io-2.0.0/kindasafe/kindasafe/README.md +86 -0
  11. pyroscope_io-2.0.0/kindasafe/kindasafe/build.rs +10 -0
  12. pyroscope_io-2.0.0/kindasafe/kindasafe/src/lib.rs +473 -0
  13. pyroscope_io-2.0.0/kindasafe/kindasafe/tests/asan.rs +257 -0
  14. pyroscope_io-2.0.0/kindasafe/kindasafe/tests/fallback.rs +4 -0
  15. pyroscope_io-2.0.0/kindasafe/kindasafe/tests/positive.rs +573 -0
  16. pyroscope_io-2.0.0/kindasafe/kindasafe/tests/recovered_faults.rs +62 -0
  17. pyroscope_io-2.0.0/kindasafe/kindasafe_init/Cargo.toml +14 -0
  18. pyroscope_io-2.0.0/kindasafe/kindasafe_init/README.md +52 -0
  19. pyroscope_io-2.0.0/kindasafe/kindasafe_init/build.rs +10 -0
  20. pyroscope_io-2.0.0/kindasafe/kindasafe_init/src/lib.rs +106 -0
  21. pyroscope_io-2.0.0/kindasafe/kindasafe_init/src/recovery.rs +263 -0
  22. pyroscope_io-2.0.0/kindasafe/kindasafe_init/tests/asan.rs +37 -0
  23. pyroscope_io-2.0.0/kindasafe/kindasafe_init/tests/common/errno_guard.rs +41 -0
  24. pyroscope_io-2.0.0/kindasafe/kindasafe_init/tests/fallback.rs +256 -0
  25. pyroscope_io-2.0.0/kindasafe/kindasafe_init/tests/publication.rs +235 -0
  26. pyroscope_io-2.0.0/kindasafe/kindasafe_init/tests/sigprof_mask.rs +122 -0
  27. pyroscope_io-2.0.0/py-spy/Cargo.toml +60 -0
  28. pyroscope_io-2.0.0/py-spy/LICENSE +21 -0
  29. pyroscope_io-2.0.0/py-spy/README.md +304 -0
  30. pyroscope_io-2.0.0/py-spy/build.rs +22 -0
  31. pyroscope_io-2.0.0/py-spy/src/asan.rs +224 -0
  32. pyroscope_io-2.0.0/py-spy/src/binary_parser.rs +333 -0
  33. pyroscope_io-2.0.0/py-spy/src/chrometrace.rs +122 -0
  34. pyroscope_io-2.0.0/py-spy/src/config.rs +670 -0
  35. pyroscope_io-2.0.0/py-spy/src/console_viewer.rs +680 -0
  36. pyroscope_io-2.0.0/py-spy/src/coredump.rs +538 -0
  37. pyroscope_io-2.0.0/py-spy/src/cython.rs +277 -0
  38. pyroscope_io-2.0.0/py-spy/src/dump.rs +163 -0
  39. pyroscope_io-2.0.0/py-spy/src/flamegraph.rs +102 -0
  40. pyroscope_io-2.0.0/py-spy/src/lib.rs +59 -0
  41. pyroscope_io-2.0.0/py-spy/src/main.rs +595 -0
  42. pyroscope_io-2.0.0/py-spy/src/native_stack_trace.rs +377 -0
  43. pyroscope_io-2.0.0/py-spy/src/python_bindings/mod.rs +263 -0
  44. pyroscope_io-2.0.0/py-spy/src/python_bindings/v2_7_15.rs +737 -0
  45. pyroscope_io-2.0.0/py-spy/src/python_bindings/v3_10_0.rs +1967 -0
  46. pyroscope_io-2.0.0/py-spy/src/python_bindings/v3_11_0.rs +2100 -0
  47. pyroscope_io-2.0.0/py-spy/src/python_bindings/v3_12_0.rs +16585 -0
  48. pyroscope_io-2.0.0/py-spy/src/python_bindings/v3_13_0.rs +13791 -0
  49. pyroscope_io-2.0.0/py-spy/src/python_bindings/v3_14_0.rs +18419 -0
  50. pyroscope_io-2.0.0/py-spy/src/python_bindings/v3_15_0.rs +20015 -0
  51. pyroscope_io-2.0.0/py-spy/src/python_bindings/v3_3_7.rs +902 -0
  52. pyroscope_io-2.0.0/py-spy/src/python_bindings/v3_4_8.rs +893 -0
  53. pyroscope_io-2.0.0/py-spy/src/python_bindings/v3_5_5.rs +938 -0
  54. pyroscope_io-2.0.0/py-spy/src/python_bindings/v3_6_6.rs +965 -0
  55. pyroscope_io-2.0.0/py-spy/src/python_bindings/v3_7_0.rs +1082 -0
  56. pyroscope_io-2.0.0/py-spy/src/python_bindings/v3_8_0.rs +1362 -0
  57. pyroscope_io-2.0.0/py-spy/src/python_bindings/v3_9_5.rs +1478 -0
  58. pyroscope_io-2.0.0/py-spy/src/python_data_access/string_tests.rs +163 -0
  59. pyroscope_io-2.0.0/py-spy/src/python_data_access.rs +982 -0
  60. pyroscope_io-2.0.0/py-spy/src/python_interpreters.rs +1160 -0
  61. pyroscope_io-2.0.0/py-spy/src/python_process_info.rs +1600 -0
  62. pyroscope_io-2.0.0/py-spy/src/python_spy.rs +664 -0
  63. pyroscope_io-2.0.0/py-spy/src/python_threading.rs +165 -0
  64. pyroscope_io-2.0.0/py-spy/src/sampler.rs +419 -0
  65. pyroscope_io-2.0.0/py-spy/src/speedscope.rs +318 -0
  66. pyroscope_io-2.0.0/py-spy/src/stack_trace.rs +521 -0
  67. pyroscope_io-2.0.0/py-spy/src/timer.rs +73 -0
  68. pyroscope_io-2.0.0/py-spy/src/utils.rs +82 -0
  69. pyroscope_io-2.0.0/py-spy/src/version.rs +196 -0
  70. {pyroscope_io-1.4.0 → pyroscope_io-2.0.0}/pyproject.toml +5 -2
  71. pyroscope_io-2.0.0/python/pyroscope/__init__.py +185 -0
  72. {pyroscope_io-1.4.0 → pyroscope_io-2.0.0/python/pyroscope_io.egg-info}/PKG-INFO +9 -2
  73. {pyroscope_io-1.4.0 → pyroscope_io-2.0.0}/python/pyroscope_io.egg-info/SOURCES.txt +119 -7
  74. {pyroscope_io-1.4.0 → pyroscope_io-2.0.0}/rust/Cargo.lock +598 -99
  75. pyroscope_io-2.0.0/rust/Cargo.toml +61 -0
  76. {pyroscope_io-1.4.0 → pyroscope_io-2.0.0}/rust/build.rs +4 -2
  77. pyroscope_io-2.0.0/rust/crates/benchmarks/Cargo.toml +24 -0
  78. pyroscope_io-2.0.0/rust/crates/benchmarks/benches/signal_stack.rs +190 -0
  79. pyroscope_io-2.0.0/rust/crates/benchmarks/benches/support/profiling.rs +86 -0
  80. pyroscope_io-2.0.0/rust/crates/benchmarks/build.rs +15 -0
  81. pyroscope_io-2.0.0/rust/crates/pprof/Cargo.toml +10 -0
  82. pyroscope_io-1.4.0/rust/src/encode/pprof.rs → pyroscope_io-2.0.0/rust/crates/pprof/src/lib.rs +86 -200
  83. pyroscope_io-2.0.0/rust/crates/pprof/src/time_range.rs +28 -0
  84. pyroscope_io-2.0.0/rust/crates/python-offsets/Cargo.toml +13 -0
  85. pyroscope_io-2.0.0/rust/crates/python-offsets/build.rs +88 -0
  86. pyroscope_io-2.0.0/rust/crates/python-offsets/python_offsets.c +123 -0
  87. pyroscope_io-2.0.0/rust/crates/python-offsets/src/lib.rs +36 -0
  88. pyroscope_io-2.0.0/rust/crates/python-offsets/src/v3_11.rs +25 -0
  89. pyroscope_io-2.0.0/rust/crates/python-offsets/src/v3_12.rs +27 -0
  90. pyroscope_io-2.0.0/rust/crates/python-offsets/src/v3_13.rs +26 -0
  91. pyroscope_io-2.0.0/rust/crates/python-offsets/src/v3_14.rs +28 -0
  92. pyroscope_io-2.0.0/rust/crates/python-offsets/src/v3_15.rs +27 -0
  93. pyroscope_io-2.0.0/rust/crates/python-resolve/Cargo.toml +21 -0
  94. pyroscope_io-2.0.0/rust/crates/python-resolve/build.rs +3 -0
  95. pyroscope_io-2.0.0/rust/crates/python-resolve/src/lib.rs +189 -0
  96. pyroscope_io-2.0.0/rust/crates/python-resolve/src/lines/v3_11.rs +151 -0
  97. pyroscope_io-2.0.0/rust/crates/python-resolve/src/lines.rs +285 -0
  98. pyroscope_io-2.0.0/rust/crates/python-resolve/src/strings.rs +217 -0
  99. pyroscope_io-2.0.0/rust/crates/python-resolve/src/tests.rs +339 -0
  100. pyroscope_io-2.0.0/rust/crates/python-thread-state/Cargo.toml +22 -0
  101. pyroscope_io-2.0.0/rust/crates/python-thread-state/build.rs +3 -0
  102. pyroscope_io-2.0.0/rust/crates/python-thread-state/src/glibc.rs +520 -0
  103. pyroscope_io-2.0.0/rust/crates/python-thread-state/src/lib.rs +79 -0
  104. pyroscope_io-2.0.0/rust/crates/python-thread-state/src/musl.rs +13 -0
  105. pyroscope_io-2.0.0/rust/crates/python-thread-state/src/pre_3_15.rs +13 -0
  106. pyroscope_io-2.0.0/rust/crates/python-thread-state/src/unsupported.rs +13 -0
  107. pyroscope_io-2.0.0/rust/crates/python-unwind/Cargo.toml +19 -0
  108. pyroscope_io-2.0.0/rust/crates/python-unwind/build.rs +3 -0
  109. pyroscope_io-2.0.0/rust/crates/python-unwind/src/lib.rs +706 -0
  110. pyroscope_io-2.0.0/rust/crates/python-unwind/src/thread_state/glibc.rs +244 -0
  111. pyroscope_io-2.0.0/rust/crates/python-unwind/src/thread_state/mod.rs +56 -0
  112. pyroscope_io-2.0.0/rust/crates/python-unwind/src/thread_state/musl.rs +10 -0
  113. pyroscope_io-2.0.0/rust/crates/python-unwind/src/thread_state/pre_3_15.rs +9 -0
  114. pyroscope_io-2.0.0/rust/crates/python-unwind/src/thread_state/unsupported.rs +8 -0
  115. pyroscope_io-2.0.0/rust/crates/ringbuffer/Cargo.toml +9 -0
  116. pyroscope_io-2.0.0/rust/crates/ringbuffer/src/lib.rs +182 -0
  117. pyroscope_io-2.0.0/rust/crates/ringbuffer/src/tests/mod.rs +4 -0
  118. pyroscope_io-2.0.0/rust/crates/ringbuffer/src/tests/ringbuffer.rs +265 -0
  119. pyroscope_io-2.0.0/rust/crates/ringbuffer/src/tests/ringbuffer_stress.rs +214 -0
  120. pyroscope_io-2.0.0/rust/crates/signal-timer/Cargo.toml +9 -0
  121. pyroscope_io-2.0.0/rust/crates/signal-timer/src/ctimer.rs +50 -0
  122. pyroscope_io-2.0.0/rust/crates/signal-timer/src/itimer.rs +38 -0
  123. pyroscope_io-2.0.0/rust/crates/signal-timer/src/lib.rs +197 -0
  124. pyroscope_io-2.0.0/rust/crates/signal-timer/src/tests/common.rs +29 -0
  125. pyroscope_io-2.0.0/rust/crates/signal-timer/src/tests/ctimer.rs +206 -0
  126. pyroscope_io-2.0.0/rust/crates/signal-timer/src/tests/itimer.rs +159 -0
  127. pyroscope_io-2.0.0/rust/crates/signal-timer/src/tests/mod.rs +3 -0
  128. pyroscope_io-2.0.0/rust/include/pyroscope_ffi.h +58 -0
  129. pyroscope_io-2.0.0/rust/src/encode/gen/mod.rs +3 -0
  130. pyroscope_io-2.0.0/rust/src/encode/pprof.rs +33 -0
  131. {pyroscope_io-1.4.0 → pyroscope_io-2.0.0}/rust/src/ffi.rs +0 -2
  132. {pyroscope_io-1.4.0 → pyroscope_io-2.0.0}/rust/src/ffikit.rs +1 -7
  133. {pyroscope_io-1.4.0 → pyroscope_io-2.0.0}/rust/src/lib.rs +71 -46
  134. {pyroscope_io-1.4.0 → pyroscope_io-2.0.0}/rust/src/pyroscope.rs +112 -30
  135. {pyroscope_io-1.4.0 → pyroscope_io-2.0.0}/rust/src/pyspy_backend.rs +75 -9
  136. {pyroscope_io-1.4.0 → pyroscope_io-2.0.0}/rust/src/session.rs +4 -13
  137. pyroscope_io-2.0.0/rust/src/signal_backend.rs +572 -0
  138. pyroscope_io-2.0.0/rust/src/signal_sampler/tests/cpython.rs +382 -0
  139. pyroscope_io-2.0.0/rust/src/signal_sampler.rs +227 -0
  140. {pyroscope_io-1.4.0 → pyroscope_io-2.0.0}/rust/src/utils.rs +1 -26
  141. {pyroscope_io-1.4.0 → pyroscope_io-2.0.0}/setup.py +16 -10
  142. pyroscope_io-1.4.0/README.md +0 -15
  143. pyroscope_io-1.4.0/dd-trace-py/pyroscope/stack_ffi.cpp +0 -148
  144. pyroscope_io-1.4.0/python/pyroscope/__init__.py +0 -197
  145. pyroscope_io-1.4.0/rust/Cargo.toml +0 -30
  146. pyroscope_io-1.4.0/rust/include/pyroscope_ffi.h +0 -97
  147. pyroscope_io-1.4.0/rust/src/encode/gen/mod.rs +0 -3
  148. pyroscope_io-1.4.0/rust/src/stack/mod.rs +0 -265
  149. pyroscope_io-1.4.0/rust/src/stack/sampler.rs +0 -70
  150. pyroscope_io-1.4.0/rust/src/stack/sampler_tests.rs +0 -4
  151. pyroscope_io-1.4.0/rust/src/stack/tests.rs +0 -193
  152. pyroscope_io-1.4.0/rust/src/stack/threads.rs +0 -47
  153. {pyroscope_io-1.4.0 → pyroscope_io-2.0.0}/LICENSE +0 -0
  154. {pyroscope_io-1.4.0 → pyroscope_io-2.0.0}/dd-trace-py/BundleStaticLibrary.cmake +0 -0
  155. {pyroscope_io-1.4.0 → pyroscope_io-2.0.0}/dd-trace-py/ddtrace/internal/_threads.cpp +0 -0
  156. {pyroscope_io-1.4.0 → pyroscope_io-2.0.0}/dd-trace-py/ddtrace/internal/datadog/profiling/dd_wrapper/include/clock.hpp +0 -0
  157. {pyroscope_io-1.4.0 → pyroscope_io-2.0.0}/dd-trace-py/ddtrace/internal/datadog/profiling/dd_wrapper/include/code_provenance.hpp +0 -0
  158. {pyroscope_io-1.4.0 → pyroscope_io-2.0.0}/dd-trace-py/ddtrace/internal/datadog/profiling/dd_wrapper/include/constants.hpp +0 -0
  159. {pyroscope_io-1.4.0 → pyroscope_io-2.0.0}/dd-trace-py/ddtrace/internal/datadog/profiling/dd_wrapper/include/ddup_interface.hpp +0 -0
  160. {pyroscope_io-1.4.0 → pyroscope_io-2.0.0}/dd-trace-py/ddtrace/internal/datadog/profiling/dd_wrapper/include/defer.hpp +0 -0
  161. {pyroscope_io-1.4.0 → pyroscope_io-2.0.0}/dd-trace-py/ddtrace/internal/datadog/profiling/dd_wrapper/include/libdatadog_helpers.hpp +0 -0
  162. {pyroscope_io-1.4.0 → pyroscope_io-2.0.0}/dd-trace-py/ddtrace/internal/datadog/profiling/dd_wrapper/include/native_call_tracker.hpp +0 -0
  163. {pyroscope_io-1.4.0 → pyroscope_io-2.0.0}/dd-trace-py/ddtrace/internal/datadog/profiling/dd_wrapper/include/profile.hpp +0 -0
  164. {pyroscope_io-1.4.0 → pyroscope_io-2.0.0}/dd-trace-py/ddtrace/internal/datadog/profiling/dd_wrapper/include/profile_borrow.hpp +0 -0
  165. {pyroscope_io-1.4.0 → pyroscope_io-2.0.0}/dd-trace-py/ddtrace/internal/datadog/profiling/dd_wrapper/include/profiler_state.hpp +0 -0
  166. {pyroscope_io-1.4.0 → pyroscope_io-2.0.0}/dd-trace-py/ddtrace/internal/datadog/profiling/dd_wrapper/include/profiler_stats.hpp +0 -0
  167. {pyroscope_io-1.4.0 → pyroscope_io-2.0.0}/dd-trace-py/ddtrace/internal/datadog/profiling/dd_wrapper/include/pymacro.hpp +0 -0
  168. {pyroscope_io-1.4.0 → pyroscope_io-2.0.0}/dd-trace-py/ddtrace/internal/datadog/profiling/dd_wrapper/include/python_helpers.hpp +0 -0
  169. {pyroscope_io-1.4.0 → pyroscope_io-2.0.0}/dd-trace-py/ddtrace/internal/datadog/profiling/dd_wrapper/include/sample.hpp +0 -0
  170. {pyroscope_io-1.4.0 → pyroscope_io-2.0.0}/dd-trace-py/ddtrace/internal/datadog/profiling/dd_wrapper/include/sample_manager.hpp +0 -0
  171. {pyroscope_io-1.4.0 → pyroscope_io-2.0.0}/dd-trace-py/ddtrace/internal/datadog/profiling/dd_wrapper/include/scope.hpp +0 -0
  172. {pyroscope_io-1.4.0 → pyroscope_io-2.0.0}/dd-trace-py/ddtrace/internal/datadog/profiling/dd_wrapper/include/static_sample_pool.hpp +0 -0
  173. {pyroscope_io-1.4.0 → pyroscope_io-2.0.0}/dd-trace-py/ddtrace/internal/datadog/profiling/dd_wrapper/include/types.hpp +0 -0
  174. {pyroscope_io-1.4.0 → pyroscope_io-2.0.0}/dd-trace-py/ddtrace/internal/datadog/profiling/dd_wrapper/include/uploader.hpp +0 -0
  175. {pyroscope_io-1.4.0 → pyroscope_io-2.0.0}/dd-trace-py/ddtrace/internal/datadog/profiling/dd_wrapper/include/uploader_builder.hpp +0 -0
  176. {pyroscope_io-1.4.0 → pyroscope_io-2.0.0}/dd-trace-py/ddtrace/internal/datadog/profiling/dd_wrapper/src/code_provenance.cpp +0 -0
  177. {pyroscope_io-1.4.0 → pyroscope_io-2.0.0}/dd-trace-py/ddtrace/internal/datadog/profiling/dd_wrapper/src/ddup_interface.cpp +0 -0
  178. {pyroscope_io-1.4.0 → pyroscope_io-2.0.0}/dd-trace-py/ddtrace/internal/datadog/profiling/dd_wrapper/src/libdatadog_helpers.cpp +0 -0
  179. {pyroscope_io-1.4.0 → pyroscope_io-2.0.0}/dd-trace-py/ddtrace/internal/datadog/profiling/dd_wrapper/src/native_call_tracker.cpp +0 -0
  180. {pyroscope_io-1.4.0 → pyroscope_io-2.0.0}/dd-trace-py/ddtrace/internal/datadog/profiling/dd_wrapper/src/profile.cpp +0 -0
  181. {pyroscope_io-1.4.0 → pyroscope_io-2.0.0}/dd-trace-py/ddtrace/internal/datadog/profiling/dd_wrapper/src/profile_borrow.cpp +0 -0
  182. {pyroscope_io-1.4.0 → pyroscope_io-2.0.0}/dd-trace-py/ddtrace/internal/datadog/profiling/dd_wrapper/src/profiler_state.cpp +0 -0
  183. {pyroscope_io-1.4.0 → pyroscope_io-2.0.0}/dd-trace-py/ddtrace/internal/datadog/profiling/dd_wrapper/src/profiler_stats.cpp +0 -0
  184. {pyroscope_io-1.4.0 → pyroscope_io-2.0.0}/dd-trace-py/ddtrace/internal/datadog/profiling/dd_wrapper/src/sample.cpp +0 -0
  185. {pyroscope_io-1.4.0 → pyroscope_io-2.0.0}/dd-trace-py/ddtrace/internal/datadog/profiling/dd_wrapper/src/sample_manager.cpp +0 -0
  186. {pyroscope_io-1.4.0 → pyroscope_io-2.0.0}/dd-trace-py/ddtrace/internal/datadog/profiling/dd_wrapper/src/static_sample_pool.cpp +0 -0
  187. {pyroscope_io-1.4.0 → pyroscope_io-2.0.0}/dd-trace-py/ddtrace/internal/datadog/profiling/dd_wrapper/src/uploader.cpp +0 -0
  188. {pyroscope_io-1.4.0 → pyroscope_io-2.0.0}/dd-trace-py/ddtrace/internal/datadog/profiling/dd_wrapper/src/uploader_builder.cpp +0 -0
  189. {pyroscope_io-1.4.0 → pyroscope_io-2.0.0}/dd-trace-py/ddtrace/internal/datadog/profiling/dd_wrapper/test/test_api.cpp +0 -0
  190. {pyroscope_io-1.4.0 → pyroscope_io-2.0.0}/dd-trace-py/ddtrace/internal/datadog/profiling/dd_wrapper/test/test_cleanup_race.cpp +0 -0
  191. {pyroscope_io-1.4.0 → pyroscope_io-2.0.0}/dd-trace-py/ddtrace/internal/datadog/profiling/dd_wrapper/test/test_forking.cpp +0 -0
  192. {pyroscope_io-1.4.0 → pyroscope_io-2.0.0}/dd-trace-py/ddtrace/internal/datadog/profiling/dd_wrapper/test/test_initialization.cpp +0 -0
  193. {pyroscope_io-1.4.0 → pyroscope_io-2.0.0}/dd-trace-py/ddtrace/internal/datadog/profiling/dd_wrapper/test/test_threading.cpp +0 -0
  194. {pyroscope_io-1.4.0 → pyroscope_io-2.0.0}/dd-trace-py/ddtrace/internal/datadog/profiling/dd_wrapper/test/test_utils.hpp +0 -0
  195. {pyroscope_io-1.4.0 → pyroscope_io-2.0.0}/dd-trace-py/ddtrace/internal/datadog/profiling/profiling_helpers/frame_accessors.h +0 -0
  196. {pyroscope_io-1.4.0 → pyroscope_io-2.0.0}/dd-trace-py/ddtrace/internal/datadog/profiling/profiling_helpers/linetable_parser.h +0 -0
  197. {pyroscope_io-1.4.0 → pyroscope_io-2.0.0}/dd-trace-py/ddtrace/internal/datadog/profiling/profiling_helpers/version_compat.h +0 -0
  198. {pyroscope_io-1.4.0 → pyroscope_io-2.0.0}/dd-trace-py/ddtrace/internal/datadog/profiling/stack/echion/echion/cache.h +0 -0
  199. {pyroscope_io-1.4.0 → pyroscope_io-2.0.0}/dd-trace-py/ddtrace/internal/datadog/profiling/stack/echion/echion/config.h +0 -0
  200. {pyroscope_io-1.4.0 → pyroscope_io-2.0.0}/dd-trace-py/ddtrace/internal/datadog/profiling/stack/echion/echion/cpython/tasks.h +0 -0
  201. {pyroscope_io-1.4.0 → pyroscope_io-2.0.0}/dd-trace-py/ddtrace/internal/datadog/profiling/stack/echion/echion/danger.h +0 -0
  202. {pyroscope_io-1.4.0 → pyroscope_io-2.0.0}/dd-trace-py/ddtrace/internal/datadog/profiling/stack/echion/echion/echion_sampler.h +0 -0
  203. {pyroscope_io-1.4.0 → pyroscope_io-2.0.0}/dd-trace-py/ddtrace/internal/datadog/profiling/stack/echion/echion/errors.h +0 -0
  204. {pyroscope_io-1.4.0 → pyroscope_io-2.0.0}/dd-trace-py/ddtrace/internal/datadog/profiling/stack/echion/echion/frame.h +0 -0
  205. {pyroscope_io-1.4.0 → pyroscope_io-2.0.0}/dd-trace-py/ddtrace/internal/datadog/profiling/stack/echion/echion/greenlets.h +0 -0
  206. {pyroscope_io-1.4.0 → pyroscope_io-2.0.0}/dd-trace-py/ddtrace/internal/datadog/profiling/stack/echion/echion/interp.h +0 -0
  207. {pyroscope_io-1.4.0 → pyroscope_io-2.0.0}/dd-trace-py/ddtrace/internal/datadog/profiling/stack/echion/echion/long.h +0 -0
  208. {pyroscope_io-1.4.0 → pyroscope_io-2.0.0}/dd-trace-py/ddtrace/internal/datadog/profiling/stack/echion/echion/mirrors.h +0 -0
  209. {pyroscope_io-1.4.0 → pyroscope_io-2.0.0}/dd-trace-py/ddtrace/internal/datadog/profiling/stack/echion/echion/stack_chunk.h +0 -0
  210. {pyroscope_io-1.4.0 → pyroscope_io-2.0.0}/dd-trace-py/ddtrace/internal/datadog/profiling/stack/echion/echion/stacks.h +0 -0
  211. {pyroscope_io-1.4.0 → pyroscope_io-2.0.0}/dd-trace-py/ddtrace/internal/datadog/profiling/stack/echion/echion/state.h +0 -0
  212. {pyroscope_io-1.4.0 → pyroscope_io-2.0.0}/dd-trace-py/ddtrace/internal/datadog/profiling/stack/echion/echion/strings.h +0 -0
  213. {pyroscope_io-1.4.0 → pyroscope_io-2.0.0}/dd-trace-py/ddtrace/internal/datadog/profiling/stack/echion/echion/task_name.h +0 -0
  214. {pyroscope_io-1.4.0 → pyroscope_io-2.0.0}/dd-trace-py/ddtrace/internal/datadog/profiling/stack/echion/echion/tasks.h +0 -0
  215. {pyroscope_io-1.4.0 → pyroscope_io-2.0.0}/dd-trace-py/ddtrace/internal/datadog/profiling/stack/echion/echion/threads.h +0 -0
  216. {pyroscope_io-1.4.0 → pyroscope_io-2.0.0}/dd-trace-py/ddtrace/internal/datadog/profiling/stack/echion/echion/timing.h +0 -0
  217. {pyroscope_io-1.4.0 → pyroscope_io-2.0.0}/dd-trace-py/ddtrace/internal/datadog/profiling/stack/echion/echion/vm.h +0 -0
  218. {pyroscope_io-1.4.0 → pyroscope_io-2.0.0}/dd-trace-py/ddtrace/internal/datadog/profiling/stack/fuzz/fuzz_common.h +0 -0
  219. {pyroscope_io-1.4.0 → pyroscope_io-2.0.0}/dd-trace-py/ddtrace/internal/datadog/profiling/stack/fuzz/fuzz_echion_frame_create.cpp +0 -0
  220. {pyroscope_io-1.4.0 → pyroscope_io-2.0.0}/dd-trace-py/ddtrace/internal/datadog/profiling/stack/fuzz/fuzz_echion_frame_read.cpp +0 -0
  221. {pyroscope_io-1.4.0 → pyroscope_io-2.0.0}/dd-trace-py/ddtrace/internal/datadog/profiling/stack/fuzz/fuzz_echion_greenlet.cpp +0 -0
  222. {pyroscope_io-1.4.0 → pyroscope_io-2.0.0}/dd-trace-py/ddtrace/internal/datadog/profiling/stack/fuzz/fuzz_echion_interp.cpp +0 -0
  223. {pyroscope_io-1.4.0 → pyroscope_io-2.0.0}/dd-trace-py/ddtrace/internal/datadog/profiling/stack/fuzz/fuzz_echion_long.cpp +0 -0
  224. {pyroscope_io-1.4.0 → pyroscope_io-2.0.0}/dd-trace-py/ddtrace/internal/datadog/profiling/stack/fuzz/fuzz_echion_mirrors.cpp +0 -0
  225. {pyroscope_io-1.4.0 → pyroscope_io-2.0.0}/dd-trace-py/ddtrace/internal/datadog/profiling/stack/fuzz/fuzz_echion_pyunicode.cpp +0 -0
  226. {pyroscope_io-1.4.0 → pyroscope_io-2.0.0}/dd-trace-py/ddtrace/internal/datadog/profiling/stack/fuzz/fuzz_echion_stacks.cpp +0 -0
  227. {pyroscope_io-1.4.0 → pyroscope_io-2.0.0}/dd-trace-py/ddtrace/internal/datadog/profiling/stack/fuzz/fuzz_echion_strings.cpp +0 -0
  228. {pyroscope_io-1.4.0 → pyroscope_io-2.0.0}/dd-trace-py/ddtrace/internal/datadog/profiling/stack/fuzz/fuzz_echion_task_unwind.cpp +0 -0
  229. {pyroscope_io-1.4.0 → pyroscope_io-2.0.0}/dd-trace-py/ddtrace/internal/datadog/profiling/stack/fuzz/fuzz_echion_tasks.cpp +0 -0
  230. {pyroscope_io-1.4.0 → pyroscope_io-2.0.0}/dd-trace-py/ddtrace/internal/datadog/profiling/stack/fuzz/fuzz_echion_thread_unwind.cpp +0 -0
  231. {pyroscope_io-1.4.0 → pyroscope_io-2.0.0}/dd-trace-py/ddtrace/internal/datadog/profiling/stack/fuzz/fuzz_echion_thread_unwind_tasks.cpp +0 -0
  232. {pyroscope_io-1.4.0 → pyroscope_io-2.0.0}/dd-trace-py/ddtrace/internal/datadog/profiling/stack/fuzz/fuzz_memory_image.h +0 -0
  233. {pyroscope_io-1.4.0 → pyroscope_io-2.0.0}/dd-trace-py/ddtrace/internal/datadog/profiling/stack/include/constants.hpp +0 -0
  234. {pyroscope_io-1.4.0 → pyroscope_io-2.0.0}/dd-trace-py/ddtrace/internal/datadog/profiling/stack/include/cpu_sample_ring.hpp +0 -0
  235. {pyroscope_io-1.4.0 → pyroscope_io-2.0.0}/dd-trace-py/ddtrace/internal/datadog/profiling/stack/include/cpu_timer.hpp +0 -0
  236. {pyroscope_io-1.4.0 → pyroscope_io-2.0.0}/dd-trace-py/ddtrace/internal/datadog/profiling/stack/include/cpu_timer_tid_table.hpp +0 -0
  237. {pyroscope_io-1.4.0 → pyroscope_io-2.0.0}/dd-trace-py/ddtrace/internal/datadog/profiling/stack/include/gc_frame_tracker.hpp +0 -0
  238. {pyroscope_io-1.4.0 → pyroscope_io-2.0.0}/dd-trace-py/ddtrace/internal/datadog/profiling/stack/include/origin_task_links.hpp +0 -0
  239. {pyroscope_io-1.4.0 → pyroscope_io-2.0.0}/dd-trace-py/ddtrace/internal/datadog/profiling/stack/include/sampler.hpp +0 -0
  240. {pyroscope_io-1.4.0 → pyroscope_io-2.0.0}/dd-trace-py/ddtrace/internal/datadog/profiling/stack/include/span_links.hpp +0 -0
  241. {pyroscope_io-1.4.0 → pyroscope_io-2.0.0}/dd-trace-py/ddtrace/internal/datadog/profiling/stack/include/stack_renderer.hpp +0 -0
  242. {pyroscope_io-1.4.0 → pyroscope_io-2.0.0}/dd-trace-py/ddtrace/internal/datadog/profiling/stack/include/util/cast_to_pyfunc.hpp +0 -0
  243. {pyroscope_io-1.4.0 → pyroscope_io-2.0.0}/dd-trace-py/ddtrace/internal/datadog/profiling/stack/src/cpu_timer.cpp +0 -0
  244. {pyroscope_io-1.4.0 → pyroscope_io-2.0.0}/dd-trace-py/ddtrace/internal/datadog/profiling/stack/src/echion/danger.cc +0 -0
  245. {pyroscope_io-1.4.0 → pyroscope_io-2.0.0}/dd-trace-py/ddtrace/internal/datadog/profiling/stack/src/echion/frame.cc +0 -0
  246. {pyroscope_io-1.4.0 → pyroscope_io-2.0.0}/dd-trace-py/ddtrace/internal/datadog/profiling/stack/src/echion/greenlets.cc +0 -0
  247. {pyroscope_io-1.4.0 → pyroscope_io-2.0.0}/dd-trace-py/ddtrace/internal/datadog/profiling/stack/src/echion/interp.cc +0 -0
  248. {pyroscope_io-1.4.0 → pyroscope_io-2.0.0}/dd-trace-py/ddtrace/internal/datadog/profiling/stack/src/echion/long.cc +0 -0
  249. {pyroscope_io-1.4.0 → pyroscope_io-2.0.0}/dd-trace-py/ddtrace/internal/datadog/profiling/stack/src/echion/mirrors.cc +0 -0
  250. {pyroscope_io-1.4.0 → pyroscope_io-2.0.0}/dd-trace-py/ddtrace/internal/datadog/profiling/stack/src/echion/stack_chunk.cc +0 -0
  251. {pyroscope_io-1.4.0 → pyroscope_io-2.0.0}/dd-trace-py/ddtrace/internal/datadog/profiling/stack/src/echion/stacks.cc +0 -0
  252. {pyroscope_io-1.4.0 → pyroscope_io-2.0.0}/dd-trace-py/ddtrace/internal/datadog/profiling/stack/src/echion/strings.cc +0 -0
  253. {pyroscope_io-1.4.0 → pyroscope_io-2.0.0}/dd-trace-py/ddtrace/internal/datadog/profiling/stack/src/echion/tasks.cc +0 -0
  254. {pyroscope_io-1.4.0 → pyroscope_io-2.0.0}/dd-trace-py/ddtrace/internal/datadog/profiling/stack/src/echion/threads.cc +0 -0
  255. {pyroscope_io-1.4.0 → pyroscope_io-2.0.0}/dd-trace-py/ddtrace/internal/datadog/profiling/stack/src/echion/vm.cc +0 -0
  256. {pyroscope_io-1.4.0 → pyroscope_io-2.0.0}/dd-trace-py/ddtrace/internal/datadog/profiling/stack/src/gc_frame_tracker.cpp +0 -0
  257. {pyroscope_io-1.4.0 → pyroscope_io-2.0.0}/dd-trace-py/ddtrace/internal/datadog/profiling/stack/src/origin_task_links.cpp +0 -0
  258. {pyroscope_io-1.4.0 → pyroscope_io-2.0.0}/dd-trace-py/ddtrace/internal/datadog/profiling/stack/src/sampler.cpp +0 -0
  259. {pyroscope_io-1.4.0 → pyroscope_io-2.0.0}/dd-trace-py/ddtrace/internal/datadog/profiling/stack/src/span_links.cpp +0 -0
  260. {pyroscope_io-1.4.0 → pyroscope_io-2.0.0}/dd-trace-py/ddtrace/internal/datadog/profiling/stack/src/stack.cpp +0 -0
  261. {pyroscope_io-1.4.0 → pyroscope_io-2.0.0}/dd-trace-py/ddtrace/internal/datadog/profiling/stack/src/stack_renderer.cpp +0 -0
  262. {pyroscope_io-1.4.0 → pyroscope_io-2.0.0}/dd-trace-py/ddtrace/internal/datadog/profiling/stack/test/test_alt_stack_ownership.cpp +0 -0
  263. {pyroscope_io-1.4.0 → pyroscope_io-2.0.0}/dd-trace-py/ddtrace/internal/datadog/profiling/stack/test/test_cpu_sample_ring.cpp +0 -0
  264. {pyroscope_io-1.4.0 → pyroscope_io-2.0.0}/dd-trace-py/ddtrace/internal/datadog/profiling/stack/test/test_cpu_timer_tid_table.cpp +0 -0
  265. {pyroscope_io-1.4.0 → pyroscope_io-2.0.0}/dd-trace-py/ddtrace/internal/datadog/profiling/stack/test/test_embedded_fast_copy.cpp +0 -0
  266. {pyroscope_io-1.4.0 → pyroscope_io-2.0.0}/dd-trace-py/ddtrace/internal/datadog/profiling/stack/test/test_frame_state_315.cpp +0 -0
  267. {pyroscope_io-1.4.0 → pyroscope_io-2.0.0}/dd-trace-py/ddtrace/internal/datadog/profiling/stack/test/test_origin_task_links.cpp +0 -0
  268. {pyroscope_io-1.4.0 → pyroscope_io-2.0.0}/dd-trace-py/ddtrace/internal/datadog/profiling/stack/test/test_sample_lifecycle.cpp +0 -0
  269. {pyroscope_io-1.4.0 → pyroscope_io-2.0.0}/dd-trace-py/ddtrace/internal/datadog/profiling/stack/test/test_sampling_cycle_state.cpp +0 -0
  270. {pyroscope_io-1.4.0 → pyroscope_io-2.0.0}/dd-trace-py/ddtrace/internal/datadog/profiling/stack/test/test_segv_chain.cpp +0 -0
  271. {pyroscope_io-1.4.0 → pyroscope_io-2.0.0}/dd-trace-py/ddtrace/internal/datadog/profiling/stack/test/test_span_links.cpp +0 -0
  272. {pyroscope_io-1.4.0 → pyroscope_io-2.0.0}/dd-trace-py/ddtrace/internal/datadog/profiling/stack/test/test_task_traversal.cpp +0 -0
  273. {pyroscope_io-1.4.0 → pyroscope_io-2.0.0}/dd-trace-py/ddtrace/profiling/collector/_memalloc.cpp +0 -0
  274. {pyroscope_io-1.4.0 → pyroscope_io-2.0.0}/dd-trace-py/ddtrace/profiling/collector/_memalloc_debug.h +0 -0
  275. {pyroscope_io-1.4.0 → pyroscope_io-2.0.0}/dd-trace-py/ddtrace/profiling/collector/_memalloc_frame.h +0 -0
  276. {pyroscope_io-1.4.0 → pyroscope_io-2.0.0}/dd-trace-py/ddtrace/profiling/collector/_memalloc_gc_guard.hpp +0 -0
  277. {pyroscope_io-1.4.0 → pyroscope_io-2.0.0}/dd-trace-py/ddtrace/profiling/collector/_memalloc_heap.cpp +0 -0
  278. {pyroscope_io-1.4.0 → pyroscope_io-2.0.0}/dd-trace-py/ddtrace/profiling/collector/_memalloc_heap.h +0 -0
  279. {pyroscope_io-1.4.0 → pyroscope_io-2.0.0}/dd-trace-py/ddtrace/profiling/collector/_memalloc_reentrant.cpp +0 -0
  280. {pyroscope_io-1.4.0 → pyroscope_io-2.0.0}/dd-trace-py/ddtrace/profiling/collector/_memalloc_reentrant.h +0 -0
  281. {pyroscope_io-1.4.0 → pyroscope_io-2.0.0}/dd-trace-py/ddtrace/profiling/collector/_memalloc_tb.cpp +0 -0
  282. {pyroscope_io-1.4.0 → pyroscope_io-2.0.0}/dd-trace-py/ddtrace/profiling/collector/_memalloc_tb.h +0 -0
  283. {pyroscope_io-1.4.0 → pyroscope_io-2.0.0}/dd-trace-py/ddtrace/profiling/collector/_pymacro.h +0 -0
  284. {pyroscope_io-1.4.0 → pyroscope_io-2.0.0}/python/pyroscope_io/__init__.py +0 -0
  285. {pyroscope_io-1.4.0 → pyroscope_io-2.0.0}/python/pyroscope_io.egg-info/dependency_links.txt +0 -0
  286. {pyroscope_io-1.4.0 → pyroscope_io-2.0.0}/python/pyroscope_io.egg-info/top_level.txt +0 -0
  287. /pyroscope_io-1.4.0/rust/src/encode/gen/google.rs → /pyroscope_io-2.0.0/rust/crates/pprof/src/proto.rs +0 -0
  288. {pyroscope_io-1.4.0 → pyroscope_io-2.0.0}/rust/src/backend/backend.rs +0 -0
  289. {pyroscope_io-1.4.0 → pyroscope_io-2.0.0}/rust/src/backend/mod.rs +0 -0
  290. {pyroscope_io-1.4.0 → pyroscope_io-2.0.0}/rust/src/backend/ruleset.rs +0 -0
  291. {pyroscope_io-1.4.0 → pyroscope_io-2.0.0}/rust/src/backend/tests.rs +0 -0
  292. {pyroscope_io-1.4.0 → pyroscope_io-2.0.0}/rust/src/backend/types.rs +0 -0
  293. {pyroscope_io-1.4.0 → pyroscope_io-2.0.0}/rust/src/encode/gen/push.rs +0 -0
  294. {pyroscope_io-1.4.0 → pyroscope_io-2.0.0}/rust/src/encode/gen/types.rs +0 -0
  295. {pyroscope_io-1.4.0 → pyroscope_io-2.0.0}/rust/src/encode/interner.rs +0 -0
  296. {pyroscope_io-1.4.0 → pyroscope_io-2.0.0}/rust/src/encode/mod.rs +0 -0
  297. {pyroscope_io-1.4.0 → pyroscope_io-2.0.0}/rust/src/error.rs +0 -0
  298. {pyroscope_io-1.4.0 → pyroscope_io-2.0.0}/rust/src/forksafety.rs +0 -0
  299. {pyroscope_io-1.4.0 → pyroscope_io-2.0.0}/rust/src/memory.rs +0 -0
  300. {pyroscope_io-1.4.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: 1.4.0
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.10
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,29 +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
- ${PROFILING_DIR}/stack/src/cpu_timer.cpp
89
- )
90
-
91
68
  set(FULL_EXTENSION_NAME "datadog_mem_profiler")
92
69
 
93
70
  add_library(pyroscope_common INTERFACE)
@@ -102,25 +79,10 @@ target_include_directories(pyroscope_common SYSTEM INTERFACE ${Python3_INCLUDE_D
102
79
  add_library(pyroscope_memalloc OBJECT ${MEMALLOC_SOURCES})
103
80
  target_link_libraries(pyroscope_memalloc PRIVATE pyroscope_common absl::flat_hash_map)
104
81
 
105
- add_library(pyroscope_stack OBJECT ${STACK_SOURCES})
106
- target_link_libraries(pyroscope_stack PRIVATE pyroscope_common)
107
- target_include_directories(pyroscope_stack PRIVATE ${PROFILING_DIR}/stack/include)
108
- target_include_directories(pyroscope_stack PRIVATE ${PROFILING_DIR}/dd_wrapper/include)
109
- target_include_directories(pyroscope_stack SYSTEM PRIVATE
110
- ${PROFILING_DIR}/stack/echion
111
- )
112
- target_compile_definitions(pyroscope_stack PRIVATE
113
- $<IF:$<BOOL:${APPLE}>,PL_DARWIN,PL_LINUX>
114
- )
115
- target_compile_options(pyroscope_stack PRIVATE -Wshadow -Wnon-virtual-dtor -Wold-style-cast)
116
-
117
82
  target_compile_options(pyroscope_memalloc PRIVATE -Werror)
118
- target_compile_options(pyroscope_stack PRIVATE -Werror)
119
- set_source_files_properties(${PROFILING_DIR}/stack/src/echion/vm.cc PROPERTIES COMPILE_OPTIONS -Wno-unused-function)
120
83
 
121
84
  add_library(${FULL_EXTENSION_NAME} STATIC
122
85
  $<TARGET_OBJECTS:pyroscope_memalloc>
123
- $<TARGET_OBJECTS:pyroscope_stack>
124
86
  )
125
87
  set_target_properties(${FULL_EXTENSION_NAME} PROPERTIES LINKER_LANGUAGE CXX)
126
88
 
@@ -3,12 +3,9 @@
3
3
  //
4
4
  #pragma once
5
5
 
6
- #include <optional>
7
6
  #include <string_view>
8
7
  #include <vector>
9
8
 
10
- #include "dd_wrapper/include/profile_borrow.hpp"
11
-
12
9
 
13
10
  extern "C" {
14
11
  #include "pyroscope_ffi.h"
@@ -63,11 +60,6 @@ namespace Pyroscope
63
60
 
64
61
 
65
62
 
66
- void set_builder_type(const PprofBuilderType _builder_type)
67
- {
68
- builder_type = _builder_type;
69
- }
70
-
71
63
  void push_frame(const string_id function_name, const string_id file_name, const int line)
72
64
  {
73
65
  if (frames.size() >= max_nframes)
@@ -135,88 +127,11 @@ namespace Pyroscope
135
127
  // no-op
136
128
  }
137
129
 
138
- void push_monotonic_ns([[maybe_unused]] int64_t monotonic_ns)
139
- {
140
- // no-op
141
- }
142
-
143
- void push_walltime(const int64_t walltime, [[maybe_unused]] const int64_t count)
144
- {
145
- values.wall_time += walltime;
146
- }
147
-
148
- void push_cputime(const int64_t cputime, [[maybe_unused]] const int64_t count)
149
- {
150
- values.cpu_time += cputime;
151
- }
152
-
153
- void push_span_id([[maybe_unused]] uint64_t span_id)
154
- {
155
- // no-op
156
- }
157
-
158
- void push_local_root_span_id([[maybe_unused]] uint64_t local_root_span_id)
159
- {
160
- // no-op
161
- }
162
-
163
- void push_trace_type([[maybe_unused]] const std::string_view trace_type)
164
- {
165
- // no-op
166
- }
167
-
168
- void push_task_name([[maybe_unused]] const std::string_view task_name)
169
- {
170
- // no-op
171
- }
172
-
173
- void push_task_id([[maybe_unused]] uint64_t task_id)
174
- {
175
- // no-op
176
- }
177
-
178
- void push_origin_task_id([[maybe_unused]] uint64_t origin_task_id)
179
- {
180
- // no-op
181
- }
182
-
183
- void push_origin_task_name([[maybe_unused]] const std::string_view origin_task_name)
184
- {
185
- // no-op
186
- }
187
-
188
-
189
- void flush_sample()
190
- {
191
- export_sample();
192
- clear();
193
- }
194
-
195
130
  // Pyroscope patch: appends one countless "<truncated>" frame where
196
131
  // upstream appends "<N frame(s) omitted>".
197
132
  void incr_dropped_frames([[maybe_unused]] size_t count = 1)
198
133
  {
199
134
  truncated = true;
200
135
  }
201
-
202
- /* Stats sink for the vendored stack sampler; see ProfilerStats. */
203
- static Datadog::ProfileBorrow profile_borrow()
204
- {
205
- return Datadog::ProfileBorrow{};
206
- }
207
136
  };
208
137
  }
209
-
210
- namespace Datadog {
211
-
212
- using Sample = Pyroscope::Sample;
213
- using string_id = Pyroscope::string_id;
214
-
215
- // Pyroscope patch: never nullopt; a failed intern yields index 0.
216
- inline std::optional<Pyroscope::string_id>
217
- intern_string(std::string_view s)
218
- {
219
- return Pyroscope::intern_utf8_string(s);
220
- }
221
-
222
- } // namespace Datadog
@@ -0,0 +1,25 @@
1
+ # This file is automatically @generated by Cargo.
2
+ # It is not intended for manual editing.
3
+ version = 4
4
+
5
+ [[package]]
6
+ name = "kindasafe"
7
+ version = "0.1.1"
8
+ dependencies = [
9
+ "kindasafe_init",
10
+ "libc",
11
+ ]
12
+
13
+ [[package]]
14
+ name = "kindasafe_init"
15
+ version = "0.1.1"
16
+ dependencies = [
17
+ "kindasafe",
18
+ "libc",
19
+ ]
20
+
21
+ [[package]]
22
+ name = "libc"
23
+ version = "0.2.186"
24
+ source = "registry+https://github.com/rust-lang/crates.io-index"
25
+ checksum = "68ab91017fe16c622486840e4c83c9a37afeff978bd239b5293d61ece587de66"
@@ -0,0 +1,6 @@
1
+ [workspace]
2
+ members = [
3
+ "kindasafe",
4
+ "kindasafe_init",
5
+ ]
6
+ resolver = "3"
@@ -0,0 +1,202 @@
1
+
2
+ Apache License
3
+ Version 2.0, January 2004
4
+ http://www.apache.org/licenses/
5
+
6
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
7
+
8
+ 1. Definitions.
9
+
10
+ "License" shall mean the terms and conditions for use, reproduction,
11
+ and distribution as defined by Sections 1 through 9 of this document.
12
+
13
+ "Licensor" shall mean the copyright owner or entity authorized by
14
+ the copyright owner that is granting the License.
15
+
16
+ "Legal Entity" shall mean the union of the acting entity and all
17
+ other entities that control, are controlled by, or are under common
18
+ control with that entity. For the purposes of this definition,
19
+ "control" means (i) the power, direct or indirect, to cause the
20
+ direction or management of such entity, whether by contract or
21
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
22
+ outstanding shares, or (iii) beneficial ownership of such entity.
23
+
24
+ "You" (or "Your") shall mean an individual or Legal Entity
25
+ exercising permissions granted by this License.
26
+
27
+ "Source" form shall mean the preferred form for making modifications,
28
+ including but not limited to software source code, documentation
29
+ source, and configuration files.
30
+
31
+ "Object" form shall mean any form resulting from mechanical
32
+ transformation or translation of a Source form, including but
33
+ not limited to compiled object code, generated documentation,
34
+ and conversions to other media types.
35
+
36
+ "Work" shall mean the work of authorship, whether in Source or
37
+ Object form, made available under the License, as indicated by a
38
+ copyright notice that is included in or attached to the work
39
+ (an example is provided in the Appendix below).
40
+
41
+ "Derivative Works" shall mean any work, whether in Source or Object
42
+ form, that is based on (or derived from) the Work and for which the
43
+ editorial revisions, annotations, elaborations, or other modifications
44
+ represent, as a whole, an original work of authorship. For the purposes
45
+ of this License, Derivative Works shall not include works that remain
46
+ separable from, or merely link (or bind by name) to the interfaces of,
47
+ the Work and Derivative Works thereof.
48
+
49
+ "Contribution" shall mean any work of authorship, including
50
+ the original version of the Work and any modifications or additions
51
+ to that Work or Derivative Works thereof, that is intentionally
52
+ submitted to Licensor for inclusion in the Work by the copyright owner
53
+ or by an individual or Legal Entity authorized to submit on behalf of
54
+ the copyright owner. For the purposes of this definition, "submitted"
55
+ means any form of electronic, verbal, or written communication sent
56
+ to the Licensor or its representatives, including but not limited to
57
+ communication on electronic mailing lists, source code control systems,
58
+ and issue tracking systems that are managed by, or on behalf of, the
59
+ Licensor for the purpose of discussing and improving the Work, but
60
+ excluding communication that is conspicuously marked or otherwise
61
+ designated in writing by the copyright owner as "Not a Contribution."
62
+
63
+ "Contributor" shall mean Licensor and any individual or Legal Entity
64
+ on behalf of whom a Contribution has been received by Licensor and
65
+ subsequently incorporated within the Work.
66
+
67
+ 2. Grant of Copyright License. Subject to the terms and conditions of
68
+ this License, each Contributor hereby grants to You a perpetual,
69
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
70
+ copyright license to reproduce, prepare Derivative Works of,
71
+ publicly display, publicly perform, sublicense, and distribute the
72
+ Work and such Derivative Works in Source or Object form.
73
+
74
+ 3. Grant of Patent License. Subject to the terms and conditions of
75
+ this License, each Contributor hereby grants to You a perpetual,
76
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
77
+ (except as stated in this section) patent license to make, have made,
78
+ use, offer to sell, sell, import, and otherwise transfer the Work,
79
+ where such license applies only to those patent claims licensable
80
+ by such Contributor that are necessarily infringed by their
81
+ Contribution(s) alone or by combination of their Contribution(s)
82
+ with the Work to which such Contribution(s) was submitted. If You
83
+ institute patent litigation against any entity (including a
84
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
85
+ or a Contribution incorporated within the Work constitutes direct
86
+ or contributory patent infringement, then any patent licenses
87
+ granted to You under this License for that Work shall terminate
88
+ as of the date such litigation is filed.
89
+
90
+ 4. Redistribution. You may reproduce and distribute copies of the
91
+ Work or Derivative Works thereof in any medium, with or without
92
+ modifications, and in Source or Object form, provided that You
93
+ meet the following conditions:
94
+
95
+ (a) You must give any other recipients of the Work or
96
+ Derivative Works a copy of this License; and
97
+
98
+ (b) You must cause any modified files to carry prominent notices
99
+ stating that You changed the files; and
100
+
101
+ (c) You must retain, in the Source form of any Derivative Works
102
+ that You distribute, all copyright, patent, trademark, and
103
+ attribution notices from the Source form of the Work,
104
+ excluding those notices that do not pertain to any part of
105
+ the Derivative Works; and
106
+
107
+ (d) If the Work includes a "NOTICE" text file as part of its
108
+ distribution, then any Derivative Works that You distribute must
109
+ include a readable copy of the attribution notices contained
110
+ within such NOTICE file, excluding those notices that do not
111
+ pertain to any part of the Derivative Works, in at least one
112
+ of the following places: within a NOTICE text file distributed
113
+ as part of the Derivative Works; within the Source form or
114
+ documentation, if provided along with the Derivative Works; or,
115
+ within a display generated by the Derivative Works, if and
116
+ wherever such third-party notices normally appear. The contents
117
+ of the NOTICE file are for informational purposes only and
118
+ do not modify the License. You may add Your own attribution
119
+ notices within Derivative Works that You distribute, alongside
120
+ or as an addendum to the NOTICE text from the Work, provided
121
+ that such additional attribution notices cannot be construed
122
+ as modifying the License.
123
+
124
+ You may add Your own copyright statement to Your modifications and
125
+ may provide additional or different license terms and conditions
126
+ for use, reproduction, or distribution of Your modifications, or
127
+ for any such Derivative Works as a whole, provided Your use,
128
+ reproduction, and distribution of the Work otherwise complies with
129
+ the conditions stated in this License.
130
+
131
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
132
+ any Contribution intentionally submitted for inclusion in the Work
133
+ by You to the Licensor shall be under the terms and conditions of
134
+ this License, without any additional terms or conditions.
135
+ Notwithstanding the above, nothing herein shall supersede or modify
136
+ the terms of any separate license agreement you may have executed
137
+ with Licensor regarding such Contributions.
138
+
139
+ 6. Trademarks. This License does not grant permission to use the trade
140
+ names, trademarks, service marks, or product names of the Licensor,
141
+ except as required for reasonable and customary use in describing the
142
+ origin of the Work and reproducing the content of the NOTICE file.
143
+
144
+ 7. Disclaimer of Warranty. Unless required by applicable law or
145
+ agreed to in writing, Licensor provides the Work (and each
146
+ Contributor provides its Contributions) on an "AS IS" BASIS,
147
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
148
+ implied, including, without limitation, any warranties or conditions
149
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
150
+ PARTICULAR PURPOSE. You are solely responsible for determining the
151
+ appropriateness of using or redistributing the Work and assume any
152
+ risks associated with Your exercise of permissions under this License.
153
+
154
+ 8. Limitation of Liability. In no event and under no legal theory,
155
+ whether in tort (including negligence), contract, or otherwise,
156
+ unless required by applicable law (such as deliberate and grossly
157
+ negligent acts) or agreed to in writing, shall any Contributor be
158
+ liable to You for damages, including any direct, indirect, special,
159
+ incidental, or consequential damages of any character arising as a
160
+ result of this License or out of the use or inability to use the
161
+ Work (including but not limited to damages for loss of goodwill,
162
+ work stoppage, computer failure or malfunction, or any and all
163
+ other commercial damages or losses), even if such Contributor
164
+ has been advised of the possibility of such damages.
165
+
166
+ 9. Accepting Warranty or Additional Liability. While redistributing
167
+ the Work or Derivative Works thereof, You may choose to offer,
168
+ and charge a fee for, acceptance of support, warranty, indemnity,
169
+ or other liability obligations and/or rights consistent with this
170
+ License. However, in accepting such obligations, You may act only
171
+ on Your own behalf and on Your sole responsibility, not on behalf
172
+ of any other Contributor, and only if You agree to indemnify,
173
+ defend, and hold each Contributor harmless for any liability
174
+ incurred by, or claims asserted against, such Contributor by reason
175
+ of your accepting any such warranty or additional liability.
176
+
177
+ END OF TERMS AND CONDITIONS
178
+
179
+ APPENDIX: How to apply the Apache License to your work.
180
+
181
+ To apply the Apache License to your work, attach the following
182
+ boilerplate notice, with the fields enclosed by brackets "[]"
183
+ replaced with your own identifying information. (Don't include
184
+ the brackets!) The text should be enclosed in the appropriate
185
+ comment syntax for the file format. We also recommend that a
186
+ file or class name and description of purpose be included on the
187
+ same "printed page" as the copyright notice for easier
188
+ identification within third-party archives.
189
+
190
+ Copyright 2022 Pyroscope
191
+
192
+ Licensed under the Apache License, Version 2.0 (the "License");
193
+ you may not use this file except in compliance with the License.
194
+ You may obtain a copy of the License at
195
+
196
+ http://www.apache.org/licenses/LICENSE-2.0
197
+
198
+ Unless required by applicable law or agreed to in writing, software
199
+ distributed under the License is distributed on an "AS IS" BASIS,
200
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
201
+ See the License for the specific language governing permissions and
202
+ limitations under the License.
@@ -0,0 +1,16 @@
1
+ [package]
2
+ name = "kindasafe"
3
+ version = "0.1.1" # x-release-please-version
4
+ edition = "2024"
5
+ description = "Signal-safe memory reading for x86_64 and aarch64 using naked functions and crash recovery"
6
+ license = "Apache-2.0"
7
+ repository = "https://github.com/grafana/pyroscope-kinda-safe"
8
+ keywords = ["memory", "signal-safe", "no_std", "profiler"]
9
+ categories = ["no-std", "os::unix-apis"]
10
+ readme = "README.md"
11
+
12
+ [dependencies]
13
+
14
+ [dev-dependencies]
15
+ libc = "=0.2.186"
16
+ kindasafe_init = { path = "../kindasafe_init" }
@@ -0,0 +1,86 @@
1
+ # kindasafe
2
+
3
+ Signal-safe memory reading for x86_64 and aarch64 on Linux.
4
+
5
+ Uses naked assembly functions to read memory, with crash recovery via SIGSEGV/SIGBUS signal handlers. When a read faults, the signal handler adjusts the program counter to skip past the faulting instruction and reports the error instead of crashing.
6
+
7
+ This is a `no_std` crate providing the core read primitives. Use [`kindasafe_init`](https://crates.io/crates/kindasafe_init) to install the required signal handlers.
8
+
9
+ Normal builds recover faults to keep the target application running when the
10
+ unwinder encounters a bug. `kindasafe::recovered_faults() -> u64` exposes a
11
+ cumulative, process-local count of public reads returning `ReadMemError`. Each
12
+ failed slice counts once, including partially completed copies. Successful
13
+ reads, deliberate sanity checks, and signals forwarded to previous handlers do
14
+ not increment it. The lock-free counter uses relaxed atomics, wraps on overflow,
15
+ and has no reset API. Export its value through the embedding profiler's metrics
16
+ system; no exporter runs in the read path.
17
+
18
+ AddressSanitizer builds use compiler-instrumented volatile loads and forward
19
+ byte copies instead of assembly. They install no recovery handlers, perform no
20
+ manual poison checks, and make no manual ASan reporting calls. Successful reads
21
+ return `Ok`; invalid accesses are left to ASan or fatal-signal handling. A
22
+ volatile load may target memory outside any Rust allocation and is never
23
+ removed, so an optimized build cannot delete an invalid read or replace it with
24
+ an invented value before ASan sees it. Both sanity checks skip their deliberate
25
+ invalid read, and `recovered_faults()` always returns zero. Empty slices never
26
+ access the source.
27
+
28
+ ASan source memory must contain initialized bytes and satisfy Rust's pointer and
29
+ aliasing rules. No other thread may write or free those bytes during inspection.
30
+ These requirements are stronger than the normal assembly backend's concurrent
31
+ read contract. ASan does not make undefined behavior valid or guarantee that
32
+ every invalid access is detected.
33
+
34
+ ASan builds are for diagnosing unwinder bugs. An invalid read is a test failure,
35
+ so we accept ASan's standard fatal reporting even inside SIGPROF. That reporting
36
+ is not guaranteed async-signal-safe: it can deadlock if the interrupted thread
37
+ holds a lock the reporter needs. Diagnostics are therefore best-effort, and
38
+ fault tests use subprocess timeouts. This tradeoff is limited to ASan builds;
39
+ normal builds recover faults without invoking ASan.
40
+
41
+ Keep ASan's default `handle_segv=1`, `handle_sigbus=1` and `halt_on_error=1`
42
+ in `ASAN_OPTIONS`. Without its SIGSEGV and SIGBUS handlers, ASan does not see
43
+ faults: an unmapped read goes to the previous handler or the default action,
44
+ which usually kills the process without a report. With `halt_on_error=0` in a
45
+ `-Zsanitizer-recover=address` build, the report for a poisoned read returns, so
46
+ the reporter runs to completion inside SIGPROF and the read returns the
47
+ poisoned bytes.
48
+
49
+ ## Usage
50
+
51
+ ```rust
52
+ // First, initialize the signal handlers (requires kindasafe_init)
53
+ // SAFETY: Nothing else changes how SIGSEGV and SIGBUS are handled during
54
+ // initialization. Until now they were left at the default or handled by
55
+ // SA_SIGINFO functions that remain valid.
56
+ unsafe { kindasafe_init::init() }.expect("failed to init");
57
+
58
+ // Read a u64 from a potentially-invalid address
59
+ // SAFETY: init() succeeded, its handlers remain installed, and SIGSEGV and
60
+ // SIGBUS are unblocked on this thread. The result is validated before use
61
+ // because the target may be modified concurrently.
62
+ let value = unsafe { kindasafe::u64(some_address) };
63
+ match value {
64
+ Ok(v) => println!("read: {v:#x}"),
65
+ Err(e) => println!("fault: signal {}", e.signal),
66
+ }
67
+ ```
68
+
69
+ `kindasafe::u32(address)` reads exactly four bytes in one load and returns a
70
+ `Result<u32, ReadMemError>`, with the same safety requirements as `u64`. This
71
+ avoids a byte-wise copy when reading 32-bit fields such as Python instruction
72
+ offsets. `kindasafe::u8(address)` reads exactly one byte and returns a
73
+ `Result<u8, ReadMemError>`, suitable for fields such as Python frame owners.
74
+
75
+ In normal builds, when reading from a SIGPROF sampling handler, check that SIGSEGV and SIGBUS
76
+ are unblocked on that thread. The recovery handlers block SIGPROF while they
77
+ run, but other code may still block recovery signals before sampling starts.
78
+
79
+ ## Supported architectures
80
+
81
+ - x86_64
82
+ - aarch64
83
+
84
+ ## License
85
+
86
+ Apache-2.0
@@ -0,0 +1,10 @@
1
+ fn main() {
2
+ println!("cargo:rustc-check-cfg=cfg(kindasafe_asan)");
3
+ let sanitizers = std::env::var("CARGO_CFG_SANITIZE").unwrap_or_default();
4
+ if sanitizers
5
+ .split(',')
6
+ .any(|sanitizer| sanitizer == "address")
7
+ {
8
+ println!("cargo:rustc-cfg=kindasafe_asan");
9
+ }
10
+ }