public inbox for gentoo-dev@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-dev] Introduce global dmalloc USE flag?
@ 2013-06-13  1:35 Dennis Lan (dlan)
  2013-06-13  2:00 ` Kent Fredric
  2013-06-13  5:05 ` Michał Górny
  0 siblings, 2 replies; 9+ messages in thread
From: Dennis Lan (dlan) @ 2013-06-13  1:35 UTC (permalink / raw
  To: gentoo-dev

HI ALL:
   Is it ok to introduce USE=dmalloc global flag? description as following
"dmalloc - Enable debugging with the dmalloc library"

current consumers:
 1) net-fs/autofs
 2) net-misc/directvnc
 3) sci-biology/yass

also
 4) app-admin/conserver
 5) net-nds/ypbind
 6) net-fs/samba
 7) net-analyzer/scli
 8) net-analyzer/traceproto
 6) net-misc/siproxd

use dmalloc but controlled under USE=debug

Dennis Lan


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [gentoo-dev] Introduce global dmalloc USE flag?
  2013-06-13  1:35 [gentoo-dev] Introduce global dmalloc USE flag? Dennis Lan (dlan)
@ 2013-06-13  2:00 ` Kent Fredric
  2013-06-13  5:05 ` Michał Górny
  1 sibling, 0 replies; 9+ messages in thread
From: Kent Fredric @ 2013-06-13  2:00 UTC (permalink / raw
  To: gentoo-dev

[-- Attachment #1: Type: text/plain, Size: 1433 bytes --]

On 13 June 2013 13:35, Dennis Lan (dlan) <dennis.yxun@gmail.com> wrote:

> HI ALL:
>    Is it ok to introduce USE=dmalloc global flag? description as following
> "dmalloc - Enable debugging with the dmalloc library"
>
> current consumers:
>  1) net-fs/autofs
>  2) net-misc/directvnc
>  3) sci-biology/yass
>
> also
>  4) app-admin/conserver
>  5) net-nds/ypbind
>  6) net-fs/samba
>  7) net-analyzer/scli
>  8) net-analyzer/traceproto
>  6) net-misc/siproxd
>
> use dmalloc but controlled under USE=debug
>
> Dennis Lan
>
>
Questions for clarity:

1. I haven't used dmalloc before, what does this use flag do for me?
2. How does this use flag change the built binaries? does it:
   a) make no user visible changes, but adds code instrumentation paths
which can only be seen/understood with a special visualiser
   b) add output to TTY for the built binary? etc.

I'm not arguing against global USE for it, I'm just asking for a USE
description that is more meaningful.

ie, alternatives might be: "Add runtime debug output via the dmalloc
library" or "Add runtime instrumentation for the dmalloc debugger", or
something like that.

Because if it were case a), then I might be inclined to turn it on
arbitrarily ( depending on how much it impacts performance ), just in case
I happen to need it one day.  But if it were case b), I'd be inclined not
to turn it on arbitrarily, because I can see that would be irritating =)


-- 
Kent

[-- Attachment #2: Type: text/html, Size: 1936 bytes --]

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [gentoo-dev] Introduce global dmalloc USE flag?
  2013-06-13  1:35 [gentoo-dev] Introduce global dmalloc USE flag? Dennis Lan (dlan)
  2013-06-13  2:00 ` Kent Fredric
@ 2013-06-13  5:05 ` Michał Górny
  2013-06-20 18:34   ` Ian Stakenvicius
  1 sibling, 1 reply; 9+ messages in thread
From: Michał Górny @ 2013-06-13  5:05 UTC (permalink / raw
  To: gentoo-dev; +Cc: dennis.yxun

[-- Attachment #1: Type: text/plain, Size: 485 bytes --]

Dnia 2013-06-13, o godz. 09:35:54
"Dennis Lan (dlan)" <dennis.yxun@gmail.com> napisał(a):

> also
>  4) app-admin/conserver
>  5) net-nds/ypbind
>  6) net-fs/samba
>  7) net-analyzer/scli
>  8) net-analyzer/traceproto
>  6) net-misc/siproxd
> 
> use dmalloc but controlled under USE=debug

Do those use USE=debug solely for dmalloc or does it imply other stuff?
Therefore: will it be possible to use USE=dmalloc in those packages?

-- 
Best regards,
Michał Górny

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 966 bytes --]

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [gentoo-dev] Introduce global dmalloc USE flag?
  2013-06-13  5:05 ` Michał Górny
@ 2013-06-20 18:34   ` Ian Stakenvicius
  2013-06-22  7:48     ` Dennis Lan (dlan)
  0 siblings, 1 reply; 9+ messages in thread
From: Ian Stakenvicius @ 2013-06-20 18:34 UTC (permalink / raw
  To: gentoo-dev

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

On 13/06/13 01:05 AM, Michał Górny wrote:
> Dnia 2013-06-13, o godz. 09:35:54 "Dennis Lan (dlan)"
> <dennis.yxun@gmail.com> napisał(a):
> 
>> also 4) app-admin/conserver 5) net-nds/ypbind 6) net-fs/samba 7)
>> net-analyzer/scli 8) net-analyzer/traceproto 6) net-misc/siproxd
>> 
>> use dmalloc but controlled under USE=debug
> 
> Do those use USE=debug solely for dmalloc or does it imply other
> stuff? Therefore: will it be possible to use USE=dmalloc in those
> packages?
> 

