-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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 tracepoints definitions for Linux 6.10 #16515
Conversation
__string field definition includes the source variable for a value of the string when the TP hits; in 6.10+ kernels, __assign_str() uses that to copy a value from src to the string, with older kernels, __assign_str still accepted src as a second parameter. Signed-off-by: Pavel Snajdr <[email protected]>
I have a related question to these particular tracepoint definitions - are they even necessary at all? The kernel supports dynamic tracing, a function can be traced at its offset dynamically, with no preexisting static definitions. Personally, I've never used the predefined probes, I'm always using the dynamic probes on function entry/exit, which require no code to support them from the ZFS side. Are there any users of the static tracepoints at all? Does it still make sense to carry the definitions around? I have no idea honestly. |
@snajpa I don't know who uses them either... |
@robn planned to remove DECLARE_EVENT_CLASS, but @behlendorf decided not to remove DECLARE_EVENT_CLASS. If compilation for kernel linux-rt worked in <=zfs-2.2.6 as it does in zfs-master, no one would notice this error. |
That's a good point. We've been carrying this code debugging functionality around for a while, and from what I can tell it's lightly used at best. Let's go ahead and merge this compatibility fix to resolve the immediate build issue. Then we can revisit removing it entirely if the consensus is nobody will miss this functionality. |
Can this get backported onto 2.2.x please? |
__string field definition includes the source variable for a value of the string when the TP hits; in 6.10+ kernels, __assign_str() uses that to copy a value from src to the string, with older kernels, __assign_str still accepted src as a second parameter. Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Pavel Snajdr <[email protected]> Co-authored-by: Tony Hutter <[email protected]> Closes openzfs#16475 Closes openzfs#16515
__string field definition includes the source variable for a value of the string when the TP hits; in 6.10+ kernels, __assign_str() uses that to copy a value from src to the string, with older kernels, __assign_str still accepted src as a second parameter. Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Pavel Snajdr <[email protected]> Co-authored-by: Tony Hutter <[email protected]> Closes openzfs#16475 Closes openzfs#16515
Motivation and Context
Should fix #16475
Description
New kernels define
__assign_str()
with only 1 parameter, using the source specified when defining the string field of a tracepoint.There's one commit of a configure test from @tonyhutter made from this #16475 (comment) comment, it's without a sign-off, so that will probably need @tonyhutter's ack.
Not sure about the best placement (or name) for
__assign_str_impl
, I've put it intotypes.h
as that was included intrace_dbuf.h
so it was the simplest to put it in there and make sure it's included intrace_dbgmsg.h
too.How Has This Been Tested?
Changed META to make tracing available + tested on 6.10, 6.9, 6.8, 5.10, 4.19 kernels.
Types of changes
Checklist:
Signed-off-by
.