11 Mar, 2009

1 commit


10 Mar, 2009

5 commits

  • Impact: clean up

    The TRACE_EVENT_FORMAT macro is no longer used by trace points
    and only the DECLARE_TRACE, TRACE_FORMAT or TRACE_EVENT macros should
    be used by them. Although the TRACE_EVENT_FORMAT macro is still used
    by the internal tracing utility, it should not be used in core
    kernel code.

    Signed-off-by: Steven Rostedt

    Steven Rostedt
     
  • Impact: enhancement

    Converted the two irq trace point macros. The entry macro copies
    the name of the irq handler, thus it is better to simply use the
    TRACE_FORMAT macro which uses the trace_printk.

    The return of the handler does not need to record the name, thus
    the faster C style handler is more approriate.

    Signed-off-by: Steven Rostedt

    Steven Rostedt
     
  • Impact: enhancement

    This patch converts the rest of the sched trace points to use the new
    more powerful TRACE_EVENT macro.

    Signed-off-by: Steven Rostedt

    Steven Rostedt
     
  • Impact: clean up and enhancement

    The TRACE_EVENT_FORMAT macro looks quite ugly and is limited in its
    ability to save data as well as to print the record out. Working with
    Ingo Molnar, we came up with a new format that is much more pleasing to
    the eye of C developers. This new macro is more C style than the old
    macro, and is more obvious to what it does.

    Here's the example. The only updated macro in this patch is the
    sched_switch trace point.

    The old method looked like this:

    TRACE_EVENT_FORMAT(sched_switch,
    TP_PROTO(struct rq *rq, struct task_struct *prev,
    struct task_struct *next),
    TP_ARGS(rq, prev, next),
    TP_FMT("task %s:%d ==> %s:%d",
    prev->comm, prev->pid, next->comm, next->pid),
    TRACE_STRUCT(
    TRACE_FIELD(pid_t, prev_pid, prev->pid)
    TRACE_FIELD(int, prev_prio, prev->prio)
    TRACE_FIELD_SPECIAL(char next_comm[TASK_COMM_LEN],
    next_comm,
    TP_CMD(memcpy(TRACE_ENTRY->next_comm,
    next->comm,
    TASK_COMM_LEN)))
    TRACE_FIELD(pid_t, next_pid, next->pid)
    TRACE_FIELD(int, next_prio, next->prio)
    ),
    TP_RAW_FMT("prev %d:%d ==> next %s:%d:%d")
    );

    The above method is hard to read and requires two format fields.

    The new method:

    /*
    * Tracepoint for task switches, performed by the scheduler:
    *
    * (NOTE: the 'rq' argument is not used by generic trace events,
    * but used by the latency tracer plugin. )
    */
    TRACE_EVENT(sched_switch,

    TP_PROTO(struct rq *rq, struct task_struct *prev,
    struct task_struct *next),

    TP_ARGS(rq, prev, next),

    TP_STRUCT__entry(
    __array( char, prev_comm, TASK_COMM_LEN )
    __field( pid_t, prev_pid )
    __field( int, prev_prio )
    __array( char, next_comm, TASK_COMM_LEN )
    __field( pid_t, next_pid )
    __field( int, next_prio )
    ),

    TP_printk("task %s:%d [%d] ==> %s:%d [%d]",
    __entry->prev_comm, __entry->prev_pid, __entry->prev_prio,
    __entry->next_comm, __entry->next_pid, __entry->next_prio),

    TP_fast_assign(
    memcpy(__entry->next_comm, next->comm, TASK_COMM_LEN);
    __entry->prev_pid = prev->pid;
    __entry->prev_prio = prev->prio;
    memcpy(__entry->prev_comm, prev->comm, TASK_COMM_LEN);
    __entry->next_pid = next->pid;
    __entry->next_prio = next->prio;
    )
    );

    This macro is called TRACE_EVENT, it is broken up into 5 parts:

    TP_PROTO: the proto type of the trace point
    TP_ARGS: the arguments of the trace point
    TP_STRUCT_entry: the structure layout of the entry in the ring buffer
    TP_printk: the printk format
    TP_fast_assign: the method used to write the entry into the ring buffer

    The structure is the definition of how the event will be saved in the
    ring buffer. The printk is used by the internal tracing in case of
    an oops, and the kernel needs to print out the format of the record
    to the console. This the TP_printk gives a means to show the records
    in a human readable format. It is also used to print out the data
    from the trace file.

    The TP_fast_assign is executed directly. It is basically like a C function,
    where the __entry is the handle to the record.

    Signed-off-by: Steven Rostedt

    Steven Rostedt
     
  • Impact: clean up

    The macros TPPROTO, TPARGS, TPFMT, TPRAWFMT, and TPCMD all look a bit
    ugly. This patch adds an underscore to their names.

    Signed-off-by: Steven Rostedt

    Steven Rostedt
     