and to follow up, if we assume that USE="debug" does more than just
build the package against the dmalloc lib (which is likely), is there
any particular benefit to USE="debug -dmalloc" ?  Or USE="dmalloc
- -debug" ?


-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.19 (GNU/Linux)

iF4EAREIAAYFAlHDSyEACgkQ2ugaI38ACPAHUwEAqFFDyarLSE8I/k8eKBUibmxu
qZT2pnaaMj3nPEqrFxYBAIsIP8HAHR5mIaLBHKPiR6/oI/cxcu3h1XFodpbERO4t
=T2KX
-----END PGP SIGNATURE-----


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [gentoo-dev] Introduce global dmalloc USE flag?
  2013-06-20 18:34   ` Ian Stakenvicius
@ 2013-06-22  7:48     ` Dennis Lan (dlan)
  2013-06-24  8:54       ` Gilles Dartiguelongue
  0 siblings, 1 reply; 9+ messages in thread
From: Dennis Lan (dlan) @ 2013-06-22  7:48 UTC (permalink / raw
  To: gentoo-dev

On Fri, Jun 21, 2013 at 2:34 AM, Ian Stakenvicius <axs@gentoo.org> wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA256
>
> On 13/06/13 01:05 AM, Michał Górny wrote:
>> Dnia 2013-06-13, o godz. 09:35:54 "Dennis Lan (dlan)"
>> <dennis.yxun@gmail.com> napisał(a):
>>
>>> also 4) app-admin/conserver 5) net-nds/ypbind 6) net-fs/samba 7)
>>> net-analyzer/scli 8) net-analyzer/traceproto 6) net-misc/siproxd
>>>
>>> use dmalloc but controlled under USE=debug
>>
>> Do those use USE=debug solely for dmalloc or does it imply other
>> stuff? Therefore: will it be possible to use USE=dmalloc in those
>> packages?

HI mgorny, as I look into those ebuilds
all of them use the USE=debug flag for dmalloc only, not for other
debugging control
so, as your second question, of course it's possible to switch to USE=dmalloc

>>
>
> and to follow up, if we assume that USE="debug" does more than just
> build the package against the dmalloc lib (which is likely), is there

Yes, if this case exist.. then the separation would be good


> any particular benefit to USE="debug -dmalloc" ?  Or USE="dmalloc
> - -debug" ?
>

I'm not sure, probably the befefits would be that we can have more
accurate/explicit control,
USE="dmalloc" is for debugging memory usage stuff (allocation, free,
fence-post overwritten control)
and USE=debug for other stuff?

This is a slightly improvement, but I'm also totally fine to keep
current state as it is.. no big deal

>
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v2.0.19 (GNU/Linux)
>
> iF4EAREIAAYFAlHDSyEACgkQ2ugaI38ACPAHUwEAqFFDyarLSE8I/k8eKBUibmxu
> qZT2pnaaMj3nPEqrFxYBAIsIP8HAHR5mIaLBHKPiR6/oI/cxcu3h1XFodpbERO4t
> =T2KX
> -----END PGP SIGNATURE-----
>


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [gentoo-dev] Introduce global dmalloc USE flag?
  2013-06-22  7:48     ` Dennis Lan (dlan)
@ 2013-06-24  8:54       ` Gilles Dartiguelongue
  2013-06-24  9:05         ` Samuli Suominen
  0 siblings, 1 reply; 9+ messages in thread
