2005-09-07 01:51:38

by Jeff Garzik

[permalink] [raw]
Subject: Re: [patch 1/1] ipw2100: remove by-hand function entry/exit debugging

[email protected] wrote:
> From: Pavel Machek <[email protected]>
>
> This removes debug prints from entry/exit of functions. Such level of
> debugging should probably be done by gdb or similar.
>
> Signed-off-by: Pavel Machek <[email protected]>
> Cc: Jeff Garzik <[email protected]>
> Cc: "James P. Ketrenos" <[email protected]>
> Signed-off-by: Andrew Morton <[email protected]>

NAK. Rationale: maintainer's choice. Pavel doesn't get to choose the
debugger of choice for the driver maintainer.

I do this entry/exit stuff in my net and SATA drivers; printk is my
primary method of debugging.

Jeff



2005-09-07 02:41:31

by David Miller

[permalink] [raw]
Subject: Re: [patch 1/1] ipw2100: remove by-hand function entry/exit debugging

From: Jeff Garzik <[email protected]>
Date: Tue, 06 Sep 2005 21:51:21 -0400

> NAK. Rationale: maintainer's choice. Pavel doesn't get to choose
> the debugger of choice for the driver maintainer.

If it makes the driver unreadable and thus harder to maintain,
I think such changes should seriously be considered.

Most of the DEBUG_INFO macro usage is fine, but those "enter"
and "exit" ones are just pure noise and should be removed.

2005-09-07 02:49:00

by Jeff Garzik

[permalink] [raw]
Subject: Re: [patch 1/1] ipw2100: remove by-hand function entry/exit debugging

David S. Miller wrote:
> From: Jeff Garzik <[email protected]>
> Date: Tue, 06 Sep 2005 21:51:21 -0400
>
>
>>NAK. Rationale: maintainer's choice. Pavel doesn't get to choose
>>the debugger of choice for the driver maintainer.
>
>
> If it makes the driver unreadable and thus harder to maintain,
> I think such changes should seriously be considered.
>
> Most of the DEBUG_INFO macro usage is fine, but those "enter"
> and "exit" ones are just pure noise and should be removed.

I find them useful in my own drivers; they are definitely not pure noise.

Jeff


2005-09-07 13:39:19

by Ingo Oeser

[permalink] [raw]
Subject: Re: [patch 1/1] ipw2100: remove by-hand function entry/exit debugging

Hi Jeff,

Jeff Garzik wrote:
> David S. Miller wrote:
> > From: Jeff Garzik <[email protected]>
> > Date: Tue, 06 Sep 2005 21:51:21 -0400
> >
> >>NAK. Rationale: maintainer's choice. Pavel doesn't get to choose
> >>the debugger of choice for the driver maintainer.
> >
> > If it makes the driver unreadable and thus harder to maintain,
> > I think such changes should seriously be considered.
> >
> > Most of the DEBUG_INFO macro usage is fine, but those "enter"
> > and "exit" ones are just pure noise and should be removed.
>
> I find them useful in my own drivers; they are definitely not pure noise.

gcc -finstrument-functions

can do that completely without adding noise to the sources.

been there, done that. With a gcc-patch you don't even need to
resolve symbols.


Regards

Ingo Oeser

2005-09-07 20:02:16

by David Miller

[permalink] [raw]
Subject: Re: [patch 1/1] ipw2100: remove by-hand function entry/exit debugging

From: Ingo Oeser <[email protected]>
Date: Wed, 7 Sep 2005 15:39:08 +0200

> Jeff Garzik wrote:
> > I find them useful in my own drivers; they are definitely not pure noise.
>
> gcc -finstrument-functions

I was going to mention this as well, and also the idea to
enable CONFIG_MCOUNT on a per-file basis.

We should never be doing by hand what can be automated.

2005-09-08 00:52:38

by Jeff Garzik

[permalink] [raw]
Subject: Re: [patch 1/1] ipw2100: remove by-hand function entry/exit debugging

David S. Miller wrote:
> From: Ingo Oeser <[email protected]>
> Date: Wed, 7 Sep 2005 15:39:08 +0200
>
>
>>Jeff Garzik wrote:
>>
>>>I find them useful in my own drivers; they are definitely not pure noise.
>>
>>gcc -finstrument-functions
>
>
> I was going to mention this as well, and also the idea to
> enable CONFIG_MCOUNT on a per-file basis.
>
> We should never be doing by hand what can be automated.


As long as nobody breaks the primary maintainer's primary method of
debugging, patches are welcome...

Jeff