06 Mar, 2009

1 commit


05 Mar, 2009

1 commit

  • Augment the traces with lock names when lockdep is available:

    1) | down_read_trylock() {
    1) | _spin_lock_irqsave() {
    1) | /* lock_acquire: &sem->wait_lock */
    1) 4.201 us | }
    1) | _spin_unlock_irqrestore() {
    1) | /* lock_release: &sem->wait_lock */
    1) 3.523 us | }
    1) | /* lock_acquire: try read &mm->mmap_sem */
    1) + 13.386 us | }
    1) 1.635 us | find_vma();
    1) | handle_mm_fault() {
    1) | __do_fault() {
    1) | filemap_fault() {
    1) | find_lock_page() {
    1) | find_get_page() {
    1) | /* lock_acquire: read rcu_read_lock */
    1) | /* lock_release: rcu_read_lock */
    1) 5.697 us | }
    1) 8.158 us | }
    1) + 11.079 us | }
    1) | _spin_lock() {
    1) | /* lock_acquire: __pte_lockptr(page) */
    1) 3.949 us | }
    1) 1.460 us | page_add_file_rmap();
    1) | _spin_unlock() {
    1) | /* lock_release: __pte_lockptr(page) */
    1) 3.115 us | }
    1) | unlock_page() {
    1) 1.421 us | page_waitqueue();
    1) 1.220 us | __wake_up_bit();
    1) 6.519 us | }
    1) + 34.328 us | }
    1) + 37.452 us | }
    1) | up_read() {
    1) | /* lock_release: &mm->mmap_sem */
    1) | _spin_lock_irqsave() {
    1) | /* lock_acquire: &sem->wait_lock */
    1) 3.865 us | }
    1) | _spin_unlock_irqrestore() {
    1) | /* lock_release: &sem->wait_lock */
    1) 8.562 us | }
    1) + 17.370 us | }

    Signed-off-by: Peter Zijlstra
    Cc: Steven Rostedt
    Cc: =?ISO-8859-1?Q?T=F6r=F6k?= Edwin
    Cc: Jason Baron
    Cc: Frederic Weisbecker
    LKML-Reference:
    Signed-off-by: Ingo Molnar

    Peter Zijlstra
     

02 Mar, 2009

1 commit

  • Tom Zanussi pointed out that the simple TRACE_FIELD was not enough to
    record trace data that required memcpy. This patch addresses this issue
    by adding a TRACE_FIELD_SPECIAL. The format is similar to TRACE_FIELD
    but looks like so:

    TRACE_FIELD_SPECIAL(type_item, item, cmd)

    What TRACE_FIELD gave was:

    TRACE_FIELD(type, item, assign)

    The TRACE_FIELD would be used in declaring a structure:

    struct {
    type item;
    };

    And later assign it via:

    entry->item = assign;

    What TRACE_FIELD_SPECIAL gives us is:

    In the declaration of the structure:

    struct {
    type_item;
    };

    And the assignment:

    cmd;

    This change log will explain the one example used in the patch:

    TRACE_EVENT_FORMAT(sched_switch,
    TPPROTO(struct rq *rq, struct task_struct *prev,
    struct task_struct *next),
    TPARGS(rq, prev, next),
    TPFMT("task %s:%d ==> %s:%d",
    prev->comm, prev->pid, next->comm, next->pid),
    TRACE_STRUCT(
    TRACE_FIELD(pid_t, prev_pid, prev->pid)
    TRACE_FIELD(int, prev_prio, prev->prio)
    TRACE_FIELD_SPECIAL(char next_comm[TASK_COMM_LEN],
    next_comm,
    TPCMD(memcpy(TRACE_ENTRY->next_comm,
    next->comm,
    TASK_COMM_LEN)))
    TRACE_FIELD(pid_t, next_pid, next->pid)
    TRACE_FIELD(int, next_prio, next->prio)
    ),
    TPRAWFMT("prev %d:%d ==> next %s:%d:%d")
    );

    The struct will be create as:

    struct {
    pid_t prev_pid;
    int prev_prio;
    char next_comm[TASK_COMM_LEN];
    pid_t next_pid;
    int next_prio;
    };

    Note the TRACE_ENTRY in the cmd part of TRACE_SPECIAL. TRACE_ENTRY will
    be set by the tracer to point to the structure inside the trace buffer.

    entry->prev_pid = prev->pid;
    entry->prev_prio = prev->prio;
    memcpy(entry->next_comm, next->comm, TASK_COMM_LEN);
    entry->next_pid = next->pid;
    entry->next_prio = next->prio

    Reported-by: Tom Zanussi
    Signed-off-by: Steven Rostedt

    Steven Rostedt
     

