1. 17 12月, 2008 2 次提交
    • F
      tracing/ftrace: add the printk-msg-only option · 66896a85
      Frederic Weisbecker 提交于
      Impact: display ftrace_printk messages "as is"
      
      By default, ftrace_printk() messages find their output with some other
      informations like pid, caller, ...
      Sometimes a developer just want to have the ftrace_printk left "as is", without
      other information.
      
      This is done by providing a default-off option called printk-msg-only.
      To enable it, just do `echo printk-msg-only > /debugfs/tracing/trace_options`
      
      Before the patch:
      
                 <...>-2739  [000]   145.692153: __might_sleep: I'm an ftrace_printk msg in __might_sleep
                 <...>-2739  [000]   145.692155: __might_sleep: I'm another ftrace_printk msg in __might_sleep
      
      After the patch and the printk-msg-only option enabled:
      
      I'm an ftrace_printk msg in __might_sleep
      I'm another ftrace_printk msg in __might_sleep
      Signed-off-by: NFrederic Weisbecker <fweisbec@gmail.com>
      Cc: Steven Rostedt <rostedt@goodmis.org>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      66896a85
    • F
      tracing/ftrace: use preempt_enable_no_resched_notrace in ring_buffer_time_stamp() · 2c2d7329
      Frederic Weisbecker 提交于
      Impact: prevent a trace recursion
      
      After some tests with function graph tracer under x86-32, I saw some recursions
      caused by ring_buffer_time_stamp() that calls preempt_enable_no_notrace() which
      calls preempt_schedule() which is traced itself.
      
      This patch re-enables preemption without rescheduling.
      Signed-off-by: NFrederic Weisbecker <fweisbec@gmail.com>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      2c2d7329
  2. 16 12月, 2008 1 次提交
  3. 12 12月, 2008 12 次提交
  4. 08 12月, 2008 6 次提交
  5. 05 12月, 2008 5 次提交
  6. 04 12月, 2008 14 次提交
    • F
      tracing/function-graph-tracer: handle ftrace_printk entries · 1fd8f2a3
      Frederic Weisbecker 提交于
      Handle the TRACE_PRINT entries from the function grapg tracer
      and output them as a C comment just below the function that called
      it, as if it was a comment inside this function.
      
      Example with an ftrace_printk inside might_sleep() function:
      
      void __might_sleep(char *file, int line)
      {
      	static unsigned long prev_jiffy;	/* ratelimiting */
      
      	ftrace_printk("Hi I'm a comment in might_sleep() :-)");
      
      A chunk of a resulting trace:
      
       0)               |        _reiserfs_free_block() {
       0)               |          reiserfs_read_bitmap_block() {
       0)               |            __bread() {
       0)               |              __getblk() {
       0)               |                __find_get_block() {
       0)   0.698 us    |                  mark_page_accessed();
       0)   2.267 us    |                }
       0)               |                __might_sleep() {
       0)               |                  /* Hi I'm a comment in might_sleep() :-) */
       0)   1.321 us    |                }
       0)   5.872 us    |              }
       0)   7.313 us    |            }
       0)   8.718 us    |          }
      
      And this patch brings two minor fixes:
      
      - The newline after a switch-out task has disappeared
      - The "|" sign just before the cpu number on task-switch has been deleted.
      
       0)   0.616 us    |                pick_next_task_rt();
       0)   1.457 us    |                _spin_trylock();
       0)   0.653 us    |                _spin_unlock();
       0)   0.728 us    |                _spin_trylock();
       0)   0.631 us    |                _spin_unlock();
       0)   0.729 us    |                native_load_sp0();
       0)   0.593 us    |                native_load_tls();
       ------------------------------------------
       0)    cat-2834    =>   migrati-3
       ------------------------------------------
      
       0)               |    finish_task_switch() {
       0)   0.841 us    |      _spin_unlock_irq();
       0)   0.616 us    |      post_schedule_rt();
       0)   3.882 us    |    }
      Signed-off-by: NFrederic Weisbecker <fweisbec@gmail.com>
      Acked-by: NSteven Rostedt <rostedt@goodmis.org>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      1fd8f2a3
    • L
      ftrace: avoid duplicated function when writing set_graph_function · faec2ec5
      Liming Wang 提交于
      Impact: fix a bug in function filter setting
      
      when writing function to set_graph_function, we should check whether it
      has existed in set_graph_function to avoid duplicating.
      Signed-off-by: NLiming Wang <liming.wang@windriver.com>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      faec2ec5
    • I
      tracing: fix typo and missing inline function · 6b253930
      Ingo Molnar 提交于
      Impact: fix build bugs
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      6b253930
    • S
      ftrace: add ability to only trace swapper tasks · e32d8956
      Steven Rostedt 提交于
      Impact: new feature
      
      This patch lets the swapper tasks of all CPUS be filtered by the
      set_ftrace_pid file.
      
      If '0' is echoed into this file, then all the idle tasks (aka swapper)
      is flagged to be traced.  This affects all CPU idle tasks.
      Signed-off-by: NSteven Rostedt <srostedt@redhat.com>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      e32d8956
    • S
      ftrace: use struct pid · 978f3a45
      Steven Rostedt 提交于
      Impact: clean up, extend PID filtering to PID namespaces
      
      Eric Biederman suggested using the struct pid for filtering on
      pids in the kernel. This patch is based off of a demonstration
      of an implementation that Eric sent me in an email.
      Signed-off-by: NSteven Rostedt <srostedt@redhat.com>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      978f3a45
    • S
      pid: fix the do_each_pid_task() macro · 5ef64761
      Steven Rostedt 提交于
      Impact: macro side-effects fix
      
      This patch adds parenthesis around 'pid' in the do_each_pid_task
      macro to allow callers to pass in more complex parameters.
      
      e.g.  do_each_pid_task(*pid, type, task)
      Signed-off-by: NSteven Rostedt <srostedt@redhat.com>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      5ef64761
    • S
      ftrace: trace single pid for function graph tracer · 804a6851
      Steven Rostedt 提交于
      Impact: New feature
      
      This patch makes the changes to set_ftrace_pid apply to the function
      graph tracer.
      
        # echo $$ > /debugfs/tracing/set_ftrace_pid
        # echo function_graph > /debugfs/tracing/current_tracer
      
      Will cause only the current task to be traced. Note, the trace flags are
      also inherited by child processes, so the children of the shell
      will also be traced.
      Signed-off-by: NSteven Rostedt <srostedt@redhat.com>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      804a6851
    • S
      ftrace: use task struct trace flag to filter on pid · 0ef8cde5
      Steven Rostedt 提交于
      Impact: clean up
      
      Use the new task struct trace flags to determine if a process should be
      traced or not.
      
      Note: this moves the searching of the pid to the slow path of setting
      the pid field. This needs to be converted to the pid name space.
      Signed-off-by: NSteven Rostedt <srostedt@redhat.com>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      0ef8cde5
    • S
      ftrace: graph of a single function · ea4e2bc4
      Steven Rostedt 提交于
      This patch adds the file:
      
         /debugfs/tracing/set_graph_function
      
      which can be used along with the function graph tracer.
      
      When this file is empty, the function graph tracer will act as
      usual. When the file has a function in it, the function graph
      tracer will only trace that function.
      
      For example:
      
       # echo blk_unplug > /debugfs/tracing/set_graph_function
       # cat /debugfs/tracing/trace
       [...]
       ------------------------------------------
       | 2)  make-19003  =>  kjournald-2219
       ------------------------------------------
      
       2)               |  blk_unplug() {
       2)               |    dm_unplug_all() {
       2)               |      dm_get_table() {
       2)      1.381 us |        _read_lock();
       2)      0.911 us |        dm_table_get();
       2)      1. 76 us |        _read_unlock();
       2) +   12.912 us |      }
       2)               |      dm_table_unplug_all() {
       2)               |        blk_unplug() {
       2)      0.778 us |          generic_unplug_device();
       2)      2.409 us |        }
       2)      5.992 us |      }
       2)      0.813 us |      dm_table_put();
       2) +   29. 90 us |    }
       2) +   34.532 us |  }
      
      You can add up to 32 functions into this file. Currently we limit it
      to 32, but this may change with later improvements.
      
      To add another function, use the append '>>':
      
        # echo sys_read >> /debugfs/tracing/set_graph_function
        # cat /debugfs/tracing/set_graph_function
        blk_unplug
        sys_read
      
      Using the '>' will clear out the function and write anew:
      
        # echo sys_write > /debug/tracing/set_graph_function
        # cat /debug/tracing/set_graph_function
        sys_write
      
      Note, if you have function graph running while doing this, the small
      time between clearing it and updating it will cause the graph to
      record all functions. This should not be an issue because after
      it sets the filter, only those functions will be recorded from then on.
      If you need to only record a particular function then set this
      file first before starting the function graph tracer. In the future
      this side effect may be corrected.
      
      The set_graph_function file is similar to the set_ftrace_filter but
      it does not take wild cards nor does it allow for more than one
      function to be set with a single write. There is no technical reason why
      this is the case, I just do not have the time yet to implement that.
      
      Note, dynamic ftrace must be enabled for this to appear because it
      uses the dynamic ftrace records to match the name to the mcount
      call sites.
      Signed-off-by: NSteven Rostedt <srostedt@redhat.com>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      ea4e2bc4
    • I
    • I
      Merge commit 'v2.6.28-rc7' into tracing/core · b8307db2
      Ingo Molnar 提交于
      b8307db2
    • L
      Merge branch 'for-linus' of git://git.kernel.dk/linux-2.6-block · feaf3848
      Linus Torvalds 提交于
      * 'for-linus' of git://git.kernel.dk/linux-2.6-block:
        block: fix setting of max_segment_size and seg_boundary mask
        block: internal dequeue shouldn't start timer
        block: set disk->node_id before it's being used
        When block layer fails to map iov, it calls bio_unmap_user to undo
      feaf3848
    • L
      Merge branch 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc · a7711327
      Linus Torvalds 提交于
      * 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc:
        powerpc/83xx: Fix MCU support merge issue in mpc8349emitx.dts
        powerpc: Fix dma_map_sg() cache flushing on non coherent platforms
      a7711327
    • L
      Merge branch 'for-2.6.28' of git://linux-nfs.org/~bfields/linux · 2433c417
      Linus Torvalds 提交于
      * 'for-2.6.28' of git://linux-nfs.org/~bfields/linux:
        NLM: client-side nlm_lookup_host() should avoid matching on srcaddr
        nfsd: use of unitialized list head on error exit in nfs4recover.c
        Add a reference to sunrpc in svc_addsock
        nfsd: clean up grace period on early exit
      2433c417