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
.eh_frame: unwind table map improvements #794
.eh_frame: unwind table map improvements #794
Conversation
Signed-off-by: Francisco Javier Honduvilla Coto <javierhonduco@gmail.com>
Signed-off-by: Francisco Javier Honduvilla Coto <javierhonduco@gmail.com>
0686a87
to
a6973b6
Compare
For parca-demo-cpp ``` Compacted the unwind table from 65608 elements to 53153 elements ``` Signed-off-by: Francisco Javier Honduvilla Coto <javierhonduco@gmail.com>
a6973b6
to
4f88ac5
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.
LGTM
@@ -415,6 +417,25 @@ func (p *CPU) ensureUnwindTables(pid int) error { | |||
} | |||
} | |||
|
|||
if compact { |
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.
👍
prevRBPRegisterOffset := int64(0) | ||
|
||
for _, row := range pt { | ||
newEntry := row.CFA.Reg != prevCFARegister || row.CFA.Offset != prevCFAOffset || row.RBP.Offset != prevRBPRegisterOffset |
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.
newEntry := row.CFA.Reg != prevCFARegister || row.CFA.Offset != prevCFAOffset || row.RBP.Offset != prevRBPRegisterOffset | |
notSameAsPrev := row.CFA.Reg != prevCFARegister || row.CFA.Offset != prevCFAOffset || row.RBP.Offset != prevRBPRegisterOffset |
I think this is semantically more correct, no?
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.
This has changed after I've commented above 🙈
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.
Was just changing it :D Thanks for noticing, the previous name was outright wrong!
As we binary search over the unwind information, any neighbouring rows with the same unwind info can be summarised in just one. This optimisation was obvious from early on and I added it back in September last year (parca-dev/parca-agent#794) but it was removed later on. Test Plan ======== See Agent PR. Signed-off-by: Francisco Javier Honduvilla Coto <javierhonduco@gmail.com>
As we binary search over the unwind information, any neighbouring rows with the same unwind info can be summarised in just one. This optimisation was obvious from early on and I added it back in September last year (parca-dev/parca-agent#794) but it was removed later on. Test Plan ======== See Agent PR. Signed-off-by: Francisco Javier Honduvilla Coto <javierhonduco@gmail.com>
As we binary search over the unwind information, any neighbouring rows with the same unwind info can be summarised in just one. This optimisation was obvious from early on and I added it back in September last year (#794) but it was removed later on and never re-added. Test Plan ========= Snapshot tests + added unit tests Signed-off-by: Francisco Javier Honduvilla Coto <javierhonduco@gmail.com>
As we binary search over the unwind information, any neighbouring rows with the same unwind info can be summarised in just one. This optimisation was obvious from early on and I added it back in September last year (#794) but it was removed later on and never re-added. Test Plan ========= Snapshot tests + added unit tests Signed-off-by: Francisco Javier Honduvilla Coto <javierhonduco@gmail.com>
As we binary search over the unwind information, any neighbouring rows with the same unwind info can be summarised in just one. This optimisation was obvious from early on and I added it back in September last year (#794) but it was removed later on and never re-added. Test Plan ========= Snapshot tests + added unit tests Signed-off-by: Francisco Javier Honduvilla Coto <javierhonduco@gmail.com>
As we binary search over the unwind information, any neighbouring rows with the same unwind info can be summarised in just one. This optimisation was obvious from early on and I added it back in September last year (#794) but it was removed later on and never re-added. Test Plan ========= Snapshot tests + added unit tests Signed-off-by: Francisco Javier Honduvilla Coto <javierhonduco@gmail.com>
As we binary search over the unwind information, any neighbouring rows with the same unwind info can be summarised in just one. This optimisation was obvious from early on and I added it back in September last year (#794) but it was removed later on and never re-added. Test Plan ========= Snapshot tests + added unit tests
parca-demo-cpp-no-fp
andparca-demo-cpp
and they both worked)