Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

runtime: document gctrace output in relation to MemStats #46846

Open
JohnRusk opened this issue Jun 21, 2021 · 4 comments
Open

runtime: document gctrace output in relation to MemStats #46846

JohnRusk opened this issue Jun 21, 2021 · 4 comments

Comments

@JohnRusk
Copy link

@JohnRusk JohnRusk commented Jun 21, 2021

How do the heap sizes output by gctrace map to the various values of MemStats? I assume that the heap values from gctrace roughly match one (or two?) of the MemStats fields, but I can't find anything that documents that.

I see in the code that the gctrace outputs are mostly based on heap_live and the MemStats values are not (directly) based on the the same thing... but I'm guessing there's an indirect or approximate link. Knowing such a mapping would help a lot in using gctrace, since it doesn't have heaps of documentation but MemStats has lots.

@seankhliao
Copy link
Contributor

@seankhliao seankhliao commented Jun 21, 2021

Unlike many projects, the Go project does not use GitHub Issues for general discussion or asking questions. GitHub Issues are used for tracking bugs and proposals only.

For questions please refer to https://github.com/golang/go/wiki/Questions

@seankhliao seankhliao closed this Jun 21, 2021
@JohnRusk
Copy link
Author

@JohnRusk JohnRusk commented Jun 21, 2021

@seankhliao In that case, please re-open this as a documentation bug. It should be documented.

@seankhliao seankhliao changed the title gctrace vs MemStats mapping of fields runtime: document gctrace output in relation to MemStats Jun 21, 2021
@seankhliao
Copy link
Contributor

@seankhliao seankhliao commented Jun 21, 2021

@seankhliao seankhliao reopened this Jun 21, 2021
@ianlancetaylor ianlancetaylor added this to the Backlog milestone Jun 21, 2021
@mknyszek mknyszek self-assigned this Jun 22, 2021
@mknyszek
Copy link
Contributor

@mknyszek mknyszek commented Jun 22, 2021

I'm hoping to do something around documentation of how the GC views memory and the heap in the 1.18, so I've assigned it to myself. I'll leave it in the backlog just in case, but it's on my radar.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
4 participants