26 Oct, 2011

1 commit

  • * 'perf-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (121 commits)
    perf symbols: Increase symbol KSYM_NAME_LEN size
    perf hists browser: Refuse 'a' hotkey on non symbolic views
    perf ui browser: Use libslang to read keys
    perf tools: Fix tracing info recording
    perf hists browser: Elide DSO column when it is set to just one DSO, ditto for threads
    perf hists: Don't consider filtered entries when calculating column widths
    perf hists: Don't decay total_period for filtered entries
    perf hists browser: Honour symbol_conf.show_{nr_samples,total_period}
    perf hists browser: Do not exit on tab key with single event
    perf annotate browser: Don't change selection line when returning from callq
    perf tools: handle endianness of feature bitmap
    perf tools: Add prelink suggestion to dso update message
    perf script: Fix unknown feature comment
    perf hists browser: Apply the dso and thread filters when merging new batches
    perf hists: Move the dso and thread filters from hist_browser
    perf ui browser: Honour the xterm colors
    perf top tui: Give color hints just on the percentage, like on --stdio
    perf ui browser: Make the colors configurable and change the defaults
    perf tui: Remove unneeded call to newtCls on startup
    perf hists: Don't format the percentage on hist_entry__snprintf
    ...

    Fix up conflicts in arch/x86/kernel/kprobes.c manually.

    Ingo's tree did the insane "add volatile to const array", which just
    doesn't make sense ("volatile const"?). But we could remove the const
    *and* make the array volatile to make doubly sure that gcc doesn't
    optimize it away..

    Also fix up kernel/trace/ring_buffer.c non-data-conflicts manually: the
    reader_lock has been turned into a raw lock by the core locking merge,
    and there was a new user of it introduced in this perf core merge. Make
    sure that new use also uses the raw accessor functions.

    Linus Torvalds
     

30 Sep, 2011

1 commit


28 Sep, 2011

1 commit


20 Aug, 2011

1 commit

  • Adding automated tests running as late_initcall. Tests are
    compiled in with CONFIG_FTRACE_STARTUP_TEST option.

    Adding test event "ftrace_test_filter" used to simulate
    filter processing during event occurance.

    String filters are compiled and tested against several
    test events with different values.

    Also testing that evaluation of explicit predicates is ommited
    due to the lazy filter evaluation.

    Signed-off-by: Jiri Olsa
    Link: http://lkml.kernel.org/r/1313072754-4620-11-git-send-email-jolsa@redhat.com
    Signed-off-by: Steven Rostedt

    Jiri Olsa
     

08 Jan, 2011

1 commit


07 Aug, 2010

1 commit

  • …git/tip/linux-2.6-tip

    * 'perf-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip: (162 commits)
    tracing/kprobes: unregister_trace_probe needs to be called under mutex
    perf: expose event__process function
    perf events: Fix mmap offset determination
    perf, powerpc: fsl_emb: Restore setting perf_sample_data.period
    perf, powerpc: Convert the FSL driver to use local64_t
    perf tools: Don't keep unreferenced maps when unmaps are detected
    perf session: Invalidate last_match when removing threads from rb_tree
    perf session: Free the ref_reloc_sym memory at the right place
    x86,mmiotrace: Add support for tracing STOS instruction
    perf, sched migration: Librarize task states and event headers helpers
    perf, sched migration: Librarize the GUI class
    perf, sched migration: Make the GUI class client agnostic
    perf, sched migration: Make it vertically scrollable
    perf, sched migration: Parameterize cpu height and spacing
    perf, sched migration: Fix key bindings
    perf, sched migration: Ignore unhandled task states
    perf, sched migration: Handle ignored migrate out events
    perf: New migration tool overview
    tracing: Drop cpparg() macro
    perf: Use tracepoint_synchronize_unregister() to flush any pending tracepoint call
    ...

    Fix up trivial conflicts in Makefile and drivers/cpufreq/cpufreq.c

    Linus Torvalds
     

05 Aug, 2010

1 commit


20 Jul, 2010

1 commit

  • The sysprof ftrace plugin doesn't seem to be seriously used
    somewhere. There is a branch in the sysprof tree that makes
    an interface to it, but the real sysprof tool uses either its
    own module or perf events.

    Drop the sysprof ftrace plugin then, as it's mostly useless.

    Signed-off-by: Frederic Weisbecker
    Acked-by: Soeren Sandmann
    Cc: Peter Zijlstra
    Cc: Ingo Molnar
    Cc: Steven Rostedt
    Cc: Li Zefan

    Frederic Weisbecker
     

