07 Aug, 2014

1 commit

  • Until now, the reporting from trace-vmscan-postprocess.pl is not very
    useful because we cannot directly use this script for checking the
    file/anon ratio of scanning. This patch aims to report respectively the
    number of file/anon pages which were scanned/reclaimed by kswapd or
    direct-reclaim. Sample output is usually something like the following.

    Summary
    Direct reclaims: 8823
    Direct reclaim pages scanned: 2438797
    Direct reclaim file pages scanned: 1315200
    Direct reclaim anon pages scanned: 1123597
    Direct reclaim pages reclaimed: 446139
    Direct reclaim file pages reclaimed: 378668
    Direct reclaim anon pages reclaimed: 67471
    Direct reclaim write file sync I/O: 0
    Direct reclaim write anon sync I/O: 0
    Direct reclaim write file async I/O: 0
    Direct reclaim write anon async I/O: 4240
    Wake kswapd requests: 122310
    Time stalled direct reclaim: 13.78 seconds

    Kswapd wakeups: 25817
    Kswapd pages scanned: 170779115
    Kswapd file pages scanned: 162725123
    Kswapd anon pages scanned: 8053992
    Kswapd pages reclaimed: 129065738
    Kswapd file pages reclaimed: 128500930
    Kswapd anon pages reclaimed: 564808
    Kswapd reclaim write file sync I/O: 0
    Kswapd reclaim write anon sync I/O: 0
    Kswapd reclaim write file async I/O: 36
    Kswapd reclaim write anon async I/O: 730730
    Time kswapd awake: 1015.50 seconds

    Signed-off-by: Chen Yucong
    Cc: Mel Gorman
    Cc: Johannes Weiner
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Chen Yucong
     

05 Aug, 2014

2 commits

  • Pull scheduler updates from Ingo Molnar:

    - Move the nohz kick code out of the scheduler tick to a dedicated IPI,
    from Frederic Weisbecker.

    This necessiated quite some background infrastructure rework,
    including:

    * Clean up some irq-work internals
    * Implement remote irq-work
    * Implement nohz kick on top of remote irq-work
    * Move full dynticks timer enqueue notification to new kick
    * Move multi-task notification to new kick
    * Remove unecessary barriers on multi-task notification

    - Remove proliferation of wait_on_bit() action functions and allow
    wait_on_bit_action() functions to support a timeout. (Neil Brown)

    - Another round of sched/numa improvements, cleanups and fixes. (Rik
    van Riel)

    - Implement fast idling of CPUs when the system is partially loaded,
    for better scalability. (Tim Chen)

    - Restructure and fix the CPU hotplug handling code that may leave
    cfs_rq and rt_rq's throttled when tasks are migrated away from a dead
    cpu. (Kirill Tkhai)

    - Robustify the sched topology setup code. (Peterz Zijlstra)

    - Improve sched_feat() handling wrt. static_keys (Jason Baron)

    - Misc fixes.

    * 'sched-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (37 commits)
    sched/fair: Fix 'make xmldocs' warning caused by missing description
    sched: Use macro for magic number of -1 for setparam
    sched: Robustify topology setup
    sched: Fix sched_setparam() policy == -1 logic
    sched: Allow wait_on_bit_action() functions to support a timeout
    sched: Remove proliferation of wait_on_bit() action functions
    sched/numa: Revert "Use effective_load() to balance NUMA loads"
    sched: Fix static_key race with sched_feat()
    sched: Remove extra static_key*() function indirection
    sched/rt: Fix replenish_dl_entity() comments to match the current upstream code
    sched: Transform resched_task() into resched_curr()
    sched/deadline: Kill task_struct->pi_top_task
    sched: Rework check_for_tasks()
    sched/rt: Enqueue just unthrottled rt_rq back on the stack in __disable_runtime()
    sched/fair: Disable runtime_enabled on dying rq
    sched/numa: Change scan period code to match intent
    sched/numa: Rework best node setting in task_numa_migrate()
    sched/numa: Examine a task move when examining a task swap
    sched/numa: Simplify task_numa_compare()
    sched/numa: Use effective_load() to balance NUMA loads
    ...

    Linus Torvalds
     
  • Pull tracing updates from Steven Rostedt:
    "This pull request has a lot of work done. The main thing is the
    changes to the ftrace function callback infrastructure. It's
    introducing a way to allow different functions to call directly
    different trampolines instead of all calling the same "mcount" one.

    The only user of this for now is the function graph tracer, which
    always had a different trampoline, but the function tracer trampoline
    was called and did basically nothing, and then the function graph
    tracer trampoline was called. The difference now, is that the
    function graph tracer trampoline can be called directly if a function
    is only being traced by the function graph trampoline. If function
    tracing is also happening on the same function, the old way is still
    done.

    The accounting for this takes up more memory when function graph
    tracing is activated, as it needs to keep track of which functions it
    uses. I have a new way that wont take as much memory, but it's not
    ready yet for this merge window, and will have to wait for the next
    one.

    Another big change was the removal of the ftrace_start/stop() calls
    that were used by the suspend/resume code that stopped function
    tracing when entering into suspend and resume paths. The stop of
    ftrace was done because there was some function that would crash the
    system if one called smp_processor_id()! The stop/start was a big
    hammer to solve the issue at the time, which was when ftrace was first
    introduced into Linux. Now ftrace has better infrastructure to debug
    such issues, and I found the problem function and labeled it with
    "notrace" and function tracing can now safely be activated all the way
    down into the guts of suspend and resume

    Other changes include clean ups of uprobe code, clean up of the
    trace_seq() code, and other various small fixes and clean ups to
    ftrace and tracing"

    * tag 'trace-3.17' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace: (57 commits)
    ftrace: Add warning if tramp hash does not match nr_trampolines
    ftrace: Fix trampoline hash update check on rec->flags
    ring-buffer: Use rb_page_size() instead of open coded head_page size
    ftrace: Rename ftrace_ops field from trampolines to nr_trampolines
    tracing: Convert local function_graph functions to static
    ftrace: Do not copy old hash when resetting
    tracing: let user specify tracing_thresh after selecting function_graph
    ring-buffer: Always run per-cpu ring buffer resize with schedule_work_on()
    tracing: Remove function_trace_stop and HAVE_FUNCTION_TRACE_MCOUNT_TEST
    s390/ftrace: remove check of obsolete variable function_trace_stop
    arm64, ftrace: Remove check of obsolete variable function_trace_stop
    Blackfin: ftrace: Remove check of obsolete variable function_trace_stop
    metag: ftrace: Remove check of obsolete variable function_trace_stop
    microblaze: ftrace: Remove check of obsolete variable function_trace_stop
    MIPS: ftrace: Remove check of obsolete variable function_trace_stop
    parisc: ftrace: Remove check of obsolete variable function_trace_stop
    sh: ftrace: Remove check of obsolete variable function_trace_stop
    sparc64,ftrace: Remove check of obsolete variable function_trace_stop
    tile: ftrace: Remove check of obsolete variable function_trace_stop
    ftrace: x86: Remove check of obsolete variable function_trace_stop
    ...

    Linus Torvalds
     

19 Jul, 2014

1 commit


16 Jul, 2014

2 commits

  • …ger tree-wide changes

    Signed-off-by: Ingo Molnar <mingo@kernel.org>

    Ingo Molnar
     
  • We always use resched_task() with rq->curr argument.
    It's not possible to reschedule any task but rq's current.

    The patch introduces resched_curr(struct rq *) to
    replace all of the repeating patterns. The main aim
    is cleanup, but there is a little size profit too:

    (before)
    $ size kernel/sched/built-in.o
    text data bss dec hex filename
    155274 16445 7042 178761 2ba49 kernel/sched/built-in.o

    $ size vmlinux
    text data bss dec hex filename
    7411490 1178376 991232 9581098 92322a vmlinux

    (after)
    $ size kernel/sched/built-in.o
    text data bss dec hex filename
    155130 16445 7042 178617 2b9b9 kernel/sched/built-in.o

    $ size vmlinux
    text data bss dec hex filename
    7411362 1178376 991232 9580970 9231aa vmlinux

    I was choosing between resched_curr() and resched_rq(),
    and the first name looks better for me.

    A little lie in Documentation/trace/ftrace.txt. I have not
    actually collected the tracing again. With a hope the patch
    won't make execution times much worse :)

    Signed-off-by: Kirill Tkhai
    Signed-off-by: Peter Zijlstra
    Cc: Linus Torvalds
    Cc: Randy Dunlap
    Cc: Steven Rostedt
    Link: http://lkml.kernel.org/r/20140628200219.1778.18735.stgit@localhost
    Signed-off-by: Ingo Molnar

    Kirill Tkhai
     

04 Jul, 2014

1 commit

  • When using trace-vmscan-postprocess.pl for checking the file/anon rate
    of scanning, we can find that it can not be performed. At the same
    time, the following message will be reported:

    WARNING: Format not as expected for event vmscan/mm_vmscan_lru_isolate
    'file' != 'contig_taken' Fewer fields than expected in format at
    ./trace-vmscan-postprocess.pl line 171, line 76.

    In trace-vmscan-postprocess.pl, (contig_taken, contig_dirty, and
    contig_failed) are be associated respectively to (nr_lumpy_taken,
    nr_lumpy_dirty, and nr_lumpy_failed) for lumpy reclaim. Via commit
    c53919adc045 ("mm: vmscan: remove lumpy reclaim"), lumpy reclaim had
    already been removed by Mel, but the update for
    trace-vmscan-postprocess.pl was missed.

    Signed-off-by: Chen Yucong
    Cc: Mel Gorman
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Chen Yucong
     

10 Jun, 2014

1 commit

  • Pull tracing updates from Steven Rostedt:
    "Lots of tweaks, small fixes, optimizations, and some helper functions
    to help out the rest of the kernel to ease their use of trace events.

    The big change for this release is the allowing of other tracers, such
    as the latency tracers, to be used in the trace instances and allow
    for function or function graph tracing to be in the top level
    simultaneously"

    * tag 'trace-3.16' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace: (44 commits)
    tracing: Fix memory leak on instance deletion
    tracing: Fix leak of ring buffer data when new instances creation fails
    tracing/kprobes: Avoid self tests if tracing is disabled on boot up
    tracing: Return error if ftrace_trace_arrays list is empty
    tracing: Only calculate stats of tracepoint benchmarks for 2^32 times
    tracing: Convert stddev into u64 in tracepoint benchmark
    tracing: Introduce saved_cmdlines_size file
    tracing: Add __get_dynamic_array_len() macro for trace events
    tracing: Remove unused variable in trace_benchmark
    tracing: Eliminate double free on failure of allocation on boot up
    ftrace/x86: Call text_ip_addr() instead of the duplicated code
    tracing: Print max callstack on stacktrace bug
    tracing: Move locking of trace_cmdline_lock into start/stop seq calls
    tracing: Try again for saved cmdline if failed due to locking
    tracing: Have saved_cmdlines use the seq_read infrastructure
    tracing: Add tracepoint benchmark tracepoint
    tracing: Print nasty banner when trace_printk() is in use
    tracing: Add funcgraph_tail option to print function name after closing braces
    tracing: Eliminate duplicate TRACE_GRAPH_PRINT_xx defines
    tracing: Add __bitmask() macro to trace events to cpumasks and other bitmasks
    ...

    Linus Torvalds
     