From: Gilles Dartiguelongue @ 2013-06-24  8:54 UTC (permalink / raw
  To: gentoo-dev

Le samedi 22 juin 2013 à 15:48 +0800, Dennis Lan (dlan) a écrit :
> On Fri, Jun 21, 2013 at 2:34 AM, Ian Stakenvicius <axs@gentoo.org> wrote:
> > -----BEGIN PGP SIGNED MESSAGE-----
> > Hash: SHA256
> >
> > On 13/06/13 01:05 AM, Michał Górny wrote:
> >> Dnia 2013-06-13, o godz. 09:35:54 "Dennis Lan (dlan)"
> >> <dennis.yxun@gmail.com> napisał(a):
> >>
> >>> also 4) app-admin/conserver 5) net-nds/ypbind 6) net-fs/samba 7)
> >>> net-analyzer/scli 8) net-analyzer/traceproto 6) net-misc/siproxd
> >>>
> >>> use dmalloc but controlled under USE=debug
> >>
> >> Do those use USE=debug solely for dmalloc or does it imply other
> >> stuff? Therefore: will it be possible to use USE=dmalloc in those
> >> packages?
> 
> HI mgorny, as I look into those ebuilds
> all of them use the USE=debug flag for dmalloc only, not for other
> debugging control
> so, as your second question, of course it's possible to switch to USE=dmalloc
> 
> >>
> >
> > and to follow up, if we assume that USE="debug" does more than just
> > build the package against the dmalloc lib (which is likely), is there
> 
> Yes, if this case exist.. then the separation would be good
> 
> 
> > any particular benefit to USE="debug -dmalloc" ?  Or USE="dmalloc
> > - -debug" ?
> >
> 
> I'm not sure, probably the befefits would be that we can have more
> accurate/explicit control,
> USE="dmalloc" is for debugging memory usage stuff (allocation, free,
> fence-post overwritten control)
> and USE=debug for other stuff?
> 
> This is a slightly improvement, but I'm also totally fine to keep
> current state as it is.. no big deal

Reading this thread, looks to me like these dmalloc USE should be moved
to debug, unless it has no runtime impact on usual speed, etc.

-- 
Gilles Dartiguelongue <eva@gentoo.org>
Gentoo



^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [gentoo-dev] Introduce global dmalloc USE flag?
  2013-06-24  8:54       ` Gilles Dartiguelongue
@ 2013-06-24  9:05         ` Samuli Suominen
  2013-06-24 10:37           ` Gilles Dartiguelongue
  0 siblings, 1 reply; 9+ messages in thread
From: Samuli Suominen @ 2013-06-24  9:05 UTC (permalink / raw
  To: gentoo-dev

On 24/06/13 11:54, Gilles Dartiguelongue wrote:
> Le samedi 22 juin 2013 à 15:48 +0800, Dennis Lan (dlan) a écrit :
>> On Fri, Jun 21, 2013 at 2:34 AM, Ian Stakenvicius <axs@gentoo.org> wrote:
>>> -----BEGIN PGP SIGNED MESSAGE-----
>>> Hash: SHA256
>>>
>>> On 13/06/13 01:05 AM, Michał Górny wrote:
>>>> Dnia 2013-06-13, o godz. 09:35:54 "Dennis Lan (dlan)"
>>>> <dennis.yxun@gmail.com> napisał(a):
>>>>
>>>>> also 4) app-admin/conserver 5) net-nds/ypbind 6) net-fs/samba 7)
>>>>> net-analyzer/scli 8) net-analyzer/traceproto 6) net-misc/siproxd
>>>>>
>>>>> use dmalloc but controlled under USE=debug
>>>>
>>>> Do those use USE=debug solely for dmalloc or does it imply other
>>>> stuff? Therefore: will it be possible to use USE=dmalloc in those
>>>> packages?
>>
>> HI mgorny, as I look into those ebuilds
>> all of them use the USE=debug flag for dmalloc only, not for other
>> debugging control
>> so, as your second question, of course it's possible to switch to USE=dmalloc
>>
>>>>
>>>
>>> and to follow up, if we assume that USE="debug" does more than just
>>> build the package against the dmalloc lib (which is likely), is there
>>
>> Yes, if this case exist.. then the separation would be good
>>
>>
>>> any particular benefit to USE="debug -dmalloc" ?  Or USE="dmalloc
>>> - -debug" ?
>>>
>>
>> I'm not sure, probably the befefits would be that we can have more
>> accurate/explicit control,
>> USE="dmalloc" is for debugging memory usage stuff (allocation, free,
>> fence-post overwritten control)
>> and USE=debug for other stuff?
>>
>> This is a slightly improvement, but I'm also totally fine to keep
>> current state as it is.. no big deal
>
> Reading this thread, looks to me like these dmalloc USE should be moved
> to debug, unless it has no runtime impact on usual speed, etc.
>

It does. In most often cases building against dmalloc makes the 
application/library completely unusable, and building it against dmalloc 
is intended for the developer of the application.
Separated USE=dmalloc is the only sane way to approach it.


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [gentoo-dev] Introduce global dmalloc USE flag?
  2013-06-24  9:05         ` Samuli Suominen
@ 2013-06-24 10:37           ` Gilles Dartiguelongue
  2013-06-24 10:47             ` Diego Elio Pettenò
  0 siblings, 1 reply; 9+ messages in thread