16 Jul, 2010

1 commit

  • The ksym (breakpoint) ftrace plugin has been superseded by perf
    tools that are much more poweful to use the cpu breakpoints.
    This tracer doesn't bring more feature. It has been deprecated
    for a while now, lets remove it.

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

    Frederic Weisbecker
     

09 Jun, 2010

2 commits

  • We have been resisting new ftrace plugins and removing existing
    ones, and kmemtrace has been superseded by kmem trace events
    and perf-kmem, so we remove it.

    Signed-off-by: Li Zefan
    Acked-by: Pekka Enberg
    Acked-by: Eduard - Gabriel Munteanu
    Cc: Ingo Molnar
    Cc: Steven Rostedt
    [ remove kmemtrace from the makefile, handle slob too ]
    Signed-off-by: Frederic Weisbecker

    Li Zefan
     
  • The boot tracer is useless. It simply logs the initcalls
    but in fact these initcalls are also logged through printk
    while using the initcall_debug kernel parameter.

    Nobody seem to be using it so far. Then just remove it.

    Signed-off-by: WANG Cong
    Cc: Chase Douglas
    Cc: Steven Rostedt
    Cc: Ingo Molnar
    Cc: Peter Zijlstra
    Cc: Li Zefan
    LKML-Reference:
    [ remove the hooks in main.c, and the headers ]
    Signed-off-by: Frederic Weisbecker

    Américo Wang
     

26 Mar, 2010

1 commit

  • Support for the PMU's BTS features has been upstreamed in
    v2.6.32, but we still have the old and disabled ptrace-BTS,
    as Linus noticed it not so long ago.

    It's buggy: TIF_DEBUGCTLMSR is trampling all over that MSR without
    regard for other uses (perf) and doesn't provide the flexibility
    needed for perf either.

    Its users are ptrace-block-step and ptrace-bts, since ptrace-bts
    was never used and ptrace-block-step can be implemented using a
    much simpler approach.

    So axe all 3000 lines of it. That includes the *locked_memory*()
    APIs in mm/mlock.c as well.

    Reported-by: Linus Torvalds
    Signed-off-by: Peter Zijlstra
    Cc: Roland McGrath
    Cc: Oleg Nesterov
    Cc: Markus Metzger
    Cc: Steven Rostedt
    Cc: Andrew Morton
    LKML-Reference:
    Signed-off-by: Ingo Molnar

    Peter Zijlstra
     

10 Mar, 2010

1 commit


28 Dec, 2009

1 commit

  • Quoted from Ingo:

    | This reminds me - i think we should eliminate CONFIG_EVENT_PROFILE -
    | it's an unnecessary Kconfig complication. If both PERF_EVENTS and
    | EVENT_TRACING is enabled we should expose generic tracepoints.
    |
    | Nor is it limited to event 'profiling', so it has become a misnomer as
    | well.

    Signed-off-by: Li Zefan
    Cc: Frederic Weisbecker
    Cc: Steven Rostedt
    Cc: Peter Zijlstra
    Cc: Paul Mackerras
    LKML-Reference:
    Signed-off-by: Ingo Molnar

    Li Zefan
     

21 Nov, 2009

1 commit


04 Nov, 2009

1 commit

  • Rename Kprobes-based event tracer to kprobes-based tracing event
    (kprobe-event), since it is not a tracer but an extensible
    tracing event interface.

    This also changes CONFIG_KPROBE_TRACER to CONFIG_KPROBE_EVENT
    and sets it y by default.

    Signed-off-by: Masami Hiramatsu
    Acked-by: Frederic Weisbecker
    Cc: Steven Rostedt
    Cc: Jim Keniston
    Cc: Ananth N Mavinakayanahalli
    Cc: Christoph Hellwig
    Cc: Frank Ch. Eigler
    Cc: Jason Baron
    Cc: K.Prasad
    Cc: Peter Zijlstra
    Cc: Srikar Dronamraju
    LKML-Reference:
    Signed-off-by: Ingo Molnar

    Masami Hiramatsu
     

18 Oct, 2009

1 commit


24 Sep, 2009

1 commit


19 Sep, 2009

