[lkml]   [2000]   [Mar]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
    SubjectRe: [bugfix] SMP, shm-2.3.52-A0
    On Sat, Mar 18, 2000 at 02:32:55AM +0100, Ingo Molnar wrote:

    > On Sat, 18 Mar 2000, Manfred Spraul wrote:
    > > Will BUG() remain enabled in 2.4? I always assumed that BUG() is the
    > > replacement for "*(int*)0=0", and that it remains enabled in 2.4.
    > i believe so. We do want to manage BUG()s though, and cut down their
    > number once any of them becomes inactive. But a fair percentage of them
    > proved to be extremely useful through 2.3. This means that any assert
    > should live the life of a 'BUG()' line: get added with new code, and get
    > removed after some time.

    I've noticed that the __FILE__ string created by the occurences of BUG()
    and other debugging macros all over the place seem to create duplicate
    strings in the kernel image, but if I do a simple userspace test of
    printing __FILE__ twice, the compiler/linker combines the duplicate
    strings into one. Does anybody know what's going on here?

    [sroot@oof:/d/linux]# strings vmlinux | grep /d/linux/ | wc -l
    [sroot@oof:/d/linux]# strings vmlinux | grep /d/linux/ | sort -u | wc -l

    Also, there are a large number of occurences of the printk string from
    the BUG() macro:

    [sroot@oof:/d/linux]# strings vmlinux | grep 'kernel BUG' | wc -l

    Is there some option we're missing somewhere that collapses these
    duplicate strings together?

    I wrote a patch to change the BUG() macro to call an exported
    __print_bug() function so that the printk() string wasn't duplicated, but
    I can't figure out how to get the __FILE__ string collapsed easily.
    Also, as it seems to happen in userspace automatically, so perhaps there
    is a better way?


    [ Stormix Technologies Inc. ][ NetNation Communcations Inc. ]
    [ ][ ]
    [ Opinions expressed are not necessarily those of my employers. ]

    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to
    Please read the FAQ at

     \ /
      Last update: 2005-03-22 13:57    [W:0.019 / U:0.784 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site