From: Gilles Dartiguelongue @ 2013-06-24 10:37 UTC (permalink / raw
  To: gentoo-dev

Le lundi 24 juin 2013 à 12:05 +0300, Samuli Suominen a écrit :
> On 24/06/13 11:54, Gilles Dartiguelongue wrote:
> > Le samedi 22 juin 2013 à 15:48 +0800, Dennis Lan (dlan) a écrit :
> >> On Fri, Jun 21, 2013 at 2:34 AM, Ian Stakenvicius <axs@gentoo.org> wrote:
> >>> -----BEGIN PGP SIGNED MESSAGE-----
> >>> Hash: SHA256
> >>>
> >>> On 13/06/13 01:05 AM, Michał Górny wrote:
> >>>> Dnia 2013-06-13, o godz. 09:35:54 "Dennis Lan (dlan)"
> >>>> <dennis.yxun@gmail.com> napisał(a):
> >>>>
> >>>>> also 4) app-admin/conserver 5) net-nds/ypbind 6) net-fs/samba 7)
> >>>>> net-analyzer/scli 8) net-analyzer/traceproto 6) net-misc/siproxd
> >>>>>
> >>>>> use dmalloc but controlled under USE=debug
> >>>>
> >>>> Do those use USE=debug solely for dmalloc or does it imply other
> >>>> stuff? Therefore: will it be possible to use USE=dmalloc in those
> >>>> packages?
> >>
> >> HI mgorny, as I look into those ebuilds
> >> all of them use the USE=debug flag for dmalloc only, not for other
> >> debugging control
> >> so, as your second question, of course it's possible to switch to USE=dmalloc
> >>
> >>>>
> >>>
> >>> and to follow up, if we assume that USE="debug" does more than just
> >>> build the package against the dmalloc lib (which is likely), is there
> >>
> >> Yes, if this case exist.. then the separation would be good
> >>
> >>
> >>> any particular benefit to USE="debug -dmalloc" ?  Or USE="dmalloc
> >>> - -debug" ?
> >>>
> >>
> >> I'm not sure, probably the befefits would be that we can have more
> >> accurate/explicit control,
> >> USE="dmalloc" is for debugging memory usage stuff (allocation, free,
> >> fence-post overwritten control)
> >> and USE=debug for other stuff?
> >>
> >> This is a slightly improvement, but I'm also totally fine to keep
> >> current state as it is.. no big deal
> >
> > Reading this thread, looks to me like these dmalloc USE should be moved
> > to debug, unless it has no runtime impact on usual speed, etc.
> >
> 
> It does. In most often cases building against dmalloc makes the 
> application/library completely unusable, and building it against dmalloc 
> is intended for the developer of the application.
> Separated USE=dmalloc is the only sane way to approach it.

To be clear, the justification of USE=dmalloc being separated from
USE=debug is that it is so "intrusive" than anyone excepts a developer
would find it too cumbersome to attempt to debug a problem with the
application ?

If that is the case, maybe the USE flag description should mention that
so it is not enabled lightly.

-- 
Gilles Dartiguelongue <eva@gentoo.org>
Gentoo



^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [gentoo-dev] Introduce global dmalloc USE flag?
  2013-06-24 10:37           ` Gilles Dartiguelongue
@ 2013-06-24 10:47             ` Diego Elio Pettenò
  0 siblings, 0 replies; 9+ messages in thread
From: Diego Elio Pettenò @ 2013-06-24 10:47 UTC (permalink / raw
  To: gentoo-dev@lists.gentoo.org

[-- Attachment #1: Type: text/plain, Size: 694 bytes --]

On Mon, Jun 24, 2013 at 11:37 AM, Gilles Dartiguelongue <eva@gentoo.org>wrote:

> To be clear, the justification of USE=dmalloc being separated from
> USE=debug is that it is so "intrusive" than anyone excepts a developer
> would find it too cumbersome to attempt to debug a problem with the
> application ?
>

I think we already got a number of packages where that holds true. It was
one of the reasons why I did my best to make sure people understand that
debug symbols and nostrip should *not* be conflated with USE=debug.

If I'm not mistaken, app-editors/nano[debug] is hardly usable.

Diego Elio Pettenò — Flameeyes
flameeyes@flameeyes.eu — http://blog.flameeyes.eu/

[-- Attachment #2: Type: text/html, Size: 1251 bytes --]

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2013-06-24 10:47 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-06-13  1:35 [gentoo-dev] Introduce global dmalloc USE flag? Dennis Lan (dlan)
2013-06-13  2:00 ` Kent Fredric
2013-06-13  5:05 ` Michał Górny
2013-06-20 18:34   ` Ian Stakenvicius
2013-06-22  7:48     ` Dennis Lan (dlan)
2013-06-24  8:54       ` Gilles Dartiguelongue
2013-06-24  9:05         ` Samuli Suominen
2013-06-24 10:37           ` Gilles Dartiguelongue
2013-06-24 10:47             ` Diego Elio Pettenò

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox