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