Page MenuHomeFreeBSD

Initial support for a statically defined tracepoint for SIFTR.
ClosedPublic

Authored by gnn on Apr 28 2015, 4:17 PM.
Tags
None
Referenced Files
F106676324: D2387.diff
Fri, Jan 3, 6:11 PM
Unknown Object (File)
Sat, Dec 28, 2:16 AM
Unknown Object (File)
Tue, Dec 10, 10:38 AM
Unknown Object (File)
Tue, Dec 10, 1:21 AM
Unknown Object (File)
Mon, Dec 9, 2:48 AM
Unknown Object (File)
Wed, Dec 4, 8:39 PM
Unknown Object (File)
Wed, Dec 4, 8:36 PM
Unknown Object (File)
Nov 22 2024, 5:05 AM
Subscribers

Details

Summary

Create the necessary macros extract SIFTR data when the kenrel module is loaded and enabled. Add proper translators to the relevant D module.
Brief demo script showing the various values that can be read via the new SIFTR statically defined tracepoint (SDT).

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Passed
Unit
No Test Coverage

Event Timeline

gnn retitled this revision from to Initial support for a statically defined tracepoint for SIFTR. Create the necessary macros extract SIFTR data when the kenrel module is loaded and enabled. Add proper translators to the relevant D module. Brief demo script showing the various....
gnn updated this object.
gnn edited the test plan for this revision. (Show Details)
gnn retitled this revision from Initial support for a statically defined tracepoint for SIFTR. Create the necessary macros extract SIFTR data when the kenrel module is loaded and enabled. Add proper translators to the relevant D module. Brief demo script showing the various... to Initial support for a statically defined tracepoint for SIFTR..Apr 28 2015, 4:19 PM
gnn updated this object.
gnn added reviewers: lstewart, markj, rwatson, bz.

It might make more sense to define a siftr provider rather than adding a single siftr probe to the tcp provider, especially if more siftr probes might be added later.

If you keep this probe under the tcp provider, could you also document it in dtrace-tcp.4?

cddl/lib/libdtrace/tcp.d
248

The version bindings reflect the DTrace version at the time the definition was added. The current version is 1.12.1.

259

Extra newline.

261

Should this be struct siftrinfo?

289

Stray space in "siftrinfo_t ;".

sys/netinet/in_kdtrace.c
116

This was sorted by probe name.

sys/netinet/in_kdtrace.h
56

This list is sorted by probe name.

sys/netinet/siftr.c
95

sys/sdt.h can be grouped with the other sys/ includes above, and in_kdtrace.h can be included using the standard include path, so #include <netinet/in_kdtrace.h> should work.

Quick comment. It only makes sense to do this in one place in siftr, so, indeed, a provider is unnecessary. I'll address the inlines in a moment

gnn marked 6 inline comments as done.Apr 28 2015, 5:42 PM
gnn edited edge metadata.
  • Cleanup based on comments from markj@
bz requested changes to this revision.Apr 29 2015, 10:49 AM
bz edited edge metadata.

I'll see about the diff2 in a minute; sorry that PB doesn't allow me to see the combined current version to only give you one feedback.

cddl/lib/libdtrace/tcp.d
246

Comments end in a dot.

share/dtrace/siftr
3

Usually we try to /*- in the first line before the Copyright to help automated tools.

30

dot at end of sentence.

38

I keep wondering if you want to add the word "port" to this printout?

38

Port numbers, like most of the values following are unsigned but not printed as such. Also size does matter (for ulong/uint64).

43

Extra space at the end?

53

Print flags in hex with leading 0?

66

Not sure what these are but they smell like hex to me as well? Might be worth checking and considering.

This revision now requires changes to proceed.Apr 29 2015, 10:49 AM

There you go.

sys/netinet/siftr.c
83

Is there a reason it still is after units.h and not alphabetical?

95

Dito, does this have to come last?

gnn marked 5 inline comments as done.Apr 29 2015, 4:39 PM
gnn added inline comments.
share/dtrace/siftr
38

"The D compiler performs this processing for your printf calls automatically, so size prefixes are not required. Although size prefixes are provided for C compatibility, their use is explicitly discouraged in D programs because they bind your code to a particular data model when using derived types."

38

I'd rather not, this is already wordy and is only to serve as an example not as the actual log replacement.

66

For now I'll leave them as is but they can be updated later as we choose.

gnn edited edge metadata.
  • Suggestions from bz
bz edited edge metadata.

If it still compiles and works, ship it!

This revision is now accepted and ready to land.Apr 29 2015, 5:01 PM
This revision was automatically updated to reflect the committed changes.