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

Use object file pool cache for unwind information #2595

Merged
merged 2 commits into from
Mar 7, 2024

Conversation

gnurizen
Copy link
Contributor

@gnurizen gnurizen commented Mar 5, 2024

No description provided.

Copy link
Member

@kakkoyun kakkoyun left a comment

Choose a reason for hiding this comment

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

LGTM 🚀

I'm looking forward to observing its effects on production environments.

@@ -451,12 +455,22 @@ func requireNoRedundantRows(t *testing.T, ut CompactUnwindTable) {
}
}

func objectFile(t testing.TB, path string) (o *objectfile.ObjectFile) {
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
func objectFile(t testing.TB, path string) (o *objectfile.ObjectFile) {
func objectFile(t testing.TB, path string) *objectfile.ObjectFile {

@@ -451,12 +455,22 @@ func requireNoRedundantRows(t *testing.T, ut CompactUnwindTable) {
}
}

func objectFile(t testing.TB, path string) (o *objectfile.ObjectFile) {
p := objectfile.NewPool(log.NewNopLogger(), prometheus.NewRegistry(), "", 1, 0)
Copy link
Member

Choose a reason for hiding this comment

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

Putting the pool as a package-level variable and maybe initializing it with an init function is better. You can share the pool between tests.

@gnurizen gnurizen marked this pull request as ready for review March 6, 2024 12:48
@gnurizen gnurizen requested a review from a team as a code owner March 6, 2024 12:48
@gnurizen gnurizen force-pushed the cache-better branch 2 times, most recently from 4064e9d to 85a9c45 Compare March 6, 2024 15:34
@kakkoyun kakkoyun merged commit 96b5d9e into parca-dev:main Mar 7, 2024
11 of 12 checks passed
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