Granulate / gprofiler

gProfiler is a system-wide profiler, combining multiple sampling profilers to produce unified visualization of what your CPU is spending time on.
https://profiler.granulate.io
Apache License 2.0
741 stars 54 forks source link

python: PyPerf: Prevent libunwind accessors from performing unwanted actions #814

Closed Jongy closed 1 year ago

Jongy commented 1 year ago

To extract native stacks in PyPerf, we libunwind-ptrace which invokes ptrace-related operations on the process. We want PyPerf to remain "read only" with respect to the profiled processes - that is, no accessor that might have any effect on the process is allowed. This means blocking writes, suspends, pauses etc.

We already block some of the accessors, but not all. Let's make sure all accessors that might have any unwanted effects are blocked.