[Openib-windows] Debug prints in free version
Fab Tillier
ftillier at silverstorm.com
Tue Aug 9 09:20:41 PDT 2005
First, everyone please go into Outlook, from the Tools menu select Options,
select the Mail Format tab, and choose Plain Text as the default format. HTML
is a lousy format to quote with, so people just give up and top-post.
Debug output is debug output - it is there to help the developer. In fact, WHQL
tests check for references to DbgPrint in release drivers, and any drivers with
such references will fail WHQL certification. Enabling debug output in a
release driver is not an option. Further, debug output is not easily displayed
by a user - they either need to setup a debugger or find third party tools to
snoop the debug output. We cannot expect customers to have the know-how to do
this.
This leaves us with a few options. First is to provide customers with the debug
binaries as Tzachi suggested, and then let the user setup the debugger. This has
the same drawbacks as using debug output, as it requires a certain level of
expertise from the user. Remember that users in Windows are not necessarily
(and in fact seldom) driver developers.
Second is to log events to the event log, allowing the user to control how much
gets logged with a registry key.
Lastly is to use the event tracing mechanisms provided by the OS. We should be
able to instrument the code and allow users to turn on the tracing, capture a
trace, and send it back to their vendor for analysis. Tracing would be off by
default, and controlled following the event tracing methods. Look at the
section "WPP Software Tracing" in the DDK documentation.
I think we should use event logging (to the system log) for major events, and
tracing support for more detailed logs. Microsoft claims that WPP tracing has a
negligible impact on runtime performance when disabled.
- Fab
-----Original Message-----
From: Tzachi Dar [mailto:tzachid at mellanox.co.il]
Sent: Tuesday, August 09, 2005 6:29 AM
To: Leonid Keller; Yossi Leybovich; Tillier, Fabian
Cc: 'openib-windows at openib.org'
Subject: RE: [Openib-windows] Debug prints in free version
I guess that we all agree that the debug level should be "unprintable by
default, but to give some way to turn them on at run time". What I'm suggesting
is that this way will be to copy the debug versions of this files. Do you fill
that there is a need to make this simpler (for example instead of asking the
user to copy files we might ask him to make a change in the registry or so).
About Fab suggestion to print into the event log. We have to choose carefully
what we print into the debug log (for example, errors on shutdown, might be
printed using debug prints, but not to the event log).
Thanks
Tzachi
-----Original Message-----
From: Leonid Keller
Sent: Tuesday, August 09, 2005 2:23 PM
To: Yossi Leybovich; Tzachi Dar; 'Fab Tillier'
Cc: 'openib-windows at openib.org'
Subject: RE: [Openib-windows] Debug prints in free version
i agree with Yossy.
To my mind, errors have to be printed in release version also.
A compromise is to make them unprintable by default, but to give some way to
turn them on at run time.
-----Original Message-----
From: Yossi Leybovich [mailto:sleybo at mellanox.co.il]
Sent: Monday, August 08, 2005 3:42 PM
To: Tzachi Dar; 'Fab Tillier'
Cc: 'openib-windows at openib.org'
Subject: RE: [Openib-windows] Debug prints in free version
CB
-----Original Message-----
From: Tzachi Dar
Sent: Monday, August 08, 2005 3:15 PM
To: Yossi Leybovich; Fab Tillier
Cc: openib-windows at openib.org
Subject: RE: [Openib-windows] Debug prints in free version
Printing (even only in the case of errors) will hurt performance for the
following reasons:
Today, these macros are being removed out at compile time. If they are there in
release, the check that is made if to print or not will still be executed.
[YL] not if you use them just in case of error (i.e if (status != IB_SUCCESS )
AL_TRACE(AL_DBG_ERROR......) and that the way most\all of the current code do
UI also think that this theway VAPI\Gen2 behave.
Having these functions in our code also means bigger foot print of our functions
and therefore another hit in performance (for example more cache misses).
[YL] That right but I think that if you check it, it want heart the performance
that much but you help the user a lot to define his mistakes or give us log to
debug our bugs
Please also note that your idea is not enough since the IPOIB code is using the
macro IPOIB_TRACE which should also be changed to exist in free also. (There is
a list of macros that should be changed).
[YL] AFAIK all Macros map to CL_PRINT so you just need to change in one place on
all the ULPs behave the same.
We might do a separate build that is free but still has the prints, but debug
messages should be omitted from the binaries that we give to our customers.
[YL] I still think that error massages should free version it want help the
customer if will force him to reinsatll another version of the driver.
Thanks
Tzachi
-----Original Message-----
From: Yossi Leybovich [mailto:sleybo at mellanox.co.il]
Sent: Monday, August 08, 2005 3:05 PM
To: Fab Tillier
Cc: openib-windows at openib.org
Subject: [Openib-windows] Debug prints in free version
Fab
I think it will make it easy to all of us if the stack will generate printf in
case of error.
In the current defines in order to debug any kernel level component you need to
replace the sys file to the debug version
It will be better if :
CL_PRINT in case of ERROR_DBG should use cl_msg_out so it will generate print
even in free version
It should not heart the data flow (we print just in case of error)
What do you think ?
Yossi
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openfabrics.org/pipermail/ofw/attachments/20050809/3d869d97/attachment.html>
More information about the ofw
mailing list