05 May, 2014

1 commit


24 Jan, 2014

1 commit


28 May, 2013

1 commit


18 Jan, 2013

1 commit

  • Introduce print_hex_dump_debug() that can be dynamically controlled, similar to
    pr_debug.

    Also, make print_hex_dump_bytes() dynamically controlled

    Implement only 'p' flag (_DPRINTK_FLAGS_PRINT) to keep it simple since hex dump prints
    multiple lines and long prefix would impact readability.
    To provide line/file etc. information, use pr_debug or similar
    before/after print_hex_dump_debug()

    Signed-off-by: Vladimir Kondratiev
    Signed-off-by: Jason Baron
    Signed-off-by: Greg Kroah-Hartman

    Vladimir Kondratiev
     

01 May, 2012

1 commit

  • In dynamic-debug-howto.txt:

    - add section: Debug Messages at Module Initialization Time
    - update flags indicators in example outputs to include '='
    - make flags descriptions tabular
    - add item on '_' flag-char
    - add dyndbg, boot-args examples
    - rewrap some paragraphs with long lines

    In Kconfig.debug, note that compiling with -DDEBUG enables all
    pr_debug()s in that code.

    In kernel-parameters.txt, add dyndbg and module.dyndbg items,
    and deprecate ddebug_query.

    Signed-off-by: Jim Cromie
    Acked-by: Jason Baron
    Signed-off-by: Greg Kroah-Hartman

    Jim Cromie
     

25 Jan, 2012

2 commits

  • Insert ddebug_exec_queries() in place of ddebug_exec_query(). It
    splits the query string on [;\n], and calls ddebug_exec_query() on
    each. All queries are processed independent of errors, allowing a
    query to fail, for example when a module is not installed. Empty
    lines and comments are skipped. Errors are counted, and the last
    error seen (negative) or the number of callsites found (0 or positive)
    is returned. Return code checks are altered accordingly.

    With this, multiple queries can be given in ddebug_query, allowing
    more selective enabling of callsites. As a side effect, a set of
    commands can be batched in:

    cat cmd-file > $DBGMT/dynamic_debug/control

    We dont want a ddebug_query syntax error to kill the dynamic debug
    facility, so dynamic_debug_init() zeros ddebug_exec_queries()'s return
    code after logging the appropriate message, so that ddebug tables are
    preserved and $DBGMT/dynamic_debug/control file is created. This
    would be appropriate even without accepting multiple queries.

    This patch also alters ddebug_change() to return number of callsites
    matched (which typically is the same as number of callsites changed).
    ddebug_exec_query() also returns the number found, or a negative value
    if theres a parse error on the query.

    Splitting on [;\n] prevents their use in format-specs, but selecting
    callsites on punctuation is brittle anyway, meaningful and selective
    substrings are more typical.

    Note: splitting queries on ';' before handling trailing #comments
    means that a ';' also terminates a comment, and text after the ';' is
    treated as another query. This trailing query will almost certainly
    result in a parse error and thus have no effect other than the error
    message. The double corner case with unexpected results is:

    ddebug_query="func foo +p # enable foo ; +p"

    Signed-off-by: Jim Cromie
    Signed-off-by: Jason Baron
    Signed-off-by: Greg Kroah-Hartman

    Jim Cromie
     
  • trim_prefix(path) skips past the absolute source path root, and
    returns the pointer to the relative path from there. It is used to
    shorten the displayed path in $DBGMT/dynamic_debug/control via
    ddebug_proc_show(), and in ddebug_change() to allow relative filenames
    to be used in applied queries. For example:

    ~# echo file kernel/freezer.c +p > $DBGMT/dynamic_debug/control

    kernel/freezer.c:128 [freezer]cancel_freezing p " clean up: %s\012"

    trim_prefix(path) insures common prefix before trimming it, so
    out-of-tree module paths are shown as full absolute paths.

    Signed-off-by: Jim Cromie
    Signed-off-by: Jason Baron
    Signed-off-by: Greg Kroah-Hartman

    Jim Cromie
     

28 Mar, 2011

1 commit


26 Mar, 2011

1 commit


04 Feb, 2011

1 commit

  • Add flags that allow the user to specify via debugfs whether or not the
    module name, function name, line number and/or thread ID have to be
    included in the printed message.

    Signed-off-by: Bart Van Assche
    Cc: Greg Banks
    Cc: Konrad Rzeszutek Wilk
    Signed-off-by: Greg Kroah-Hartman

    Bart Van Assche
     

23 Oct, 2010

1 commit

  • Dynamic debug lacks the ability to enable debug messages at boot time.
    One could patch initramfs or service startup scripts to write to
    /sys/../dynamic_debug/control, but this sucks.

    This patch makes it possible to pass a query in the same format one can
    write to /sys/../dynamic_debug/control via boot param.
    When dynamic debug gets initialized, this query will automatically be
    applied.

    Signed-off-by: Thomas Renninger
    Acked-by: jbaron@redhat.com
    Acked-by: Pekka Enberg
    Signed-off-by: Greg Kroah-Hartman

    Thomas Renninger
     

25 Mar, 2009

2 commits

  • Allow simple quoting of words in the dynamic debug control language.

    This allows more natural specification when using the control language
    to match against printk formats, e.g

    #echo -n 'format "Setting node for non-present cpu" +p' >
    /mnt/debugfs/dynamic_debug/control

    instead of

    #echo -n 'format Setting\040node\040for\040non-present\040cpu +p' >
    /mnt/debugfs/dynamic_debug/control

    Adjust the dynamic debug documention to describe that and provide a
    new example. Adjust the existing examples in the documentation to
    reflect the current whitespace escaping behaviour when reading the
    control file. Fix some minor documentation trailing whitespace.

    Signed-off-by: Greg Banks
    Acked-by: Jason Baron
    Signed-off-by: Greg Kroah-Hartman

    Greg Banks
     
  • updates the documentation for 'dynamic debug' feature.

    Signed-off-by: Greg Banks
    Signed-off-by: Jason Baron
    Signed-off-by: Greg Kroah-Hartman

    Jason Baron