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
Hide implementations of complex data structures in SymtabAPI::Symtab #1531
Conversation
This will have to wait until dyninst/testsuite#233 is merged. |
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.
Only suggestion: impl
could be const
symtabAPI/h/Symtab.h
Outdated
@@ -111,6 +91,9 @@ class SYMTAB_EXPORT Symtab : public LookupInterface, | |||
friend class relocationEntry; | |||
friend class Object; | |||
|
|||
// Hide implementation details that are complex or add large dependencies | |||
std::unique_ptr<symtab_impl> impl; |
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.
const std::unique_ptr...
? The impl never changes.
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.
Since Symtab
isn't moveable, that is a good idea.
This allows us to more easily modify the parallelism around the big tables (e.g.,
indexed_modules
) without bumping the ABI around, meaning we don't have to wait until a major release to make those changes. This also removes internal details likeconcurrent.h
which puts TBB into the pubic API and the multiple Boost headers needed formulti_index
.Although
ModRangeLookup* mod_lookup();
was a public member, it was never documented, and should never be called by a user. I'm not considering this an API-breaking change.