28 Feb, 2009

5 commits


27 Feb, 2009

1 commit

  • Impact: add new tracepoints

    Add them to the generic IRQ code, that way every architecture
    gets these new tracepoints, not just x86.

    Using Steve's new 'TRACE_FORMAT', I can get function graph
    trace as follows using the original two IRQ tracepoints:

    3) | handle_IRQ_event() {
    3) | /* (irq_handler_entry) irq=28 handler=eth0 */
    3) | e1000_intr_msi() {
    3) 2.460 us | __napi_schedule();
    3) 9.416 us | }
    3) | /* (irq_handler_exit) irq=28 handler=eth0 return=handled */
    3) + 22.935 us | }

    Signed-off-by: Jason Baron
    Signed-off-by: Steven Rostedt
    Acked-by: Peter Zijlstra
    Acked-by: Masami Hiramatsu
    Cc: KOSAKI Motohiro
    Cc: Mathieu Desnoyers
    Cc: "Frank Ch. Eigler"
    Cc: Arnaldo Carvalho de Melo
    Cc: Frederic Weisbecker
    Signed-off-by: Ingo Molnar

    Jason Baron
     

26 Feb, 2009

1 commit


25 Feb, 2009

1 commit


13 Feb, 2009

1 commit


09 Feb, 2009

1 commit


14 Jan, 2009

1 commit

  • Impact: new tracer

    The workqueue tracer provides some statistical informations
    about each cpu workqueue thread such as the number of the
    works inserted and executed since their creation. It can help
    to evaluate the amount of work each of them have to perform.
    For example it can help a developer to decide whether he should
    choose a per cpu workqueue instead of a singlethreaded one.

    It only traces statistical informations for now but it will probably later
    provide event tracing too.

    Such a tracer could help too, and be improved, to help rt priority sorted
    workqueue development.

    To have a snapshot of the workqueues state at any time, just do

    cat /debugfs/tracing/trace_stat/workqueues

    Ie:

    1 125 125 reiserfs/1
    1 0 0 scsi_tgtd/1
    1 0 0 aio/1
    1 0 0 ata/1
    1 114 114 kblockd/1
    1 0 0 kintegrityd/1
    1 2147 2147 events/1

    0 0 0 kpsmoused
    0 105 105 reiserfs/0
    0 0 0 scsi_tgtd/0
    0 0 0 aio/0
    0 0 0 ata_aux
    0 0 0 ata/0
    0 0 0 cqueue
    0 0 0 kacpi_notify
    0 0 0 kacpid
    0 149 149 kblockd/0
    0 0 0 kintegrityd/0
    0 1000 1000 khelper
    0 2270 2270 events/0

    Changes in V2:

    _ Drop the static array based on NR_CPU and dynamically allocate the stat array
    with num_possible_cpus() and other cpu mask facilities....
    _ Trace workqueue insertion at a bit lower level (insert_work instead of queue_work) to handle
    even the workqueue barriers.

    Signed-off-by: Frederic Weisbecker
    Signed-off-by: Steven Rostedt
    Signed-off-by: Ingo Molnar

    Frederic Weisbecker
     

30 Dec, 2008

