Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 4 Dec 2015 10:27:09 -0700
From:      Warner Losh <imp@bsdimp.com>
To:        dgilbert@interlog.com
Cc:        scsi@freebsd.org
Subject:   Re: Minor improvement in debugging
Message-ID:  <7AEAED43-1EC8-42C0-9AAD-BE31AEE258CA@bsdimp.com>
In-Reply-To: <5661CAC5.9080603@interlog.com>
References:  <DA1D0AF2-C967-47F7-8110-FA91B1E6281B@bsdimp.com> <5661CAC5.9080603@interlog.com>

next in thread | previous in thread | raw e-mail | index | archive | help

--Apple-Mail=_67E0377A-C2C0-4D03-90FB-1AE81E999176
Content-Transfer-Encoding: quoted-printable
Content-Type: text/plain;
	charset=utf-8


> On Dec 4, 2015, at 10:17 AM, Douglas Gilbert <dgilbert@interlog.com> =
wrote:
>=20
> On 15-12-04 12:03 PM, Warner Losh wrote:
>> While writing the NVMe CAM attachment, I noticed that the =
xpt_action()
>> routine=E2=80=99s logging would be a lot more useful if we logged the =
function
>> code. In addition, it is useful to log calls to the SIM inside of
>> xpt_action_default(). Some sims have debugs, others don=E2=80=99t.
>>=20
>> This review fixes that. https://reviews.freebsd.org/D4382
>=20
> Hi,
> Had a quick look at your patch. If you are naming the containing
> function in a printf style call then you could do this:
>    printf("%s: <some debug info here>\n", __func__ );
>=20
> That is a little less reabable but more robust, for example if someone
> later renames the containing function.
>=20
> This assumes compliance with C99 (when __func__ was introduced) or =
later.

The CAM debug doesn=E2=80=99t do that anywhere, so I=E2=80=99m not going =
to introduce it
piecemeal. But it is a great general suggestion.

Warner


--Apple-Mail=_67E0377A-C2C0-4D03-90FB-1AE81E999176
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment;
	filename=signature.asc
Content-Type: application/pgp-signature;
	name=signature.asc
Content-Description: Message signed with OpenPGP using GPGMail

-----BEGIN PGP SIGNATURE-----
Comment: GPGTools - https://gpgtools.org

iQIcBAEBCgAGBQJWYczuAAoJEGwc0Sh9sBEAwAEP/03pM01AiCQRpH/Jnyxyk3rA
DCjBNkJ6wnanPVsfU+efdgcUx+qkOrr4UhIrHr0FuTiQZObq6VRI3TMJhP3uLJlM
YptN+cqCiDY1YaXgp6KOy3YXNJR2Lpg36TLsUyTtt1YZzP0BjOCFXX0h/OACUhPM
VKuQ7UzDBx9SAqAruFCZj1b2oth+RpEu2jodCXZLsjobV5o3eDJDcvXuYMT2MKiJ
Lh7VuZAW7b3GHeJDUsHAg8MpfPbFkQjXO3xL4W6iDVEnuK/62YBGU+XH2aumhmjd
c/NygNVcC80rzf+W4p1mSNNBSB4l1aTEIArFKu9VXEkJe5YktYb/ORZj80ZVOYvt
G1Hu60uidka3UdibcEkgdjjMjckuVsIkJO1/GjG8G2qMAbOS0ZODiLFZAGo+VxQ/
5aGzYdr8WJMxCtprNUb31NcRArkYVENf0c1k3w9AWaoK/fG/h39if4aoA5/dBLio
NuvlXEasg2mMeD31xk6fN2zP2QRFfipn7abFRnjgkrajUziz/fHXNIEDthI/8MDo
f7RaX8fABmUmXrdNl3W0wYs1PSzrjjquchFuJstQZIcUGzfTFwcJY3p5Wkuomk2h
mH0fRKs5UIa9ZNljdxVnfYKqMC1xDwrGUyKPhrSHhquLhXi4PF+YtvHH1n+nfkMF
FNAwW5IclWlt56C0uN/5
=er4T
-----END PGP SIGNATURE-----

--Apple-Mail=_67E0377A-C2C0-4D03-90FB-1AE81E999176--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?7AEAED43-1EC8-42C0-9AAD-BE31AEE258CA>