Page MenuHomeFreeBSD

ktrace: Teach kernel to write v0 format
AbandonedPublic

Authored by dchagin on Jul 19 2022, 5:46 PM.
Tags
None
Referenced Files
Unknown Object (File)
Jan 14 2024, 10:18 AM
Unknown Object (File)
Dec 23 2023, 12:04 AM
Unknown Object (File)
Nov 4 2023, 6:17 PM
Unknown Object (File)
Oct 28 2023, 12:31 PM
Unknown Object (File)
Oct 3 2023, 6:15 PM
Unknown Object (File)
Sep 29 2023, 6:40 PM
Unknown Object (File)
Mar 5 2023, 5:49 PM
Unknown Object (File)
Feb 17 2023, 4:07 PM
Subscribers

Details

Reviewers
None
Summary

To preserve ABI stability force kernel to write v0 format if
ktrace p_osrel is old.

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 46480
Build 43369: arc lint + arc unit

Event Timeline

This does not make sense to me. You are basing the output format on the osrel of the binary that is being traced. So 1) it does not solve my issue when I have fresh HEAD and take the ktrace dump on it and move it to stable/13 2) if more than one process is traced, and their binaries have mixed osrel, you get the mix of the record types in the output

In D35851#814336, @kib wrote:

This does not make sense to me. You are basing the output format on the osrel of the binary that is being traced. So 1) it does not solve my issue when I have fresh HEAD and take the ktrace dump on it and move it to stable/13 2) if more than one process is traced, and their binaries have mixed osrel, you get the mix of the record types in the output

this is a quick hack to demonstrate a solution, I haven't even had time to test it, as the world is still builds. If this approach is ok for you, I will complete the fix, otherwise I will do as you suggested earlier

sys/kern/kern_ktrace.c
1223

it should be if (td->td_proc->p_osrel > P_OSREL_KTRACE_VERSIONED)

In D35851#814336, @kib wrote:

This does not make sense to me. You are basing the output format on the osrel of the binary that is being traced. So 1) it does not solve my issue when I have fresh HEAD and take the ktrace dump on it and move it to stable/13 2) if more than one process is traced, and their binaries have mixed osrel, you get the mix of the record types in the output

this is a quick hack to demonstrate a solution, I haven't even had time to test it, as the world is still builds. If this approach is ok for you, I will complete the fix, otherwise I will do as you suggested earlier

I do not think that my response above can be read as my agreement with the approach