1 commit

  • Impact: new tracer plugin

    This patch adapts kmemtrace raw events tracing to the unified tracing API.

    To enable and use this tracer, just do the following:

    echo kmemtrace > /debugfs/tracing/current_tracer
    cat /debugfs/tracing/trace

    You will have the following output:

    # tracer: kmemtrace
    #
    #
    # ALLOC TYPE REQ GIVEN FLAGS POINTER NODE CALLER
    # FREE | | | | | | | |
    # |

    type_id 1 call_site 18446744071565527833 ptr 18446612134395152256
    type_id 0 call_site 18446744071565585597 ptr 18446612134405955584 bytes_req 4096 bytes_alloc 4096 gfp_flags 208 node -1
    type_id 1 call_site 18446744071565585534 ptr 18446612134405955584
    type_id 0 call_site 18446744071565585597 ptr 18446612134405955584 bytes_req 4096 bytes_alloc 4096 gfp_flags 208 node -1
    type_id 0 call_site 18446744071565636711 ptr 18446612134345164672 bytes_req 240 bytes_alloc 240 gfp_flags 208 node -1
    type_id 1 call_site 18446744071565585534 ptr 18446612134405955584
    type_id 0 call_site 18446744071565585597 ptr 18446612134405955584 bytes_req 4096 bytes_alloc 4096 gfp_flags 208 node -1
    type_id 0 call_site 18446744071565636711 ptr 18446612134345164912 bytes_req 240 bytes_alloc 240 gfp_flags 208 node -1
    type_id 1 call_site 18446744071565585534 ptr 18446612134405955584
    type_id 0 call_site 18446744071565585597 ptr 18446612134405955584 bytes_req 4096 bytes_alloc 4096 gfp_flags 208 node -1
    type_id 0 call_site 18446744071565636711 ptr 18446612134345165152 bytes_req 240 bytes_alloc 240 gfp_flags 208 node -1
    type_id 0 call_site 18446744071566144042 ptr 18446612134346191680 bytes_req 1304 bytes_alloc 1312 gfp_flags 208 node -1
    type_id 1 call_site 18446744071565585534 ptr 18446612134405955584
    type_id 0 call_site 18446744071565585597 ptr 18446612134405955584 bytes_req 4096 bytes_alloc 4096 gfp_flags 208 node -1
    type_id 1 call_site 18446744071565585534 ptr 18446612134405955584

    That was to stay backward compatible with the format output produced in
    inux/tracepoint.h.

    This is the default ouput, but note that I tried something else.

    If you change an option:

    echo kmem_minimalistic > /debugfs/trace_options

    and then cat /debugfs/trace, you will have the following output:

    # tracer: kmemtrace
    #
    #
    # ALLOC TYPE REQ GIVEN FLAGS POINTER NODE CALLER
    # FREE | | | | | | | |
    # |

    - C 0xffff88007c088780 file_free_rcu
    + K 4096 4096 000000d0 0xffff88007cad6000 -1 getname
    - C 0xffff88007cad6000 putname
    + K 4096 4096 000000d0 0xffff88007cad6000 -1 getname
    + K 240 240 000000d0 0xffff8800790dc780 -1 d_alloc
    - C 0xffff88007cad6000 putname
    + K 4096 4096 000000d0 0xffff88007cad6000 -1 getname
    + K 240 240 000000d0 0xffff8800790dc870 -1 d_alloc
    - C 0xffff88007cad6000 putname
    + K 4096 4096 000000d0 0xffff88007cad6000 -1 getname
    + K 240 240 000000d0 0xffff8800790dc960 -1 d_alloc
    + K 1304 1312 000000d0 0xffff8800791d7340 -1 reiserfs_alloc_inode
    - C 0xffff88007cad6000 putname
    + K 4096 4096 000000d0 0xffff88007cad6000 -1 getname
    - C 0xffff88007cad6000 putname
    + K 992 1000 000000d0 0xffff880079045b58 -1 alloc_inode
    + K 768 1024 000080d0 0xffff88007c096400 -1 alloc_pipe_info
    + K 240 240 000000d0 0xffff8800790dca50 -1 d_alloc
    + K 272 320 000080d0 0xffff88007c088780 -1 get_empty_filp
    + K 272 320 000080d0 0xffff88007c088000 -1 get_empty_filp

    Yeah I shall confess kmem_minimalistic should be: kmem_alternative.

    Whatever, I find it more readable but this a personal opinion of course.
    We can drop it if you want.

    On the ALLOC/FREE column, + means an allocation and - a free.

    On the type column, you have K = kmalloc, C = cache, P = page

    I would like the flags to be GFP_* strings but that would not be easy to not
    break the column with strings....

    About the node...it seems to always be -1. I don't know why but that shouldn't
    be difficult to find.

    I moved linux/tracepoint.h to trace/tracepoint.h as well. I think that would
    be more easy to find the tracer headers if they are all in their common
    directory.

    Signed-off-by: Frederic Weisbecker
    Signed-off-by: Ingo Molnar

    Frederic Weisbecker
     

