runtime.newStack getting called from Wrap?
ankon opened this issue · comments
Sorry for the late reply. What you're seeing is the stack of the goroutine growing from it's initial size (probably 2 KiB) to a bigger size (probably 4 KiB) due to the initially stack having filled up, and more space being required by the current callee (in this case httpsnooop.Wrap
. The fact that this is happening in httpsnoop is coincidental. If you were to add another middleware, you'd probably see the stack growth happening in those functions. Or if you remove a middleware, you'd see the stack growth in your final handler code.
I'm closing this issue for now because this is more of a general Go performance topic best discussed on either the Go issue tracker (there are already issues for this, please search before opening a new one) or similar forums.