-
Notifications
You must be signed in to change notification settings - Fork 185
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
trace fsslower: Add support for statfs #2234
Conversation
b275699
to
8c296da
Compare
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.
looks ok to me
struct data_key { | ||
__u32 tid; | ||
enum fs_file_op op; | ||
}; | ||
|
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.
why are you making op
part of the key? do you expect probes to be interleaved for a thread?
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.
From my test, it does not work using only tid
as it would conflict between open
and statfs
.
can you add that information as a comment or in the commit message (saying
that statfs entry can occur from within an open call)
…On Fri, Nov 17, 2023, 16:49 eiffel-fl ***@***.***> wrote:
***@***.**** commented on this pull request.
------------------------------
In pkg/gadgets/trace/fsslower/tracer/bpf/fsslower.bpf.c
<#2234 (comment)>
:
> +struct data_key {
+ __u32 tid;
+ enum fs_file_op op;
+};
+
From my test, it does not work using only tid as it would conflict
between open and statfs.
—
Reply to this email directly, view it on GitHub
<#2234 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABXINVWSKEHVZOW2RCJDHQ3YE6BPXAVCNFSM6AAAAAA7OPA5RSVHI2DSMVQWIX3LMV43YUDVNRWFEZLROVSXG5CSMV3GSZLXHMYTOMZXGMZDKNJWGU>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
8c296da
to
acb41e7
Compare
I rather added a comment in the |
acb41e7
to
2a88b4c
Compare
2a88b4c
to
eb3ab25
Compare
Signed-off-by: Francis Laniel <flaniel@linux.microsoft.com>
Signed-off-by: Francis Laniel <flaniel@linux.microsoft.com>
eb3ab25
to
e5da2eb
Compare
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.
It looks good to me from code reading.
It would be good to have an image-based gadget for this.
* We need to take into account the operation to avoid losing some of | ||
* them. | ||
* Indeed, it is possible to enter statfs syscall while already being in | ||
* an open one. |
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.
I am curious if you have more details why open() would call statfs().
Thank you for the reviews! |
This is sadly not possible with the current state of image-based gadget as we need code to do the abstraction between the given function and the actual tracepoint. |
Hi.
This PR adds support to trace
statfs
syscalls:Best regards.