04 Jun, 2014

1 commit

  • Pull trivial tree changes from Jiri Kosina:
    "Usual pile of patches from trivial tree that make the world go round"

    * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial: (23 commits)
    staging: go7007: remove reference to CONFIG_KMOD
    aic7xxx: Remove obsolete preprocessor define
    of: dma: doc fixes
    doc: fix incorrect formula to calculate CommitLimit value
    doc: Note need of bc in the kernel build from 3.10 onwards
    mm: Fix printk typo in dmapool.c
    modpost: Fix comment typo "Modules.symvers"
    Kconfig.debug: Grammar s/addition/additional/
    wimax: Spelling s/than/that/, wording s/destinatary/recipient/
    aic7xxx: Spelling s/termnation/termination/
    arm64: mm: Remove superfluous "the" in comment
    of: Spelling s/anonymouns/anonymous/
    dma: imx-sdma: Spelling s/determnine/determine/
    ath10k: Improve grammar in comments
    ath6kl: Spelling s/determnine/determine/
    of: Improve grammar for of_alias_get_id() documentation
    drm/exynos: Spelling s/contro/control/
    radio-bcm2048.c: fix wrong overflow check
    doc: printk-formats: do not mention casts for u64/s64
    doc: spelling error changes
    ...

    Linus Torvalds
     

21 May, 2014

1 commit

  • In the function-graph tracer, add a funcgraph_tail option
    to print the function name on all } lines, not just
    functions whose first line is no longer in the trace
    buffer.

    If a function calls other traced functions, its total
    time appears on its } line. This change allows grep
    to be used to determine the function for which the
    line corresponds.

    Update Documentation/trace/ftrace.txt to describe
    this new option.

    Link: http://lkml.kernel.org/p/20140520221041.8359.6782.stgit@beardog.cce.hp.com

    Signed-off-by: Robert Elliott
    Signed-off-by: Steven Rostedt

    Robert Elliott
     

08 May, 2014

1 commit

  • There are some code paths in the kernel that need to do some preparations
    before it calls a tracepoint. As that code is worthless overhead when
    the tracepoint is not enabled, it would be prudent to have that code
    only run when the tracepoint is active. To accomplish this, all tracepoints
    now get a static inline function called "trace__enabled()"
    which returns true when the tracepoint is enabled and false otherwise.

    As an added bonus, that function uses the static_key of the tracepoint
    such that no branch is needed.

    if (trace_mytracepoint_enabled()) {
    arg = process_tp_arg();
    trace_mytracepoint(arg);
    }

    Will keep the "process_tp_arg()" (which may be expensive to run) from
    being executed when the tracepoint isn't enabled.

    It's best to encapsulate the tracepoint itself in the if statement
    just to keep races. For example, if you had:

    if (trace_mytracepoint_enabled())
    arg = process_tp_arg();
    trace_mytracepoint(arg);

    There's a chance that the tracepoint could be enabled just after the
    if statement, and arg will be undefined when calling the tracepoint.

    Link: http://lkml.kernel.org/r/20140506094407.507b6435@gandalf.local.home

    Acked-by: Mathieu Desnoyers
    Signed-off-by: Steven Rostedt

    Steven Rostedt (Red Hat)
     

05 May, 2014

1 commit


04 Apr, 2014

1 commit

  • Pull tracing updates from Steven Rostedt:
    "Most of the changes were largely clean ups, and some documentation.
    But there were a few features that were added:

    Uprobes now work with event triggers and multi buffers and have
    support under ftrace and perf.

    The big feature is that the function tracer can now be used within the
    multi buffer instances. That is, you can now trace some functions in
    one buffer, others in another buffer, all functions in a third buffer
    and so on. They are basically agnostic from each other. This only
    works for the function tracer and not for the function graph trace,
    although you can have the function graph tracer running in the top
    level buffer (or any tracer for that matter) and have different
    function tracing going on in the sub buffers"

    * tag 'trace-3.15' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace: (45 commits)
    tracing: Add BUG_ON when stack end location is over written
    tracepoint: Remove unused API functions
    Revert "tracing: Move event storage for array from macro to standalone function"
    ftrace: Constify ftrace_text_reserved
    tracepoints: API doc update to tracepoint_probe_register() return value
    tracepoints: API doc update to data argument
    ftrace: Fix compilation warning about control_ops_free
    ftrace/x86: BUG when ftrace recovery fails
    ftrace: Warn on error when modifying ftrace function
    ftrace: Remove freelist from struct dyn_ftrace
    ftrace: Do not pass data to ftrace_dyn_arch_init
    ftrace: Pass retval through return in ftrace_dyn_arch_init()
    ftrace: Inline the code from ftrace_dyn_table_alloc()
    ftrace: Cleanup of global variables ftrace_new_pgs and ftrace_update_cnt
    tracing: Evaluate len expression only once in __dynamic_array macro
    tracing: Correctly expand len expressions from __dynamic_array macro
    tracing/module: Replace include of tracepoint.h with jump_label.h in module.h
    tracing: Fix event header migrate.h to include tracepoint.h
    tracing: Fix event header writeback.h to include tracepoint.h
    tracing: Warn if a tracepoint is not set via debugfs
    ...

    Linus Torvalds
     

03 Apr, 2014

1 commit

  • Pull trivial tree updates from Jiri Kosina:
    "Usual rocket science -- mostly documentation and comment updates"

    * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial:
    sparse: fix comment
    doc: fix double words
    isdn: capi: fix "CAPI_VERSION" comment
    doc: DocBook: Fix typos in xml and template file
    Bluetooth: add module name for btwilink
    driver core: unexport static function create_syslog_header
    mmc: core: typo fix in printk specifier
    ARM: spear: clean up editing mistake
    net-sysfs: fix comment typo 'CONFIG_SYFS'
    doc: Insert MODULE_ in module-signing macros
    Documentation: update URL to hfsplus Technote 1150
    gpio: update path to documentation
    ixgbe: Fix format string in ixgbe_fcoe.
    Kconfig: Remove useless "default N" lines
    user_namespace.c: Remove duplicated word in comment
    CREDITS: fix formatting
    treewide: Fix typo in Documentation/DocBook
    mm: Fix warning on make htmldocs caused by slab.c
    ata: ata-samsung_cf: cleanup in header file
    idr: remove unused prototype of idr_free()

    Linus Torvalds
     

21 Mar, 2014

1 commit


07 Mar, 2014

2 commits

  • As the data parameter is not really used by any ftrace_dyn_arch_init,
    remove that from ftrace_dyn_arch_init. This also removes the addr
    local variable from ftrace_init which is now unused.

    Note the documentation was imprecise as it did not suggest to set
    (*data) to 0.

    Link: http://lkml.kernel.org/r/1393268401-24379-4-git-send-email-jslaby@suse.cz

    Cc: Frederic Weisbecker
    Cc: Ingo Molnar
    Cc: linux-arch@vger.kernel.org
    Signed-off-by: Jiri Slaby
    Signed-off-by: Steven Rostedt

    Jiri Slaby
     
  • No architecture uses the "data" parameter in ftrace_dyn_arch_init() in any
    way, it just sets the value to 0. And this is used as a return value
    in the caller -- ftrace_init, which just checks the retval against
    zero.

    Note there is also "return 0" in every ftrace_dyn_arch_init. So it is
    enough to check the retval and remove all the indirect sets of data on
    all archs.

    Link: http://lkml.kernel.org/r/1393268401-24379-3-git-send-email-jslaby@suse.cz

    Cc: linux-arch@vger.kernel.org
    Signed-off-by: Jiri Slaby
    Signed-off-by: Steven Rostedt

    Jiri Slaby
     

11 Feb, 2014

1 commit

  • Rename symbols, variables, functions and structure fields related do
    the resume latency device PM QoS type so that it is clear where they
    belong (in particular, to avoid confusion with the latency tolerance
    device PM QoS type introduced by a subsequent changeset).

    Update the PM QoS documentation to better reflect its current state.

    Signed-off-by: Rafael J. Wysocki

    Rafael J. Wysocki
     

24 Jan, 2014

1 commit


03 Jan, 2014

3 commits

  • Enable to fetch data from a file offset. Currently it only supports
    fetching from same binary uprobe set. It'll translate the file offset
    to a proper virtual address in the process.

    The syntax is "@+OFFSET" as it does similar to normal memory fetching
    (@ADDR) which does no address translation.

    Suggested-by: Oleg Nesterov
    Acked-by: Masami Hiramatsu
    Acked-by: Oleg Nesterov
    Cc: Srikar Dronamraju
    Cc: zhangwei(Jovi)
    Cc: Arnaldo Carvalho de Melo
    Signed-off-by: Namhyung Kim

    Namhyung Kim
     
  • Enable to fetch other types of argument for the uprobes. IOW, we can
    access stack, memory, deref, bitfield and retval from uprobes now.

    The format for the argument types are same as kprobes (but @SYMBOL
    type is not supported for uprobes), i.e:

    @ADDR : Fetch memory at ADDR
    $stackN : Fetch Nth entry of stack (N >= 0)
    $stack : Fetch stack address
    $retval : Fetch return value
    +|-offs(FETCHARG) : Fetch memory at FETCHARG +|- offs address

    Note that the retval only can be used with uretprobes.

    Original-patch-by: Hyeoncheol Lee
    Acked-by: Masami Hiramatsu
    Acked-by: Oleg Nesterov
    Cc: Srikar Dronamraju
    Cc: Oleg Nesterov
    Cc: zhangwei(Jovi)
    Cc: Arnaldo Carvalho de Melo
    Signed-off-by: Hyeoncheol Lee
    Signed-off-by: Namhyung Kim

    Namhyung Kim
     
  • The uprobe syntax requires an offset after a file path not a symbol.

    Reviewed-by: Masami Hiramatsu
    Acked-by: Oleg Nesterov
    Acked-by: Srikar Dronamraju
    Cc: zhangwei(Jovi)
    Cc: Arnaldo Carvalho de Melo
    Signed-off-by: Namhyung Kim

    Namhyung Kim
     

22 Dec, 2013

1 commit

  • Provide a basic overview of trace event triggers and document the
    available trigger commands, along with a few simple examples.

    Link: http://lkml.kernel.org/r/2595dd9196d7b553049611f2a3f849ca75d650a2.1382622043.git.tom.zanussi@linux.intel.com

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

    Tom Zanussi
     

13 Nov, 2013

1 commit

  • Existing tracepoint documentation doesn't mention the popular
    TRACE_EVENT macro. Since an excellent series of articles on proper
    usage already exists, respective links are added to the existing
    documentation.

    Signed-off-by: Stefan Raspl
    Cc: Rob Landley
    Cc: Jiri Kosina
    Acked-by: Mathieu Desnoyers
    Cc: Zoltan Kiss
    Cc: Steven Rostedt
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Stefan Raspl
     

11 Nov, 2013

1 commit

  • Since the introduction of PREEMPT_NEED_RESCHED in:

    f27dde8deef3 ("sched: Add NEED_RESCHED to the preempt_count")

    we need to be able to look at both TIF_NEED_RESCHED and
    PREEMPT_NEED_RESCHED to understand the full preemption behaviour.

    Add it to the trace output.

    Signed-off-by: Peter Zijlstra
    Acked-by: Steven Rostedt
    Cc: Fengguang Wu
    Cc: Huang Ying
    Cc: Yuanhan Liu
    Link: http://lkml.kernel.org/r/20131004152826.GP3081@twins.programming.kicks-ass.net
    Signed-off-by: Ingo Molnar

    Peter Zijlstra
     