1 commit

  • This patch converts the existing power tracer into an event tracer,
    so that power events (C states and frequency changes) can be
    tracked via "perf".

    This also removes the perl script that was used to demo the tracer;
    its functionality is being replaced entirely with timechart.

    Signed-off-by: Arjan van de Ven
    Acked-by: Peter Zijlstra
    Cc: Paul Mackerras
    Cc: Frederic Weisbecker
    LKML-Reference:
    Signed-off-by: Ingo Molnar

    Arjan van de Ven
     

27 Aug, 2009

1 commit

  • Add kprobes-based event tracer on ftrace.

    This tracer is similar to the events tracer which is based on Tracepoint
    infrastructure. Instead of Tracepoint, this tracer is based on kprobes
    (kprobe and kretprobe). It probes anywhere where kprobes can probe(this
    means, all functions body except for __kprobes functions).

    Similar to the events tracer, this tracer doesn't need to be activated
    via current_tracer, instead of that, just set probe points via
    /sys/kernel/debug/tracing/kprobe_events. And you can set filters on each
    probe events via /sys/kernel/debug/tracing/events/kprobes//filter.

    This tracer supports following probe arguments for each probe.

    %REG : Fetch register REG
    sN : Fetch Nth entry of stack (N >= 0)
    sa : Fetch stack address.
    @ADDR : Fetch memory at ADDR (ADDR should be in kernel)
    @SYM[+|-offs] : Fetch memory at SYM +|- offs (SYM should be a data symbol)
    aN : Fetch function argument. (N >= 0)
    rv : Fetch return value.
    ra : Fetch return address.
    +|-offs(FETCHARG) : fetch memory at FETCHARG +|- offs address.

    See Documentation/trace/kprobetrace.txt in the next patch for details.

    Changes from v13:
    - Support 'sa' for stack address.
    - Use call->data instead of container_of() macro.

    [fweisbec@gmail.com: Fixed conflict against latest tracing/core]

    Signed-off-by: Masami Hiramatsu
    Acked-by: Ananth N Mavinakayanahalli
    Cc: Avi Kivity
    Cc: Andi Kleen
    Cc: Christoph Hellwig
    Cc: Frank Ch. Eigler
    Cc: H. Peter Anvin
    Cc: Ingo Molnar
    Cc: Jason Baron
    Cc: Jim Keniston
    Cc: K.Prasad
    Cc: Lai Jiangshan
    Cc: Li Zefan
    Cc: Przemysław Pawełczyk
    Cc: Roland McGrath
    Cc: Sam Ravnborg
    Cc: Srikar Dronamraju
    Cc: Steven Rostedt
    Cc: Tom Zanussi
    Cc: Vegard Nossum
    LKML-Reference:
    Signed-off-by: Frederic Weisbecker

    Masami Hiramatsu
     

17 Jun, 2009

1 commit

  • Conflicts:
    arch/x86/Kconfig
    arch/x86/kernel/traps.c
    arch/x86/power/cpu.c
    arch/x86/power/cpu_32.c
    kernel/Makefile

    Semantic conflict:
    arch/x86/kernel/hw_breakpoint.c

    Merge reason: Resolve the conflicts, move from put_cpu_no_sched() to
    put_cpu() in arch/x86/kernel/hw_breakpoint.c.

    Signed-off-by: Ingo Molnar

    Ingo Molnar
     

10 Jun, 2009

