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
Assignees
Labels
compiler/runtime Issues related to the Go compiler and/or runtime. Documentation NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Milestone

Comments

@JohnRusk
Copy link

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
Member

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

@JohnRusk
Copy link
Author

@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 seankhliao added Documentation NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. labels Jun 21, 2021
@seankhliao
Copy link
Member

cc @aclements @randall77 @mknyszek @prattmic

@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

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.

@gopherbot gopherbot added the compiler/runtime Issues related to the Go compiler and/or runtime. label Jul 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
compiler/runtime Issues related to the Go compiler and/or runtime. Documentation NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Projects
Status: Triage Backlog
Development

No branches or pull requests

5 participants