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

agent: fix mistakes in off-heap mstat naming #258

Merged
merged 3 commits into from
Nov 5, 2024

Conversation

mtardy
Copy link
Contributor

@mtardy mtardy commented Nov 4, 2024

Some statistics were mislabeled as related to the stack while those are
off-heap memory statistics. I'm guessing this is due to their proximity
with the stack stats.

Here is the general documentation for these metrics:
https://github.com/golang/go/blob/go1.23.2/src/runtime/mstats.go#L209-L218

// Off-heap memory statistics.
//
// The following statistics measure runtime-internal
// structures that are not allocated from heap memory (usually
// because they are part of implementing the heap). Unlike
// heap or stack memory, any memory allocated to these
// structures is dedicated to these structures.
//
// These are primarily useful for debugging runtime memory
// overheads.>

Fixes: 390a413 ("Report more Stack info, as stack-mspan-inuse stack-mspan-sys etc. (#63)")

Also adds BuckHashSys mstat and fix inuse to in-use, see commits.

Some statistics were mislabeled as related to the stack while those are
off-heap memory statistics. I'm guessing this is due to their proximity
with the stack stats.

Here is the general documentation for these metrics:
https://github.com/golang/go/blob/go1.23.2/src/runtime/mstats.go#L209-L218

	// Off-heap memory statistics.
	//
	// The following statistics measure runtime-internal
	// structures that are not allocated from heap memory (usually
	// because they are part of implementing the heap). Unlike
	// heap or stack memory, any memory allocated to these
	// structures is dedicated to these structures.
	//
	// These are primarily useful for debugging runtime memory
	// overheads.>

Fixes: 390a413 ("Report more Stack info, as stack-mspan-inuse stack-mspan-sys etc. (google#63)")

Signed-off-by: Mahe Tardy <[email protected]>
Since I renamed these fields in the previous commit, let's take this
opportunity to be consistent with the other fields containing 'in use'.

Signed-off-by: Mahe Tardy <[email protected]>
All off-heap metrics are returned by MemStats except this one so let's
add it to have a better global picture of off-heap memory use.

Signed-off-by: Mahe Tardy <[email protected]>
Copy link
Collaborator

@tklauser tklauser left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @mtardy!

@tklauser tklauser merged commit 0463c1d into google:master Nov 5, 2024
10 checks passed
@mtardy mtardy deleted the fix-mistakes-mstats branch November 5, 2024 11:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants