Ruby How SDB Scans the Ruby Stack Without the GVL

yfractal · 2025年01月15日 · 最后由 shueam1 回复于 10 天前 · 335 次阅读

链接 https://github.com/yfractal/blog/blob/master/blog/2025-01-15-non-blocking-stack-profiler.md

这篇文章主要是介绍为什么 SDB 扫描 Ruby 栈的时候没有使用全局锁,但仍然可以得到想要的结果的。

我很欣赏这个功能

@ drift boss

哎 人与人之间的差距太大了 看不明白

jicheng1014 #1 回复

我从 18 年开始就看类似的事情了,琢磨的时间比较久吧 😂

我智商平平,有的时候还挺蠢,但耐心还行。经历上算是吃过见过,看的东西应该不算少吧。

你觉得这样的 profiler 适合在生产环境中使用吗?为什么?

@ geometry dash

Fascinating deep dive into how SDB scans the Ruby stack without relying on the Global VM Lock! It's impressive to see how concurrency and performance are managed in such a nuanced way. Would love to see more real-world use cases or performance comparisons. @basketrandom

To understand how the Ruby SDB (StackDumpBuffer) scans the Ruby stack without the Global VM Lock (GVL), we need to delve into a few concepts related to Ruby's threading model and the SDB itself. crazy chicken 3d

需要 登录 后方可回复, 如果你还没有账号请 注册新账号