-
Notifications
You must be signed in to change notification settings - Fork 175
feat(userspace/libsinsp)!: remove sinsp::build_fdinfo()
#2311
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
feat(userspace/libsinsp)!: remove sinsp::build_fdinfo()
#2311
Conversation
/hold |
555aed6
to
b839a99
Compare
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #2311 +/- ##
=======================================
Coverage 77.16% 77.17%
=======================================
Files 224 224
Lines 30135 30149 +14
Branches 4605 4605
=======================================
+ Hits 23254 23267 +13
- Misses 6881 6882 +1
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Perf diff from master - unit tests
Heap diff from master - unit tests
Heap diff from master - scap file
Benchmarks diff from master
|
/unhold |
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.
Overall the changes look okay. I'd suggest relying more on the existing constructors in test code to avoid having to copy the arguments to threadinfo constructors all over the place.
Remove inspector's `sinsp::build_fdinfo()` exposed method and force the other components (i.e.: `sinsp_threadinfo`, `sinsp_thread_manager`, etc...) to use the fdinfo factory to create a new `sinsp_fdinfo` object. Moreover, remove the dependency of `sinsp_fdinfo_factory` from `sinsp_thread_manager`. Together, these changes reduces the number of dependencies of components that want to create a new fdinfo. This step is needed to get rid of the `sinsp` pointer in `fdtable`, `sinsp_thread_manager` and `sinsp_threadinfo`. Signed-off-by: Leonardo Di Giovanna <leonardodigiovanna1@gmail.com>
b839a99
to
582179c
Compare
LGTM label has been added. Git tree hash: fadb09b2809b61115e634fe35fcc8c2dcff1f2e5
|
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.
Copilot wasn't able to review any files in this pull request.
Files not reviewed (13)
- test/libsinsp_e2e/threadinfo.cpp: Language not supported
- userspace/libsinsp/fdtable.cpp: Language not supported
- userspace/libsinsp/fdtable.h: Language not supported
- userspace/libsinsp/sinsp.cpp: Language not supported
- userspace/libsinsp/sinsp.h: Language not supported
- userspace/libsinsp/sinsp_external_processor.h: Language not supported
- userspace/libsinsp/sinsp_fdinfo_factory.h: Language not supported
- userspace/libsinsp/state/table.h: Language not supported
- userspace/libsinsp/test/classes/sinsp_thread_manager.cpp: Language not supported
- userspace/libsinsp/test/classes/sinsp_threadinfo.cpp: Language not supported
- userspace/libsinsp/test/classes/thread_group_info.cpp: Language not supported
- userspace/libsinsp/threadinfo.cpp: Language not supported
- userspace/libsinsp/threadinfo.h: Language not supported
/approve |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: ekoops, FedeDP The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
/milestone 0.21.0 |
What type of PR is this?
/kind feature
Any specific area of the project related to this PR?
/area libsinsp
Does this PR require a change in the driver versions?
What this PR does / why we need it:
This PR removes inspector's
sinsp::build_fdinfo()
exposed method and forces the other components (i.e.:sinsp_threadinfo
,sinsp_thread_manager
, etc...) to use the fdinfo factory to create a newsinsp_fdinfo
object.Moreover, it removes the dependency of
sinsp_fdinfo_factory
fromsinsp_thread_manager
.Together, these changes reduces the number of dependencies of components that want to create a new fdinfo. This step is needed to get rid of the
sinsp
pointer infdtable
,sinsp_thread_manager
andsinsp_threadinfo
.Which issue(s) this PR fixes:
Fixes #
Special notes for your reviewer:
Does this PR introduce a user-facing change?: