FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Redhat > Fedora Development

 
 
LinkBack Thread Tools
 
Old 07-15-2008, 10:24 PM
Bill Nottingham
 
Default handling a 'debug' or 'development' setting

In initscripts recently, we added code that would conditionally
enable two forms of malloc debugging. [1] While this build was
disabled shortly after it hit the build system (because it
broke the build system [2]), it raised a more general issue.

We should have a generic framework for running in a 'debug'
or 'development' mode that does extra debugging at the sake
of some minimal amount of performance.

For example, right now in the rawhide kernel we enable various
debug options, which are then disabled when we do final builds
for a release. Wouldn't it be better if these could be switched
on somehow at runtime based on configuration?

Simiarly, there may be debugging parameters already in /proc
or /sys that can be twiddled if we're willing to run in
a debug mode.

This leads to a few questions:

1) What can we reasonably set?

Right now, there's MALLOC_CHECK_ and MALLOC_PERTURB. There
should be more. Is there anything in the various desktops
that is appropriate?

2) How best to deploy this?

The current malloc checking is added in the initscripts package
as a profile.d script, enabled based on a file in /etc/sysconfig.
While it could be done similar to how the kernel's debug support
is done (rawhide builds set the config file to be enabled,
final builds do not), I'm wondering if there's a better way.

For example, do we have a 'fedora-debug' package that contains
all the relevant settings that can be set? Do we make this
required by a particular rawhide package, but not by the release
package?

Just looking for brainstorming ideas right now.

Bill

--
fedora-devel-list mailing list
fedora-devel-list@redhat.com
https://www.redhat.com/mailman/listinfo/fedora-devel-list
 
Old 07-16-2008, 01:02 AM
Peter Gordon
 
Default handling a 'debug' or 'development' setting

On Tue, 2008-07-15 at 18:24 -0400, Bill Nottingham wrote:
> 1) What can we reasonably set?
>
> Right now, there's MALLOC_CHECK_ and MALLOC_PERTURB. There
> should be more. Is there anything in the various desktops
> that is appropriate?

I would love it if, when this 'debug mode' is active, any package
installation would automagically install the relevant debuginfos to
accompany it. (Likewise, any package removal should remove the leaf
debuginfo.)
--
´╗┐Peter Gordon (codergeek42)
GnuPG Public Key ID: 0xFFC19479 / Fingerprint:
DD68 A414 56BD 6368 D957 9666 4268 CB7A FFC1 9479
--
fedora-devel-list mailing list
fedora-devel-list@redhat.com
https://www.redhat.com/mailman/listinfo/fedora-devel-list
 
Old 07-16-2008, 01:22 AM
Dave Jones
 
Default handling a 'debug' or 'development' setting

On Tue, Jul 15, 2008 at 06:24:27PM -0400, Bill Nottingham wrote:
> In initscripts recently, we added code that would conditionally
> enable two forms of malloc debugging. [1] While this build was
> disabled shortly after it hit the build system (because it
> broke the build system [2]), it raised a more general issue.
>
> We should have a generic framework for running in a 'debug'
> or 'development' mode that does extra debugging at the sake
> of some minimal amount of performance.
>
> For example, right now in the rawhide kernel we enable various
> debug options, which are then disabled when we do final builds
> for a release. Wouldn't it be better if these could be switched
> on somehow at runtime based on configuration?

For the kernel options, the problem is that most of the costly ones
aren't runtime switchable, and can't be made to do so.
Their cost comes from the growth of various data structures, so
we need to copy more data around etc. (as an example, page structs
almost double in size with lockdep enabled on 32bit).

Even if we took all the options which /are/ runtime switchable,
put them under your config management proposal, and then turned
them off, the cost of the stuff that's still enabled is pretty
dramatic. (Especially things like PAGEALLOC_DEBUG)

I don't really have much of an opinion on whether one way is better
than the other, but I want people to realise that turning off
the knobs that are turnable isn't going to be the silver bullet
to performance.

Dave

--
http://www.codemonkey.org.uk

--
fedora-devel-list mailing list
fedora-devel-list@redhat.com
https://www.redhat.com/mailman/listinfo/fedora-devel-list
 
Old 07-16-2008, 03:15 AM
Matthias Clasen
 
Default handling a 'debug' or 'development' setting

On Tue, 2008-07-15 at 18:24 -0400, Bill Nottingham wrote:

>
> Right now, there's MALLOC_CHECK_ and MALLOC_PERTURB. There
> should be more. Is there anything in the various desktops
> that is appropriate?
>

In Glib, there is G_SLICE=debug-blocks which performs extra sanity
checks in the gslice allocator.

--
fedora-devel-list mailing list
fedora-devel-list@redhat.com
https://www.redhat.com/mailman/listinfo/fedora-devel-list
 
Old 07-16-2008, 06:36 PM
Dave Jones
 
Default handling a 'debug' or 'development' setting

On Tue, Jul 15, 2008 at 06:02:50PM -0700, Peter Gordon wrote:
> On Tue, 2008-07-15 at 18:24 -0400, Bill Nottingham wrote:
> > 1) What can we reasonably set?
> >
> > Right now, there's MALLOC_CHECK_ and MALLOC_PERTURB. There
> > should be more. Is there anything in the various desktops
> > that is appropriate?
>
> I would love it if, when this 'debug mode' is active, any package
> installation would automagically install the relevant debuginfos to
> accompany it. (Likewise, any package removal should remove the leaf
> debuginfo.)

If that happens it should definitly be optional given the size of
debuginfo packages. I can't think of a single situation where I'd
need the debuginfo for every package installed. Installing them
on demand before running gdb is painful, but a lot less so than
sitting around twiddling thumbs waiting for yum to update several
gig of debuginfos.

Dave

--
http://www.codemonkey.org.uk

--
fedora-devel-list mailing list
fedora-devel-list@redhat.com
https://www.redhat.com/mailman/listinfo/fedora-devel-list
 
Old 07-17-2008, 08:08 AM
Karel Zak
 
Default handling a 'debug' or 'development' setting

On Tue, Jul 15, 2008 at 06:24:27PM -0400, Bill Nottingham wrote:
> We should have a generic framework for running in a 'debug'
> or 'development' mode that does extra debugging at the sake
> of some minimal amount of performance.

I guess there are many packages where you can enable extra checks
(mem checks, assert code, ...) -- for example PostgreSQL, glib, ...

It would be nice to have a generic way to enable/disable this stuff
in spec files.

%configure
--enable-foo
%if %{develmode}
--enable-asserts
%endif
--enable-bar


Karel

--
Karel Zak <kzak@redhat.com>

--
fedora-devel-list mailing list
fedora-devel-list@redhat.com
https://www.redhat.com/mailman/listinfo/fedora-devel-list
 

Thread Tools




All times are GMT. The time now is 04:03 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright ę2007 - 2008, www.linux-archive.org