25 Dec, 2008

1 commit


19 Dec, 2008

1 commit

  • these warnings:

    kernel/trace/trace_sched_switch.c: In function ‘tracing_sched_register’:
    kernel/trace/trace_sched_switch.c:96: warning: passing argument 1 of ‘register_trace_sched_wakeup_new’ from incompatible pointer type
    kernel/trace/trace_sched_switch.c:112: warning: passing argument 1 of ‘unregister_trace_sched_wakeup_new’ from incompatible pointer type
    kernel/trace/trace_sched_switch.c: In function ‘tracing_sched_unregister’:
    kernel/trace/trace_sched_switch.c:121: warning: passing argument 1 of ‘unregister_trace_sched_wakeup_new’ from incompatible pointer type

    Trigger because sched_wakeup_new tracepoints need the same trace
    signature as sched_wakeup - which was changed recently.

    Fix it.

    Signed-off-by: Ingo Molnar

    Ingo Molnar
     

16 Dec, 2008

1 commit


12 Dec, 2008

3 commits

  • The trace point only caught one of many places where a task changes cpu,
    put it in the right place to we get all of them.

    Change the signature while we're at it.

    Signed-off-by: Peter Zijlstra
    Signed-off-by: Ingo Molnar

    Peter Zijlstra
     
  • For now include/trace/boot.h doesn't need to include necessary headers
    for its functions and structures because the files that include it already
    do it.

    But boot.h could be needed as well for further uses on other files.
    So, this patch adds the necessary headers for future purposes...

    Signed-off-by: Frederic Weisbecker
    Signed-off-by: Ingo Molnar

    Frederic Weisbecker
     
  • Impact: fix possible stack overrun

    This is a port of a patch included in the mainline (KSYM_SYMBOL_LEN fixes).
    The current func len is not large enough to contain the max symbol len, the
    right size must be KSYM_SYMBOL_LEN.

    Signed-off-by: Stephen Rothwell
    Signed-off-by: Frederic Weisbecker
    Signed-off-by: Ingo Molnar

    Stephen Rothwell
     

26 Nov, 2008

2 commits

  • Port to the new tracepoints API: split DEFINE_TRACE() and DECLARE_TRACE()
    sites. Spread them out to the usage sites, as suggested by
    Mathieu Desnoyers.

    Signed-off-by: Ingo Molnar
    Acked-by: Mathieu Desnoyers

    Ingo Molnar
     
  • This was a forward port of work done by Mathieu Desnoyers, I changed it to
    encode the 'what' parameter on the tracepoint name, so that one can register
    interest in specific events and not on classes of events to then check the
    'what' parameter.

    Signed-off-by: Arnaldo Carvalho de Melo
    Signed-off-by: Jens Axboe
    Signed-off-by: Ingo Molnar

    Arnaldo Carvalho de Melo
     

16 Nov, 2008

1 commit

  • Impact: API *CHANGE*. Must update all tracepoint users.

    Add DEFINE_TRACE() to tracepoints to let them declare the tracepoint
    structure in a single spot for all the kernel. It helps reducing memory
    consumption, especially when declaring a lot of tracepoints, e.g. for
    kmalloc tracing.

    *API CHANGE WARNING*: now, DECLARE_TRACE() must be used in headers for
    tracepoint declarations rather than DEFINE_TRACE(). This is the sane way
    to do it. The name previously used was misleading.

    Updates scheduler instrumentation to follow this API change.

    Signed-off-by: Mathieu Desnoyers
    Signed-off-by: Ingo Molnar

    Mathieu Desnoyers
     

12 Nov, 2008

