gh-143423: Fix free-threaded build detection in sampling profiler (#143426)

2 files changed