-
Notifications
You must be signed in to change notification settings - Fork 168
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(libsinsp): make proc.p* (proc.pname...) behave like proc.a*[1] (proc.aname...) #2230
Conversation
Signed-off-by: Luca Guerra <[email protected]>
Signed-off-by: Luca Guerra <[email protected]>
Signed-off-by: Luca Guerra <[email protected]>
Signed-off-by: Luca Guerra <[email protected]>
a102048
to
41de136
Compare
Perf diff from master - unit tests
Heap diff from master - unit tests
Heap diff from master - scap file
Benchmarks diff from master
|
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #2230 +/- ##
==========================================
- Coverage 75.10% 75.09% -0.02%
==========================================
Files 274 274
Lines 34302 34290 -12
Branches 5933 5925 -8
==========================================
- Hits 25763 25749 -14
- Misses 8539 8541 +2
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
/milestone 0.20.0 |
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, left a question.
|
||
\return Pointer to the threadinfo or NULL if it doesn't exist | ||
*/ | ||
sinsp_threadinfo* get_ancestor_process(uint32_t n = 1); |
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.
Really like the new API!
Signed-off-by: Lorenzo Susini <[email protected]>
… is thread Signed-off-by: Lorenzo Susini <[email protected]>
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.
/approve
LGTM label has been added. Git tree hash: 031a6c77565c6bd85bd73ccd1ddbff43d51044dc
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: FedeDP, LucaGuerra 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 |
What type of PR is this?
/kind bug
Any specific area of the project related to this PR?
/area libsinsp
Does this PR require a change in the driver versions?
No
What this PR does / why we need it:
I have worked with @loresuso on this. He noticed that when a process calls a vforks from a previously created thread (not the main thread) we see that:
proc.ppid
returns the parent thread id. This is not expected, ppid is defined as "The pid of the parent of the process generating the event."proc.apid[1]
correctly returns the parent process pidThis PR makes them behave the same.
There is also some extra cleanup of a commented function part.
Which issue(s) this PR fixes:
Fixes #
Special notes for your reviewer:
Does this PR introduce a user-facing change?: