TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Faster GDB startup

82 点作者 thestoicattack大约 3 年前

2 条评论

kleinstein大约 3 年前
&gt; (for example, the demangler is crash-prone so GDB installs a SEGV handler when invoking it)<p>Yikes.<p>&gt; There were some helpful comments that I believe were true at one point that explained why this was useful. However, I instrumented GDB and found that less than 10% of the cached DIEs were ever re-used. Computing and allocating them was largely a waste, just to support a few lookups. And, nearly every DIE that was ever looked up was done so on behalf of a single call — so the cache was nearly useless.<p>It&#x27;s interesting if this partial DIE reuse is a function of the binary being loaded in GDB - or is it a hardcoded analysis that&#x27;s common to all binaries?<p>I&#x27;m curious to know more about the test suite that underlies these instrumentations - presumably there&#x27;s a representative sample of DWARF-containing binaries that represent the majority of use cases, but are there perhaps pathological cases for which the DIE caching mechanism is essential for reasonable startup time? Maybe it&#x27;s these pathological cases that motivated the caching mechanism in the first place - and perhaps they&#x27;re just not included in the test suite used for instrumentation.
评论 #31120127 未加载
评论 #31119921 未加载
unwind大约 3 年前
Very cool!<p>The author claims in a comment that the fixes missed the branch for GDB 12, but are planned for inclusion in the GDB 13 release. The GDB release schedule [1] does not list a planned date for that release but I believe 12 has recently happened.<p>[1] <a href="https:&#x2F;&#x2F;www.sourceware.org&#x2F;gdb&#x2F;schedule&#x2F;" rel="nofollow">https:&#x2F;&#x2F;www.sourceware.org&#x2F;gdb&#x2F;schedule&#x2F;</a>