-
Notifications
You must be signed in to change notification settings - Fork 5
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
[PROF-9088] Ensure DSO objects are cleared #400
Conversation
It no longer has a PID container It is embedded in a process object
056210a
to
d3128f0
Compare
void add_error_frame(const Dso *dso, UnwindState *us, | ||
[[maybe_unused]] ProcessAddress_t pc, | ||
SymbolErrors error_case) { | ||
ddprof_stats_add(STATS_UNWIND_ERRORS, 1, nullptr); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the unwinding error stats was computed on symbolization failures sometimes.
Benchmark results for collatzParameters
SummaryFound 0 performance improvements and 0 performance regressions! Performance is the same for 1 metrics, 0 unstable metrics. See unchanged results
|
Benchmark results for BadBoggleSolver_runParameters
SummaryFound 0 performance improvements and 0 performance regressions! Performance is the same for 1 metrics, 0 unstable metrics. See unchanged results
|
3cc7706
to
9707a09
Compare
0725404
to
2aefb65
Compare
2aefb65
to
5c00dcc
Compare
src/unwind.cc
Outdated
@@ -59,32 +59,46 @@ void unwind_init_sample(UnwindState *us, const uint64_t *sample_regs, | |||
|
|||
DDRes unwindstate_unwind(UnwindState *us) { | |||
DDRes res = ddres_init(); | |||
Process &process = us->process_hdr.get(us->pid); | |||
bool avoid_new_attach = false; | |||
if (us->process_hdr.process_count() > us->max_pids) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
process_count()
might not be equal to the number of attached dwfl objects.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes. Agreed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am not pushing this further as making the control perfect will take quite an extra bit of work. I understand the current limitations.
private: | ||
static std::string format_cgroup_file(pid_t pid, | ||
std::string_view path_to_proc); | ||
|
||
static DDRes read_cgroup_ns(pid_t pid, std::string_view path_to_proc, | ||
CGroupId_t &cgroup); | ||
|
||
std::unique_ptr<DwflWrapper> _dwfl_wrapper{}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
std::unique_ptr<DwflWrapper> _dwfl_wrapper{}; | |
std::unique_ptr<DwflWrapper> _dwfl_wrapper; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I did not have an opinion on this. Leaving as is unless we push for a different guideline. Feel free to challenge me further if this is important.
b5b82ef
to
9a07ff9
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for fixing this leak !
What does this PR do?
Motivation
We were seeing a large heap usage with the DSO objects.
Indeed prior to this PR we were not considering the existing DSOs that had no unwinding (dwfl) objects.
Additional Notes
NA
How to test the change?
We should test the RSS improvements on full host applications.