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

Reduce elf.Open() calls #1001

Merged
merged 5 commits into from
Nov 24, 2022
Merged

Reduce elf.Open() calls #1001

merged 5 commits into from
Nov 24, 2022

Conversation

Sylfrena
Copy link
Contributor

@Sylfrena Sylfrena commented Nov 9, 2022

Performance Improvements

Before

CPU usage for elf.Open() = 39.73 % (13.63 + 13.42 + 12.68)

Screenshot from 2022-11-24 14-12-30

After

CPU usage for elf.Open() = 22.89 %

Screenshot from 2022-11-24 14-13-12

Fixes #964

pkg/buildid/buildid.go Outdated Show resolved Hide resolved
@Sylfrena Sylfrena force-pushed the reduce-elf-calls branch 4 times, most recently from 37021e7 to 22a4571 Compare November 21, 2022 12:59
@Sylfrena Sylfrena changed the title [WIP] Reduce elf.Open() calls Reduce elf.Open() calls Nov 21, 2022
pkg/buildid/buildid_test.go Outdated Show resolved Hide resolved
@Sylfrena Sylfrena marked this pull request as ready for review November 22, 2022 08:27
@Sylfrena Sylfrena requested a review from a team as a code owner November 22, 2022 08:27
pkg/objectfile/object_file_test.go Show resolved Hide resolved
pkg/objectfile/object_file.go Show resolved Hide resolved
pkg/buildid/buildid.go Show resolved Hide resolved
- pass elf file as a field to Objectfile struct type
- update tests accordingly
- unify path and elf file into an ElfFile struct type
- update references to and tests for BuildID() accordingly

Signed-off-by: Sumera Priyadarsini <sylphrenadin@gmail.com>
Copy link
Contributor

@javierhonduco javierhonduco left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great work Sumera!! Reducing these calls was a good thing to do here, and the CPU profile shows the impact of your changes! ✨

@kakkoyun kakkoyun merged commit 6f42dd7 into main Nov 24, 2022
@kakkoyun kakkoyun deleted the reduce-elf-calls branch November 24, 2022 10:29
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

Successfully merging this pull request may close these issues.

Reduce ELF Open calls
4 participants