27 Aug, 2013

1 commit


20 Aug, 2013

1 commit


12 Jul, 2013

1 commit

  • Pull tracing changes from Steven Rostedt:
    "The majority of the changes here are cleanups for the large changes
    that were added to 3.10, which includes several bug fixes that have
    been marked for stable.

    As for new features, there were a few, but nothing to write to LWN
    about. These include:

    New function trigger called "dump" and "cpudump" that will cause
    ftrace to dump its buffer to the console when the function is called.
    The difference between "dump" and "cpudump" is that "dump" will dump
    the entire contents of the ftrace buffer, where as "cpudump" will only
    dump the contents of the ftrace buffer for the CPU that called the
    function.

    Another small enhancement is a new sysctl switch called
    "traceoff_on_warning" which, when enabled, will disable tracing if any
    WARN_ON() is triggered. This is useful if you want to debug what
    caused a warning and do not want to risk losing your trace data by the
    ring buffer overwriting the data before you can disable it. There's
    also a kernel command line option that will make this enabled at boot
    up called the same thing"

    * tag 'trace-3.11' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace: (34 commits)
    tracing: Make tracing_open_generic_{tr,tc}() static
    tracing: Remove ftrace() function
    tracing: Remove TRACE_EVENT_TYPE enum definition
    tracing: Make tracer_tracing_{off,on,is_on}() static
    tracing: Fix irqs-off tag display in syscall tracing
    uprobes: Fix return value in error handling path
    tracing: Fix race between deleting buffer and setting events
    tracing: Add trace_array_get/put() to event handling
    tracing: Get trace_array ref counts when accessing trace files
    tracing: Add trace_array_get/put() to handle instance refs better
    tracing: Protect ftrace_trace_arrays list in trace_events.c
    tracing: Make trace_marker use the correct per-instance buffer
    ftrace: Do not run selftest if command line parameter is set
    tracing/kprobes: Don't pass addr=ip to perf_trace_buf_submit()
    tracing: Use flag buffer_disabled for irqsoff tracer
    tracing/kprobes: Turn trace_probe->files into list_head
    tracing: Fix disabling of soft disable
    tracing: Add missing syscall_metadata comment
    tracing: Simplify code for showing of soft disabled flag
    tracing/kprobes: Kill probe_enable_lock
    ...

    Linus Torvalds
     

04 Jul, 2013

