Page MenuHomeFreeBSD

dtrace: Instrument more of the CAM device lifecycle
Needs RevisionPublic

Authored by imp on Tue, Jul 28, 9:48 PM.
Tags
None
Referenced Files
F164440439: D58523.diff
Sat, Aug 1, 12:39 AM
F164362038: D58523.diff
Fri, Jul 31, 4:40 AM
F164359796: D58523.diff
Fri, Jul 31, 4:10 AM
Unknown Object (File)
Wed, Jul 29, 9:33 AM
Unknown Object (File)
Wed, Jul 29, 5:49 AM
Unknown Object (File)
Wed, Jul 29, 5:47 AM
Unknown Object (File)
Tue, Jul 28, 11:16 PM
Unknown Object (File)
Tue, Jul 28, 10:33 PM
Subscribers

Details

Reviewers
gnn
dteske
Group Reviewers
cam
Summary

cam::periph:error, cam::{,a,n,sd}da:error
Trace the error evolution for I/O errors the periph encounters

cam::periph:recovery, cam::{,a,n,sd}da:recovery
Trace the result of the error sorting

cam::periph:invalidate
Trace device invalidations

cam::periph:hold-boot
cam::periph:release-boot
cam::xpt:hold-boot
cam::xpt:release-boot
Trace boot holds and releases at different levels

cam::xpt:bus-register
Trace new busses added

These additions allow fairly complete instruemntation of the discovery
process at boot through dtrace's anonymous tracing. It would be mildly
better to have the boot holds have the periph, but dtrace sbts have to
be static at compile time.

Sponsored by: Netflix

Test Plan

dtrace script to follow... I've only done scsi, but need to finish sata, nvme and sd/mmc.
It's what helped me find the other two fixes in this series.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Skipped
Unit
Tests Skipped
Build Status
Buildable 75257
Build 72140: arc lint + arc unit

Event Timeline

imp requested review of this revision.Tue, Jul 28, 9:48 PM
imp added a reviewer: dteske.
dteske requested changes to this revision.Tue, Jul 28, 11:26 PM

Careful ...

  1. in commit message title: s/Insturment/Instrument/
  2. in body of commit message: s/instruemntation/instrumentation/

Change needed:

  1. .Dd bump

If you feel up to it ...

  1. xpt_release_boot: finishconfig re-bumps buses_to_config with no matching hold-boot notification
  2. elective pre-existing typo changes in man-page
share/man/man4/dtrace_cam.4
5

Bump .Dd

12

While you're here, maybe you could address this pre-existing typo s/ccn/ccb/

14–30

While you're here, maybe tackle this pre-existing typo s/async_Arg/async_arg/

36

Another pre-existing typo we could electively handle while here (yes, xpt_action exists but not under cam provider only under fbt provider); in the cam provider there is no xpt_action, just xpt:action

sys/cam/cam_xpt.c
5122–5123

notify refcount went up here too

This revision now requires changes to proceed.Tue, Jul 28, 11:26 PM

Thanks for the the pre-existing typos too. Technically out of scope, but I'll fold them in.

sys/cam/cam_xpt.c
5122–5123

Nice catch.

imp retitled this revision from dtrace: Insturment more of the CAM device lifecycle to dtrace: Instrument more of the CAM device lifecycle.Wed, Jul 29, 3:31 AM
dteske requested changes to this revision.Wed, Jul 29, 5:51 AM
In D58523#1343156, @imp wrote:

devin's review

Thanks for addressing the items. Just one minor nit in the man-page:

.Fn cam::xpt::action

Should be:

.Fn cam::xpt:action

Confirmation:

dteske@FreeBSD src $ dwatch -l cam::xpt::action
PROVIDER:MODULE:FUNCTION:NAME
dtrace: invalid probe specifier cam::xpt::action: invalid probe description "cam::xpt::action": Overspecified probe description
dteske@FreeBSD src $ dwatch -l cam::xpt:action
PROVIDER:MODULE:FUNCTION:NAME
cam:kernel:xpt:action
This revision now requires changes to proceed.Wed, Jul 29, 5:51 AM

Also, make sure to fix the summary typo, as to make sure it doesn't end up in the commit message:

These additions allow fairly complete --> instruemntation <-- of the discovery

to

These additions allow fairly complete instrumentation of the discovery