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

Need metric set resize function #1215

Open
morrone opened this issue Jun 14, 2023 · 3 comments
Open

Need metric set resize function #1215

morrone opened this issue Jun 14, 2023 · 3 comments
Milestone

Comments

@morrone
Copy link
Collaborator

morrone commented Jun 14, 2023

When we want to change the size the heap of a metric set right now, we just have to delete the metric set and create a new one. I believe that we are adding functions to ldms to allow changing metric set permissions manually, and that doesn't play well with this model. When a sampler deletes a metric set and creates a new one, any changes to thing metric set made externally to the sampler will be lost when the metric set is recreated.

The sampler author shouldn't need to know about or track those changes to the metric set, so really what we need is a new API call to allow us to delete a metric set and create a new one with the same properties (but different heap size) than the previous one.

We should keep in mind that resizes will happen to shrink the heap size as well, not only to grow the heap size.

@tom95858
Copy link
Collaborator

set_t ldms_set_realloc(set_t set, size_t new_heap_size)

The resulting set (memory available) would contain all the contents of the previous metric set including permissions, ownership, and set-info with a heap resized to the specified value.

@tom95858
Copy link
Collaborator

@morrone, @nichamon: What is the target for this change v4.5?

@tom95858 tom95858 added this to the v4.5.1 milestone Oct 22, 2024
@nichamon
Copy link
Collaborator

@tom95858 I agreed with you that it's for v4.5.

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

No branches or pull requests

3 participants