1 commit

  • TRACE_EVENT is a more generic way to define tracepoints. Doing so adds
    these new capabilities to this tracepoint:

    - zero-copy and per-cpu splice() tracing
    - binary tracing without printf overhead
    - structured logging records exposed under /debug/tracing/events
    - trace events embedded in function tracer output and other plugins
    - user-defined, per tracepoint filter expressions
    ...

    Cons:

    - no dev_t info for the output of plug, unplug_timer and unplug_io events.
    no dev_t info for getrq and sleeprq events if bio == NULL.
    no dev_t info for rq_abort,...,rq_requeue events if rq->rq_disk == NULL.

    This is mainly because we can't get the deivce from a request queue.
    But this may change in the future.

    - A packet command is converted to a string in TP_assign, not TP_print.
    While blktrace do the convertion just before output.

    Since pc requests should be rather rare, this is not a big issue.

    - In blktrace, an event can have 2 different print formats, but a TRACE_EVENT
    has a unique format, which means we have some unused data in a trace entry.

    The overhead is minimized by using __dynamic_array() instead of __array().

    I've benchmarked the ioctl blktrace vs the splice based TRACE_EVENT tracing:

    dd dd + ioctl blktrace dd + TRACE_EVENT (splice)
    1 7.36s, 42.7 MB/s 7.50s, 42.0 MB/s 7.41s, 42.5 MB/s
    2 7.43s, 42.3 MB/s 7.48s, 42.1 MB/s 7.43s, 42.4 MB/s
    3 7.38s, 42.6 MB/s 7.45s, 42.2 MB/s 7.41s, 42.5 MB/s

    So the overhead of tracing is very small, and no regression when using
    those trace events vs blktrace.

    And the binary output of TRACE_EVENT is much smaller than blktrace:

    # ls -l -h
    -rw-r--r-- 1 root root 8.8M 06-09 13:24 sda.blktrace.0
    -rw-r--r-- 1 root root 195K 06-09 13:24 sda.blktrace.1
    -rw-r--r-- 1 root root 2.7M 06-09 13:25 trace_splice.out

    Following are some comparisons between TRACE_EVENT and blktrace:

    plug:
    kjournald-480 [000] 303.084981: block_plug: [kjournald]
    kjournald-480 [000] 303.084981: 8,0 P N [kjournald]

    unplug_io:
    kblockd/0-118 [000] 300.052973: block_unplug_io: [kblockd/0] 1
    kblockd/0-118 [000] 300.052974: 8,0 U N [kblockd/0] 1

    remap:
    kjournald-480 [000] 303.085042: block_remap: 8,0 W 102736992 + 8 v3:

    - use the newly introduced __dynamic_array().

    Changelog from v1 -> v2:

    - use __string() instead of __array() to minimize the memory required
    to store hex dump of rq->cmd().

    - support large pc requests.

    - add missing blk_fill_rwbs_rq() in block_rq_requeue TRACE_EVENT.

    - some cleanups.

    Signed-off-by: Li Zefan
    LKML-Reference:
    Signed-off-by: Steven Rostedt

    Li Zefan
     

03 Jun, 2009

1 commit


07 May, 2009

1 commit


06 May, 2009

1 commit

  • This patch adds code that can benchmark the ring buffer as well as
    test it. This code can be compiled into the kernel (not recommended)
    or as a module.

    A separate ring buffer is used to not interfer with other users, like
    ftrace. It creates a producer and a consumer (option to disable creation
    of the consumer) and will run for 10 seconds, then sleep for 10 seconds
    and then repeat.

    While running, the producer will write 10 byte loads into the ring
    buffer with just putting in the current CPU number. The reader will
    continually try to read the buffer. The reader will alternate from reading
    the buffer via event by event, or by full pages.

    The output is a pr_info, thus it will fill up the syslogs.

    Starting ring buffer hammer
    End ring buffer hammer
    Time: 9000349 (usecs)
    Overruns: 12578640
    Read: 5358440 (by events)
    Entries: 0
    Total: 17937080
    Missed: 0
    Hit: 17937080
    Entries per millisec: 1993
    501 ns per entry
    Sleeping for 10 secs
    Starting ring buffer hammer
    End ring buffer hammer
    Time: 9936350 (usecs)
    Overruns: 0
    Read: 28146644 (by pages)
    Entries: 74
    Total: 28146718
    Missed: 0
    Hit: 28146718
    Entries per millisec: 2832
    353 ns per entry
    Sleeping for 10 secs

    Time: is the time the test ran
    Overruns: the number of events that were overwritten and not read
    Read: the number of events read (either by pages or events)
    Entries: the number of entries left in the buffer
    (the by pages will only read full pages)
    Total: Entries + Read + Overruns
    Missed: the number of entries that failed to write
    Hit: the number of entries that were written

    The above example shows that it takes ~353 nanosecs per entry when
    there is a reader, reading by pages (and no overruns)

    The event by event reader slowed the producer down to 501 nanosecs.

    [ Impact: see how changes to the ring buffer affect stability and performance ]

    Signed-off-by: Steven Rostedt

    Steven Rostedt
     

15 Apr, 2009

