TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Reducing Go execution tracer overhead with frame pointer unwinding

100 pointsby felixgeover 2 years ago

4 comments

dafelstover 2 years ago
Pro tip: if you think you will need to profile&#x2F;trace any natively compiled code at runtime (e.g. some kind of long running service in production) then for the love of god, please don&#x27;t enable &quot;omit frame pointer&quot; - it can mean the difference between actually readable callstacks&#x2F;flame graphs and garbage. The days of it having a huge impact on performance are gone, at least from my experience - disabling omitting frame pointer has made no significantly measurable difference to any services I have run in recent years, though you should always confirm that is true for your own case.<p>So while this article is about Go, it definitely applies to C&#x2F;C++ as well.
评论 #34607470 未加载
评论 #34606450 未加载
philosopher1234over 2 years ago
It was interesting to look directly at the source code linked in the article for stack unwiding [1]. In particular, it&#x27;s neat to see how thoroughly documented this file is. Reminds me of poking around the SQLite codebase.<p>[1] <a href="https:&#x2F;&#x2F;github.com&#x2F;golang&#x2F;go&#x2F;blob&#x2F;6b8b7823c7fd9f3f2317f657120dc2e965d97b77&#x2F;src&#x2F;runtime&#x2F;traceback.go#L32">https:&#x2F;&#x2F;github.com&#x2F;golang&#x2F;go&#x2F;blob&#x2F;6b8b7823c7fd9f3f2317f65712...</a>
jchwover 2 years ago
I definitely hope omitting the frame pointer falls out of style; it&#x27;s certainly a pain in the ass for reverse engineering :)
sa46over 2 years ago
Would this speed up capturing stack traces? The use case I have in mind is stack traces for logging. The Zap logger has a mild warning [1] about stack traces being relatively expensive.<p>[1]: <a href="https:&#x2F;&#x2F;pkg.go.dev&#x2F;go.uber.org&#x2F;zap#Stack" rel="nofollow">https:&#x2F;&#x2F;pkg.go.dev&#x2F;go.uber.org&#x2F;zap#Stack</a>