[lkml]   [2012]   [Mar]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
    Subject[00/16] enable pr_debug during module initialization

    This is 4th revision of the dyndbg modinit patches, implementing the
    "fake" module param approach proposed by Thomas Renninger, back in

    stored queries for loadable modules on pending list


    changes since rev2:

    - rev2 Patches 1-17/25 sent Dec 11 were added to driver-core-next,
    subsequent revs rework 18-25, renumbered.

    - reworked onto linux-next, to include Pawel Moll's initcall-level
    params patch. Im not using this feature, but I didnt know that when
    I started.

    - dropped "protect dyndbg, BUILD_BUG_DECL", which caused compile err
    if module author added his own dyndbg param declaration, Rusty said:
    "if dev added it, he probably meant it"

    - dropped noisy pr_* in initcall_level stuff, per Rusty.

    changes since:
    - added comment, commit-msg explaining repeat use of parse-args.
    - deprecate "ddebug_query=" rather than remove it.
    - refactor 2 callbacks to use common helper.
    - more aggressive early_initcall, not core_initcall RFC
    - debugfs init via fs_initcall, not module_init RFC

    Core of patchset is 2 callbacks, called from parse_args:

    For builtin modules, dynamic_debug_init() calls parse_args(...,
    &ddebug_dyndbg_boot_param_cb) to handle dyndbg and $module.dyndbg
    params. For loadable modules, load_module() calls parse_args(),
    passing &ddebug_dyndbg_module_param_cb to handle dyndbg args given by

    Callbacks get extra arg, which is either modulename or "Booting
    Kernel" as passed by start_kernel to parse_args(). The arg allows
    foo.dyndbg="func bar +p; func buz +p" to exclude the "module foo" 2x,
    saving space in the limited cmdline buffers. Both callbacks call
    ddebug_exec_queries() to activate the specified pr_debug callsites.

    This adds pr_info for each initcall-level, yielding 7 lines in dmesg
    initlevel:6=device, 172 registered initcalls

    I dropped the pr_debug added in 2nd rev, which was noisy and not
    useful, init_debug provides similar info and more. This patch is
    decoration only, and can be dropped.

    whitespace cleanup

    I should have done this previously. Ive disregarded a checkpatch
    complaint about wrapping complex macro args in (), since theres plenty
    of similar code in include/*, and a couple attempts to add them

    Change "ddebug_query" to "dyndbg", to match new $module.dyndbg added
    by this patchset.

    Current message doesnt name the param being handled.

    Add "doing" to lower levels of param handling callchain, supplying it
    to callback added next.

    add 2 callbacks to parse dydnbg, module.dyndbg params.
    main patch of set.

    adds entry to feature-removal-schedule,
    and warning when ddebug_query is used.

    refactor 2 callbacks, add single helper.

    add return 0 above goto error target, move non-err code above it.

    show ram usage due to CONFIG_DYNAMIC_DEBUG.

    Adjust pnp for CONFIG_PNP_DEBUG_MESSAGES. Unchanged since Dec 11th

    This allows parsing $modname.dyndbg=" func foo +p ; func bar +p"
    without repeating "module $modname" 2x in the value

    This gets a checkpatch complaint because of long lines in which I
    tweaked flags. I chose to disregard this cuz the lines show real
    output for ~out-of-tree code.

    change arch_initcall to early_initcall, and module_init to fs_initcall.
    This works-for-me, but may be broken on some arches I dont have to
    test on. I dont know why original design used arch_initcall, perhaps
    constraints have changed.

    Dont apply til v3.6 or v3.7

    Jim Cromie

     \ /
      Last update: 2012-03-26 01:29    [W:0.025 / U:0.732 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site