2 commits

  • This patch moves the ftrace creation into include/trace/ftrace.h and
    simplifies the work of developers in adding new tracepoints.
    Just the act of creating the trace points in include/trace and including
    define_trace.h will create the events in the debugfs/tracing/events
    directory.

    This patch removes the need of include/trace/trace_events.h

    Signed-off-by: Steven Rostedt

    Steven Rostedt
     
  • Jeremy Fitzhardinge reported this build failure:

    LD .tmp_vmlinux1
    arch/x86/kernel/built-in.o: In function `ds_take_timestamp':
    git/linux/arch/x86/kernel/ds.c:1380: undefined reference to `trace_clock_global'
    git/linux/arch/x86/kernel/ds.c:1380: undefined reference to `trace_clock_global'

    Which is due to !CONFIG_TRACING && CONFIG_X86_DS=y.

    Expose the trace clock code to CONFIG_X86_DS as well.

    [ Unfortunately librarizing doesnt work well - ancient architectures
    with no raw_local_irq_save() primitive break the build. ]

    Reported-by: Jeremy Fitzhardinge
    LKML-Reference:
    Signed-off-by: Ingo Molnar

    Ingo Molnar
     

14 Apr, 2009

1 commit

  • Add a new config option, CONFIG_EVENT_TRACING that gets selected
    when CONFIG_TRACING is selected and adds everything needed by the stuff
    in trace_export - basically all the event tracing support needed by e.g.
    bprint, minus the actual events, which are only included if
    CONFIG_EVENT_TRACER is selected.

    So CONFIG_EVENT_TRACER can be used to turn on or off the generated events
    (what I think of as the 'event tracer'), while CONFIG_EVENT_TRACING turns
    on or off the base event tracing support used by both the event tracer and
    the other things such as bprint that can't be configured out.

    Signed-off-by: Tom Zanussi
    Cc: Steven Rostedt
    Cc: fweisbec@gmail.com
    LKML-Reference:
    Signed-off-by: Ingo Molnar

    Tom Zanussi
     

23 Mar, 2009

1 commit

  • This patch adds per-event filtering to the event tracing subsystem.

    It adds a 'filter' debugfs file to each event directory. This file can
    be written to to set filters; reading from it will display the current
    set of filters set for that event.

    Basically, any field listed in the 'format' file for an event can be
    filtered on (including strings, but not yet other array types) using
    either matching ('==') or non-matching ('!=') 'predicates'. A
    'predicate' can be either a single expression:

    # echo pid != 0 > filter

    # cat filter
    pid != 0

    or a compound expression of up to 8 sub-expressions combined using '&&'
    or '||':

    # echo comm == Xorg > filter
    # echo "&& sig != 29" > filter

    # cat filter
    comm == Xorg
    && sig != 29

    Only events having field values matching an expression will be available
    in the trace output; non-matching events are discarded.

    Note that a compound expression is built up by echoing each
    sub-expression separately - it's not the most efficient way to do
    things, but it keeps the parser simple and assumes that compound
    expressions will be relatively uncommon. In any case, a subsequent
    patch introducing a way to set filters for entire subsystems should
    mitigate any need to do this for lots of events.

    Setting a filter without an '&&' or '||' clears the previous filter
    completely and sets the filter to the new expression:

    # cat filter
    comm == Xorg
    && sig != 29

    # echo comm != Xorg

    # cat filter
    comm != Xorg

    To clear a filter, echo 0 to the filter file:

    # echo 0 > filter
    # cat filter
    none

    The limit of 8 predicates for a compound expression is arbitrary - for
    efficiency, it's implemented as an array of pointers to predicates, and
    8 seemed more than enough for any filter...

    Signed-off-by: Tom Zanussi
    Acked-by: Frederic Weisbecker
    LKML-Reference:
    Signed-off-by: Ingo Molnar

    Tom Zanussi
     

20 Mar, 2009

1 commit

  • Impact: new tracing infrastructure feature

    Provide infrastructure to generate software perf counter events
    from tracepoints.

    Signed-off-by: Peter Zijlstra
    Cc: Paul Mackerras
    Cc: Steven Rostedt
    LKML-Reference:
    Signed-off-by: Ingo Molnar

    Peter Zijlstra
     

13 Mar, 2009

1 commit


07 Mar, 2009

2 commits

  • Impact: faster and lighter tracing

    Now that we have trace_bprintk() which is faster and consume lesser
    memory than trace_printk() and has the same purpose, we can now drop
    the old implementation in favour of the binary one from trace_bprintk(),
    which means we move all the implementation of trace_bprintk() to
    trace_printk(), so the Api doesn't change except that we must now use
    trace_seq_bprintk() to print the TRACE_PRINT entries.

    Some changes result of this:

    - Previously, trace_bprintk depended of a single tracer and couldn't
    work without. This tracer has been dropped and the whole implementation
    of trace_printk() (like the module formats management) is now integrated
    in the tracing core (comes with CONFIG_TRACING), though we keep the file
    trace_printk (previously trace_bprintk.c) where we can find the module
    management. Thus we don't overflow trace.c

    - changes some parts to use trace_seq_bprintk() to print TRACE_PRINT entries.

    - change a bit trace_printk/trace_vprintk macros to support non-builtin formats
    constants, and fix 'const' qualifiers warnings. But this is all transparent for
    developers.

    - etc...

    V2:

    - Rebase against last changes
    - Fix mispell on the changelog

    V3:

    - Rebase against last changes (moving trace_printk() to kernel.h)

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

    Frederic Weisbecker
     
  • Impact: save on memory for tracing

    Current tracers are typically using a struct(like struct ftrace_entry,
    struct ctx_switch_entry, struct special_entr etc...)to record a binary
    event. These structs can only record a their own kind of events.
    A new kind of tracer need a new struct and a lot of code too handle it.

    So we need a generic binary record for events. This infrastructure
    is for this purpose.

    [fweisbec@gmail.com: rebase against latest -tip, make it safe while sched
    tracing as reported by Steven Rostedt]

    Signed-off-by: Lai Jiangshan
    Signed-off-by: Frederic Weisbecker
    Acked-by: Steven Rostedt
    LKML-Reference:
    Signed-off-by: Ingo Molnar

    Lai Jiangshan
     

06 Mar, 2009

1 commit

  • Impact: allow user apps to read binary format of basic ftrace entries

    Currently, only defined raw events export their formats so a binary
    reader can parse them. There's no reason that the default ftrace entries
    can't export their formats.

    This patch adds a subsystem called "ftrace" in the events directory
    that includes the ftrace entries for basic ftrace recorded items.

    These only have three files in the events directory:

    type : printf
    available_types : printf
    format : format for the event entry

    For example:

    # cat /debug/tracing/events/ftrace/wakeup/format
    name: wakeup
    ID: 3
    format:
    field:unsigned char type; offset:0; size:1;
    field:unsigned char flags; offset:1; size:1;
    field:unsigned char preempt_count; offset:2; size:1;
    field:int pid; offset:4; size:4;
    field:int tgid; offset:8; size:4;

    field:unsigned int prev_pid; offset:12; size:4;
    field:unsigned char prev_prio; offset:16; size:1;
    field:unsigned char prev_state; offset:17; size:1;
    field:unsigned int next_pid; offset:20; size:4;
    field:unsigned char next_prio; offset:24; size:1;
    field:unsigned char next_state; offset:25; size:1;
    field:unsigned int next_cpu; offset:28; size:4;

    print fmt: "%u:%u:%u ==+ %u:%u:%u [%03u]"

    Signed-off-by: Steven Rostedt

    Steven Rostedt
     

27 Feb, 2009

1 commit

  • Impact: implement new tracing timestamp APIs

    Add three trace clock variants, with differing scalability/precision
    tradeoffs:

    - local: CPU-local trace clock
    - medium: scalable global clock with some jitter
    - global: globally monotonic, serialized clock

    Make the ring-buffer use the local trace clock internally.

    Acked-by: Peter Zijlstra
    Acked-by: Steven Rostedt
    Signed-off-by: Ingo Molnar

    Ingo Molnar
     

25 Feb, 2009

2 commits

  • This patch changes the trace/sched.h to use the DECLARE_TRACE_FMT
    such that they are automatically registered with the event tracer.

    And it also adds the tracing sched headers to kernel/trace/events.c

    Signed-off-by: Steven Rostedt

    Steven Rostedt
     
  • This patch creates the event tracing infrastructure of ftrace.
    It will create the files:

    /debug/tracing/available_events
    /debug/tracing/set_event

    The available_events will list the trace points that have been
    registered with the event tracer.

    set_events will allow the user to enable or disable an event hook.

    example:

    # echo sched_wakeup > /debug/tracing/set_event

    Will enable the sched_wakeup event (if it is registered).

    # echo "!sched_wakeup" >> /debug/tracing/set_event

    Will disable the sched_wakeup event (and only that event).

    # echo > /debug/tracing/set_event

    Will disable all events (notice the '>')

    # cat /debug/tracing/available_events > /debug/tracing/set_event

    Will enable all registered event hooks.

    Signed-off-by: Steven Rostedt

    Steven Rostedt
     

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
     

06 Jan, 2009

1 commit