1 commit

  • Pull power management and ACPI updates from Rafael Wysocki:
    "This time the total number of ACPI commits is slightly greater than
    the number of cpufreq commits, but Viresh Kumar (who works on cpufreq)
    remains the most active patch submitter.

    To me, the most significant change is the addition of offline/online
    device operations to the driver core (with the Greg's blessing) and
    the related modifications of the ACPI core hotplug code. Next are the
    freezer updates from Colin Cross that should make the freezing of
    tasks a bit less heavy weight.

    We also have a couple of regression fixes, a number of fixes for
    issues that have not been identified as regressions, two new drivers
    and a bunch of cleanups all over.

    Highlights:

    - Hotplug changes to support graceful hot-removal failures.

    It sometimes is necessary to fail device hot-removal operations
    gracefully if they cannot be carried out completely. For example,
    if memory from a memory module being hot-removed has been allocated
    for the kernel's own use and cannot be moved elsewhere, it's
    desirable to fail the hot-removal operation in a graceful way
    rather than to crash the kernel, but currenty a success or a kernel
    crash are the only possible outcomes of an attempted memory
    hot-removal. Needless to say, that is not a very attractive
    alternative and it had to be addressed.

    However, in order to make it work for memory, I first had to make
    it work for CPUs and for this purpose I needed to modify the ACPI
    processor driver. It's been split into two parts, a resident one
    handling the low-level initialization/cleanup and a modular one
    playing the actual driver's role (but it binds to the CPU system
    device objects rather than to the ACPI device objects representing
    processors). That's been sort of like a live brain surgery on a
    patient who's riding a bike.

    So this is a little scary, but since we found and fixed a couple of
    regressions it caused to happen during the early linux-next testing
    (a month ago), nobody has complained.

    As a bonus we remove some duplicated ACPI hotplug code, because the
    ACPI-based CPU hotplug is now going to use the common ACPI hotplug
    code.

    - Lighter weight freezing of tasks.

    These changes from Colin Cross and Mandeep Singh Baines are
    targeted at making the freezing of tasks a bit less heavy weight
    operation. They reduce the number of tasks woken up every time
    during the freezing, by using the observation that the freezer
    simply doesn't need to wake up some of them and wait for them all
    to call refrigerator(). The time needed for the freezer to decide
    to report a failure is reduced too.

    Also reintroduced is the check causing a lockdep warining to
    trigger when try_to_freeze() is called with locks held (which is
    generally unsafe and shouldn't happen).

    - cpufreq updates

    First off, a commit from Srivatsa S Bhat fixes a resume regression
    introduced during the 3.10 cycle causing some cpufreq sysfs
    attributes to return wrong values to user space after resume. The
    fix is kind of fresh, but also it's pretty obvious once Srivatsa
    has identified the root cause.

    Second, we have a new freqdomain_cpus sysfs attribute for the
    acpi-cpufreq driver to provide information previously available via
    related_cpus. From Lan Tianyu.

    Finally, we fix a number of issues, mostly related to the
    CPUFREQ_POSTCHANGE notifier and cpufreq Kconfig options and clean
    up some code. The majority of changes from Viresh Kumar with bits
    from Jacob Shin, Heiko Stübner, Xiaoguang Chen, Ezequiel Garcia,
    Arnd Bergmann, and Tang Yuantian.

    - ACPICA update

    A usual bunch of updates from the ACPICA upstream.

    During the 3.4 cycle we introduced support for ACPI 5 extended
    sleep registers, but they are only supposed to be used if the
    HW-reduced mode bit is set in the FADT flags and the code attempted
    to use them without checking that bit. That caused suspend/resume
    regressions to happen on some systems. Fix from Lv Zheng causes
    those registers to be used only if the HW-reduced mode bit is set.

    Apart from this some other ACPICA bugs are fixed and code cleanups
    are made by Bob Moore, Tomasz Nowicki, Lv Zheng, Chao Guan, and
    Zhang Rui.

    - cpuidle updates

    New driver for Xilinx Zynq processors is added by Michal Simek.

    Multidriver support simplification, addition of some missing
    kerneldoc comments and Kconfig-related fixes come from Daniel
    Lezcano.

    - ACPI power management updates

    Changes to make suspend/resume work correctly in Xen guests from
    Konrad Rzeszutek Wilk, sparse warning fix from Fengguang Wu and
    cleanups and fixes of the ACPI device power state selection
    routine.

    - ACPI documentation updates

    Some previously missing pieces of ACPI documentation are added by
    Lv Zheng and Aaron Lu (hopefully, that will help people to
    uderstand how the ACPI subsystem works) and one outdated doc is
    updated by Hanjun Guo.

    - Assorted ACPI updates

    We finally nailed down the IA-64 issue that was the reason for
    reverting commit 9f29ab11ddbf ("ACPI / scan: do not match drivers
    against objects having scan handlers"), so we can fix it and move
    the ACPI scan handler check added to the ACPI video driver back to
    the core.

    A mechanism for adding CMOS RTC address space handlers is
    introduced by Lan Tianyu to allow some EC-related breakage to be
    fixed on some systems.

    A spec-compliant implementation of acpi_os_get_timer() is added by
    Mika Westerberg.

    The evaluation of _STA is added to do_acpi_find_child() to avoid
    situations in which a pointer to a disabled device object is
    returned instead of an enabled one with the same _ADR value. From
    Jeff Wu.

    Intel BayTrail PCH (Platform Controller Hub) support is added to
    the ACPI driver for Intel Low-Power Subsystems (LPSS) and that
    driver is modified to work around a couple of known BIOS issues.
    Changes from Mika Westerberg and Heikki Krogerus.

    The EC driver is fixed by Vasiliy Kulikov to use get_user() and
    put_user() instead of dereferencing user space pointers blindly.

    Code cleanups are made by Bjorn Helgaas, Nicholas Mazzuca and Toshi
    Kani.

    - Assorted power management updates

    The "runtime idle" helper routine is changed to take the return
    values of the callbacks executed by it into account and to call
    rpm_suspend() if they return 0, which allows us to reduce the
    overall code bloat a bit (by dropping some code that's not
    necessary any more after that modification).

    The runtime PM documentation is updated by Alan Stern (to reflect
    the "runtime idle" behavior change).

    New trace points for PM QoS are added by Sahara
    ().

    PM QoS documentation is updated by Lan Tianyu.

    Code cleanups are made and minor issues are addressed by Bernie
    Thompson, Bjorn Helgaas, Julius Werner, and Shuah Khan.

    - devfreq updates

    New driver for the Exynos5-bus device from Abhilash Kesavan.

    Minor cleanups, fixes and MAINTAINERS update from MyungJoo Ham,
    Abhilash Kesavan, Paul Bolle, Rajagopal Venkat, and Wei Yongjun.

    - OMAP power management updates

    Adaptive Voltage Scaling (AVS) SmartReflex voltage control driver
    updates from Andrii Tseglytskyi and Nishanth Menon."

    * tag 'pm+acpi-3.11-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: (162 commits)
    cpufreq: Fix cpufreq regression after suspend/resume
    ACPI / PM: Fix possible NULL pointer deref in acpi_pm_device_sleep_state()
    PM / Sleep: Warn about system time after resume with pm_trace
    cpufreq: don't leave stale policy pointer in cdbs->cur_policy
    acpi-cpufreq: Add new sysfs attribute freqdomain_cpus
    cpufreq: make sure frequency transitions are serialized
    ACPI: implement acpi_os_get_timer() according the spec
    ACPI / EC: Add HP Folio 13 to ec_dmi_table in order to skip DSDT scan
    ACPI: Add CMOS RTC Operation Region handler support
    ACPI / processor: Drop unused variable from processor_perflib.c
    cpufreq: tegra: call CPUFREQ_POSTCHANGE notfier in error cases
    cpufreq: s3c64xx: call CPUFREQ_POSTCHANGE notfier in error cases
    cpufreq: omap: call CPUFREQ_POSTCHANGE notfier in error cases
    cpufreq: imx6q: call CPUFREQ_POSTCHANGE notfier in error cases
    cpufreq: exynos: call CPUFREQ_POSTCHANGE notfier in error cases
    cpufreq: dbx500: call CPUFREQ_POSTCHANGE notfier in error cases
    cpufreq: davinci: call CPUFREQ_POSTCHANGE notfier in error cases
    cpufreq: arm-big-little: call CPUFREQ_POSTCHANGE notfier in error cases
    cpufreq: powernow-k8: call CPUFREQ_POSTCHANGE notfier in error cases
    cpufreq: pcc: call CPUFREQ_POSTCHANGE notfier in error cases
    ...

    Linus Torvalds
     

24 Jun, 2013

1 commit


23 Jun, 2013

1 commit

  • This patch has been invaluable in my adventures finding
    issues in the perf NMI handler. I'm as big a fan of
    printk() as anybody is, but using printk() in NMIs is
    deadly when they're happening frequently.

    Even hacking in trace_printk() ended up eating enough
    CPU to throw off some of the measurements I was making.

    Signed-off-by: Dave Hansen
    Acked-by: Peter Zijlstra
    Cc: paulus@samba.org
    Cc: acme@ghostprotocols.net
    Cc: Dave Hansen
    Signed-off-by: Ingo Molnar

    Dave Hansen
     

20 Jun, 2013

2 commits

  • b0f1a59a "tracing/filters: Use a different op for glob match" added
    glob matching to tracepoint filter strings. It uses the ftrace function
    tracing glob matching facility that allows for the wild card character (*)
    to be used at the start and/or end of the matching string.

    But the documentation still states that the filtering only allows for
    exact string matches.

    Cc: Li Zefan
    Signed-off-by: Steven Rostedt

    Steven Rostedt (Red Hat)
     
  • There are some cases when filtering on a set flag of a field of a tracepoint
    is useful. But currently the only filtering commands for numbered fields
    is ==, !=, , >=. This does not help when you just want to trace if
    a specific flag is set. For example:

    > # sudo trace-cmd record -e brcmfmac:brcmf_dbg -f 'level & 0x40000'
    > disable all
    > enable brcmfmac:brcmf_dbg
    > path = /sys/kernel/debug/tracing/events/brcmfmac/brcmf_dbg/enable
    > (level & 0x40000)
    > ^
    > parse_error: Invalid operator
    >

    When trying to trace brcmf_dbg when level has its 1 << 18 bit set, the
    filter fails to perform.

    By allowing a binary '&' operation, this gives the user the ability to
    test a bit.

    Note, a binary '|' is not added, as it doesn't make sense as fields must
    be compared to constants (for now), and ORing a constant will always return
    true.

    Link: http://lkml.kernel.org/r/1371057385.9844.261.camel@gandalf.local.home

    Suggested-by: Arend van Spriel
    Tested-by: Arend van Spriel
    Signed-off-by: Steven Rostedt

    Steven Rostedt
     

12 Jun, 2013

2 commits

  • Add the "cpudump" command to have the current CPU ftrace buffer dumped
    to console if a function is hit. This is useful when debugging a
    tripple fault, where you have an idea of a function that is called
    just before the tripple fault occurs, and can tell ftrace to dump its
    content out to the console before it continues.

    This differs from the "dump" command as it only dumps the content of
    the ring buffer for the currently executing CPU, and does not show
    the contents of the other CPUs.

    Format is:

    :cpudump

    echo 'bad_address:cpudump' > /debug/tracing/set_ftrace_filter

    To remove this:

    echo '!bad_address:cpudump' > /debug/tracing/set_ftrace_filter

    Signed-off-by: Steven Rostedt

    Steven Rostedt (Red Hat)
     
  • Add the "dump" command to have the ftrace buffer dumped to console if
    a function is hit. This is useful when debugging a tripple fault,
    where you have an idea of a function that is called just before the
    tripple fault occurs, and can tell ftrace to dump its content out
    to the console before it continues.

    Format is:

    :dump

    echo 'bad_address:dump' > /debug/tracing/set_ftrace_filter

    To remove this:

    echo '!bad_address:dump' > /debug/tracing/set_ftrace_filter

    Requested-by: Luis Claudio R. Goncalves
    Signed-off-by: Steven Rostedt

    Steven Rostedt (Red Hat)
     

01 May, 2013

1 commit

  • Pull trivial tree updates from Jiri Kosina:
    "Usual stuff, mostly comment fixes, typo fixes, printk fixes and small
    code cleanups"

    * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial: (45 commits)
    mm: Convert print_symbol to %pSR
    gfs2: Convert print_symbol to %pSR
    m32r: Convert print_symbol to %pSR
    iostats.txt: add easy-to-find description for field 6
    x86 cmpxchg.h: fix wrong comment
    treewide: Fix typo in printk and comments
    doc: devicetree: Fix various typos
    docbook: fix 8250 naming in device-drivers
    pata_pdc2027x: Fix compiler warning
    treewide: Fix typo in printks
    mei: Fix comments in drivers/misc/mei
    treewide: Fix typos in kernel messages
    pm44xx: Fix comment for "CONFIG_CPU_IDLE"
    doc: Fix typo "CONFIG_CGROUP_CGROUP_MEMCG_SWAP"
    mmzone: correct "pags" to "pages" in comment.
    kernel-parameters: remove outdated 'noresidual' parameter
    Remove spurious _H suffixes from ifdef comments
    sound: Remove stray pluses from Kconfig file
    radio-shark: Fix printk "CONFIG_LED_CLASS"
    doc: put proper reference to CONFIG_MODULE_SIG_ENFORCE
    ...

    Linus Torvalds
     

30 Apr, 2013

2 commits

  • Pull perf updates from Ingo Molnar:
    "Features:

    - Add "uretprobes" - an optimization to uprobes, like kretprobes are
    an optimization to kprobes. "perf probe -x file sym%return" now
    works like kretprobes. By Oleg Nesterov.

    - Introduce per core aggregation in 'perf stat', from Stephane
    Eranian.

    - Add memory profiling via PEBS, from Stephane Eranian.

    - Event group view for 'annotate' in --stdio, --tui and --gtk, from
    Namhyung Kim.

    - Add support for AMD NB and L2I "uncore" counters, by Jacob Shin.

    - Add Ivy Bridge-EP uncore support, by Zheng Yan

    - IBM zEnterprise EC12 oprofile support patchlet from Robert Richter.

    - Add perf test entries for checking breakpoint overflow signal
    handler issues, from Jiri Olsa.

    - Add perf test entry for for checking number of EXIT events, from
    Namhyung Kim.

    - Add perf test entries for checking --cpu in record and stat, from
    Jiri Olsa.

    - Introduce perf stat --repeat forever, from Frederik Deweerdt.

    - Add --no-demangle to report/top, from Namhyung Kim.

    - PowerPC fixes plus a couple of cleanups/optimizations in uprobes
    and trace_uprobes, by Oleg Nesterov.

    Various fixes and refactorings:

    - Fix dependency of the python binding wrt libtraceevent, from
    Naohiro Aota.

    - Simplify some perf_evlist methods and to allow 'stat' to share code
    with 'record' and 'trace', by Arnaldo Carvalho de Melo.

    - Remove dead code in related to libtraceevent integration, from
    Namhyung Kim.

    - Revert "perf sched: Handle PERF_RECORD_EXIT events" to get 'perf
    sched lat' back working, by Arnaldo Carvalho de Melo

    - We don't use Newt anymore, just plain libslang, by Arnaldo Carvalho
    de Melo.

    - Kill a bunch of die() calls, from Namhyung Kim.

    - Fix build on non-glibc systems due to libio.h absence, from Cody P
    Schafer.

    - Remove some perf_session and tracing dead code, from David Ahern.

    - Honor parallel jobs, fix from Borislav Petkov

    - Introduce tools/lib/lk library, initially just removing duplication
    among tools/perf and tools/vm. from Borislav Petkov

    ... and many more I missed to list, see the shortlog and git log for
    more details."

    * 'perf-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (136 commits)
    perf/x86/intel/P4: Robistify P4 PMU types
    perf/x86/amd: Fix AMD NB and L2I "uncore" support
    perf/x86/amd: Remove old-style NB counter support from perf_event_amd.c
    perf/x86: Check all MSRs before passing hw check
    perf/x86/amd: Add support for AMD NB and L2I "uncore" counters
    perf/x86/intel: Add Ivy Bridge-EP uncore support
    perf/x86/intel: Fix SNB-EP CBO and PCU uncore PMU filter management
    perf/x86: Avoid kfree() in CPU_{STARTING,DYING}
    uprobes/perf: Avoid perf_trace_buf_prepare/submit if ->perf_events is empty
    uprobes/tracing: Don't pass addr=ip to perf_trace_buf_submit()
    uprobes/tracing: Change create_trace_uprobe() to support uretprobes
    uprobes/tracing: Make seq_printf() code uretprobe-friendly
    uprobes/tracing: Make register_uprobe_event() paths uretprobe-friendly
    uprobes/tracing: Make uprobe_{trace,perf}_print() uretprobe-friendly
    uprobes/tracing: Introduce is_ret_probe() and uretprobe_dispatcher()
    uprobes/tracing: Introduce uprobe_{trace,perf}_print() helpers
    uprobes/tracing: Generalize struct uprobe_trace_entry_head
    uprobes/tracing: Kill the pointless local_save_flags/preempt_count calls
    uprobes/tracing: Kill the pointless seq_print_ip_sym() call
    uprobes/tracing: Kill the pointless task_pt_regs() calls
    ...

    Linus Torvalds
     
  • Pull tracing updates from Steven Rostedt:
    "Along with the usual minor fixes and clean ups there are a few major
    changes with this pull request.

    1) Multiple buffers for the ftrace facility

    This feature has been requested by many people over the last few
    years. I even heard that Google was about to implement it themselves.
    I finally had time and cleaned up the code such that you can now
    create multiple instances of the ftrace buffer and have different
    events go to different buffers. This way, a low frequency event will
    not be lost in the noise of a high frequency event.

    Note, currently only events can go to different buffers, the tracers
    (ie function, function_graph and the latency tracers) still can only
    be written to the main buffer.

    2) The function tracer triggers have now been extended.

    The function tracer had two triggers. One to enable tracing when a
    function is hit, and one to disable tracing. Now you can record a
    stack trace on a single (or many) function(s), take a snapshot of the
    buffer (copy it to the snapshot buffer), and you can enable or disable
    an event to be traced when a function is hit.

    3) A perf clock has been added.

    A "perf" clock can be chosen to be used when tracing. This will cause
    ftrace to use the same clock as perf uses, and hopefully this will
    make it easier to interleave the perf and ftrace data for analysis."

    * tag 'trace-3.10' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace: (82 commits)
    tracepoints: Prevent null probe from being added
    tracing: Compare to 1 instead of zero for is_signed_type()
    tracing: Remove obsolete macro guard _TRACE_PROFILE_INIT
    ftrace: Get rid of ftrace_profile_bits
    tracing: Check return value of tracing_init_dentry()
    tracing: Get rid of unneeded key calculation in ftrace_hash_move()
    tracing: Reset ftrace_graph_filter_enabled if count is zero
    tracing: Fix off-by-one on allocating stat->pages
    kernel: tracing: Use strlcpy instead of strncpy
    tracing: Update debugfs README file
    tracing: Fix ftrace_dump()
    tracing: Rename trace_event_mutex to trace_event_sem
    tracing: Fix comment about prefix in arch_syscall_match_sym_name()
    tracing: Convert trace_destroy_fields() to static
    tracing: Move find_event_field() into trace_events.c
    tracing: Use TRACE_MAX_PRINT instead of constant
    tracing: Use pr_warn_once instead of open coded implementation
    ring-buffer: Add ring buffer startup selftest
    tracing: Bring Documentation/trace/ftrace.txt up to date
    tracing: Add "perf" trace_clock
    ...

    Conflicts:
    kernel/trace/ftrace.c
    kernel/trace/trace.c

    Linus Torvalds
     

13 Apr, 2013

1 commit


21 Mar, 2013

1 commit