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

Fix ksymbols mem consumption #4092

Closed

Conversation

yanivagman
Copy link
Collaborator

1. Explain what the PR does

ksymbols: reintroduce lazy symbol queries

Add new required symbol and addresses lists to the KSymbolTable helper.
When either list is given, the data structure will only save required
symbols during scanning. This should reduce memory usage for users
who can mostly guarentee that symbols are known ahead of time.

Dynamic querying is still allowed in this mode, though it will incur
a penalty as rescanning is required.

feat(ksymbols): restore lazy ksyms implementtion

Use modified ksymbols implementation. The new implementation may take
a list of required symbols and addresses to track. If the list is given,
symbol scanning will only save those symbols or addresses which were
given in the list. If a new symbol is queried, then a rescan is needed.

Refactor tracee initialization to find all necessary symbols to track
ahead of runtime.

2. Explain how to test it

3. Other comments

Add new required symbol and addresses lists to the KSymbolTable helper.
When either list is given, the data structure will only save required
symbols during scanning. This should reduce memory usage for users
who can mostly guarentee that symbols are known ahead of time.

Dynamic querying is still allowed in this mode, though it will incur
a penalty as rescanning is required.
Use modified ksymbols implementation. The new implementation may take
a list of required symbols and addresses to track. If the list is given,
symbol scanning will only save those symbols or addresses which were
given in the list. If a new symbol is queried, then a rescan is needed.

Refactor tracee initialization to find all necessary symbols to track
ahead of runtime.
@geyslan
Copy link
Member

geyslan commented May 31, 2024

Thank Yaniv. The last one is #4093. I'm closing this.

@geyslan geyslan closed this May 31, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants