1. 24 10月, 2016 2 次提交
  2. 05 5月, 2014 1 次提交
  3. 24 1月, 2014 1 次提交
  4. 28 5月, 2013 1 次提交
  5. 18 1月, 2013 1 次提交
  6. 01 5月, 2012 1 次提交
  7. 25 1月, 2012 2 次提交
    • J
      dynamic_debug: process multiple debug-queries on a line · 85f7f6c0
      Jim Cromie 提交于
      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: NJim Cromie <jim.cromie@gmail.com>
      Signed-off-by: NJason Baron <jbaron@redhat.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      85f7f6c0
    • J
      dynamic_debug: add trim_prefix() to provide source-root relative paths · 2b678319
      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: NJim Cromie <jim.cromie@gmail.com>
      Signed-off-by: NJason Baron <jbaron@redhat.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      2b678319
  8. 26 3月, 2011 1 次提交
  9. 04 2月, 2011 1 次提交
  10. 23 10月, 2010 1 次提交
  11. 25 3月, 2009 2 次提交