2 commits

  • Impact: Split the boot tracer entries in two parts: call and return

    Now that we are using the sched tracer from the boot tracer, we want
    to use the same timestamp than the ring-buffer to have consistent time
    captures between sched events and initcall events.

    So we get rid of the old time capture by the boot tracer and split the
    initcall events in two parts: call and return. This way we have the
    ring buffer timestamp of both.

    An example trace:

    [ 27.904149584] calling net_ns_init+0x0/0x1c0 @ 1
    [ 27.904429624] initcall net_ns_init+0x0/0x1c0 returned 0 after 0 msecs
    [ 27.904575926] calling reboot_init+0x0/0x20 @ 1
    [ 27.904655399] initcall reboot_init+0x0/0x20 returned 0 after 0 msecs
    [ 27.904800228] calling sysctl_init+0x0/0x30 @ 1
    [ 27.905142914] initcall sysctl_init+0x0/0x30 returned 0 after 0 msecs
    [ 27.905287211] calling ksysfs_init+0x0/0xb0 @ 1
    ##### CPU 0 buffer started ####
    init-1 [000] 27.905395: 1:120:R + [001] 11:115:S
    ##### CPU 1 buffer started ####
    -0 [001] 27.905425: 0:140:R ==> [001] 11:115:R
    init-1 [000] 27.905426: 1:120:D ==> [000] 0:140:R
    -0 [000] 27.905431: 0:140:R + [000] 4:115:S
    -0 [000] 27.905451: 0:140:R ==> [000] 4:115:R
    ksoftirqd/0-4 [000] 27.905456: 4:115:S ==> [000] 0:140:R
    udevd-11 [001] 27.905458: 11:115:R + [001] 14:115:R
    -0 [000] 27.905459: 0:140:R + [000] 4:115:S
    -0 [000] 27.905462: 0:140:R ==> [000] 4:115:R
    udevd-11 [001] 27.905462: 11:115:R ==> [001] 14:115:R
    ksoftirqd/0-4 [000] 27.905467: 4:115:S ==> [000] 0:140:R
    -0 [000] 27.905470: 0:140:R + [000] 4:115:S
    -0 [000] 27.905473: 0:140:R ==> [000] 4:115:R
    ksoftirqd/0-4 [000] 27.905476: 4:115:S ==> [000] 0:140:R
    -0 [000] 27.905479: 0:140:R + [000] 4:115:S
    -0 [000] 27.905482: 0:140:R ==> [000] 4:115:R
    ksoftirqd/0-4 [000] 27.905486: 4:115:S ==> [000] 0:140:R
    udevd-14 [001] 27.905499: 14:120:X ==> [001] 11:115:R
    udevd-11 [001] 27.905506: 11:115:R + [000] 1:120:D
    -0 [000] 27.905515: 0:140:R ==> [000] 1:120:R
    udevd-11 [001] 27.905517: 11:115:S ==> [001] 0:140:R
    [ 27.905557107] initcall ksysfs_init+0x0/0xb0 returned 0 after 3906 msecs
    [ 27.905705736] calling init_jiffies_clocksource+0x0/0x10 @ 1
    [ 27.905779239] initcall init_jiffies_clocksource+0x0/0x10 returned 0 after 0 msecs
    [ 27.906769814] calling pm_init+0x0/0x30 @ 1
    [ 27.906853627] initcall pm_init+0x0/0x30 returned 0 after 0 msecs
    [ 27.906997803] calling pm_disk_init+0x0/0x20 @ 1
    [ 27.907076946] initcall pm_disk_init+0x0/0x20 returned 0 after 0 msecs
    [ 27.907222556] calling swsusp_header_init+0x0/0x30 @ 1
    [ 27.907294325] initcall swsusp_header_init+0x0/0x30 returned 0 after 0 msecs
    [ 27.907439620] calling stop_machine_init+0x0/0x50 @ 1
    init-1 [000] 27.907485: 1:120:R + [000] 2:115:S
    init-1 [000] 27.907490: 1:120:D ==> [000] 2:115:R
    kthreadd-2 [000] 27.907507: 2:115:R + [001] 15:115:R
    -0 [001] 27.907517: 0:140:R ==> [001] 15:115:R
    kthreadd-2 [000] 27.907517: 2:115:D ==> [000] 0:140:R
    -0 [000] 27.907521: 0:140:R + [000] 4:115:S
    -0 [000] 27.907524: 0:140:R ==> [000] 4:115:R
    udevd-15 [001] 27.907527: 15:115:D + [000] 2:115:D
    ksoftirqd/0-4 [000] 27.907537: 4:115:S ==> [000] 2:115:R
    udevd-15 [001] 27.907537: 15:115:D ==> [001] 0:140:R
    kthreadd-2 [000] 27.907546: 2:115:R + [000] 1:120:D
    kthreadd-2 [000] 27.907550: 2:115:S ==> [000] 1:120:R
    init-1 [000] 27.907584: 1:120:R + [000] 15: 0:D
    init-1 [000] 27.907589: 1:120:R + [000] 2:115:S
    init-1 [000] 27.907593: 1:120:D ==> [000] 15: 0:R
    udevd-15 [000] 27.907601: 15: 0:S ==> [000] 2:115:R
    ##### CPU 0 buffer started ####
    kthreadd-2 [000] 27.907616: 2:115:R + [001] 16:115:R
    ##### CPU 1 buffer started ####
    -0 [001] 27.907620: 0:140:R ==> [001] 16:115:R
    kthreadd-2 [000] 27.907621: 2:115:D ==> [000] 0:140:R
    udevd-16 [001] 27.907625: 16:115:D + [000] 2:115:D
    -0 [000] 27.907628: 0:140:R + [000] 4:115:S
    udevd-16 [001] 27.907629: 16:115:D ==> [001] 0:140:R
    -0 [000] 27.907631: 0:140:R ==> [000] 4:115:R
    ksoftirqd/0-4 [000] 27.907636: 4:115:S ==> [000] 2:115:R
    kthreadd-2 [000] 27.907644: 2:115:R + [000] 1:120:D
    kthreadd-2 [000] 27.907647: 2:115:S ==> [000] 1:120:R
    init-1 [000] 27.907657: 1:120:R + [001] 16: 0:D
    -0 [001] 27.907666: 0:140:R ==> [001] 16: 0:R
    [ 27.907703862] initcall stop_machine_init+0x0/0x50 returned 0 after 0 msecs
    [ 27.907850704] calling filelock_init+0x0/0x30 @ 1
    [ 27.907926573] initcall filelock_init+0x0/0x30 returned 0 after 0 msecs
    [ 27.908071327] calling init_script_binfmt+0x0/0x10 @ 1
    [ 27.908165195] initcall init_script_binfmt+0x0/0x10 returned 0 after 0 msecs
    [ 27.908309461] calling init_elf_binfmt+0x0/0x10 @ 1

    Signed-off-by: Frederic Weisbecker
    Acked-by: Steven Rostedt
    Signed-off-by: Ingo Molnar

    Frederic Weisbecker
     
  • Impact: Cleanups on the boot tracer and ftrace

    This patch bring some cleanups about the boot tracer headers. The
    functions and structures of this tracer have nothing related to ftrace
    and should have so their own header file.

    Signed-off-by: Frederic Weisbecker
    Acked-by: Steven Rostedt
    Signed-off-by: Ingo Molnar

    Frederic Weisbecker
     

