Live data from Hacker News

Go has added Valgrind support

go-review.googlesource.com

1–10 of 157 posts

Re: Go has added Valgrind support

#3
It only works if every package tests with it.

Otherwise the relevant warnings get swamped by a huge amount by irrelevant warnings.

This is why running Valgrind on Python code does not work.

Re: Go has added Valgrind support

#4
> Instead of adding the Valgrind headers to the tree, and using cgo to call the various Valgrind client request macros, we just add an assembly function which emits the necessary instructions to trigger client requests.

Love that they have taken this route, this is the way bootstraped toolchains should be, minimal building blocks and everything else on the language itself.

Re: Go has added Valgrind support

#5

looks very promising, one of the biggest issue in golang for me is profiling and constant memory leaks/pressure. Not sure if there is an alternative of what people use now

I'd love to hear more! What kind of profiling issues are you running into? I'm assuming the inuse memory profiles are sometimes not good enough to track down leaks since they only show the allocation stack traces? Have you tried goref [1]?. What kind of memory pressure issues are you dealing with?

[1] https://github.com/cloudwego/goref

Disclaimer: I work on continuous profiling for Datadog and contribute to the profiling features in the runtime.

Re: Go has added Valgrind support

#7

looks very promising, one of the biggest issue in golang for me is profiling and constant memory leaks/pressure. Not sure if there is an alternative of what people use now

Ideally, they would have learnt from other languages, and offered explicit control over what goes into the stack instead of relying into escape analysis alone.

As it is, the only way to currently handle that is with " -gcflags -m=3" or using something like VSCode Go plugin, via "ui.codelenses" and "ui.diagnostic.annotations" configurations.

Post reply on HN