14 Oct, 2008

2 commits

  • make it a bit more structured hence more readable.

    Signed-off-by: Ingo Molnar

    Ingo Molnar
     
  • Instrument the scheduler activity (sched_switch, migration, wakeups,
    wait for a task, signal delivery) and process/thread
    creation/destruction (fork, exit, kthread stop). Actually, kthread
    creation is not instrumented in this patch because it is architecture
    dependent. It allows to connect tracers such as ftrace which detects
    scheduling latencies, good/bad scheduler decisions. Tools like LTTng can
    export this scheduler information along with instrumentation of the rest
    of the kernel activity to perform post-mortem analysis on the scheduler
    activity.

    About the performance impact of tracepoints (which is comparable to
    markers), even without immediate values optimizations, tests done by
    Hideo Aoki on ia64 show no regression. His test case was using hackbench
    on a kernel where scheduler instrumentation (about 5 events in code
    scheduler code) was added. See the "Tracepoints" patch header for
    performance result detail.

    Changelog :

    - Change instrumentation location and parameter to match ftrace
    instrumentation, previously done with kernel markers.

    [ mingo@elte.hu: conflict resolutions ]
    Signed-off-by: Mathieu Desnoyers
    Acked-by: 'Peter Zijlstra'
    Signed-off-by: Ingo Molnar

    Mathieu Desnoyers