06 Dec, 2015

1 commit

  • For debugging low level code interacting with the CPU it is often
    useful to trace the MSR read/writes. This gives a concise summary of
    PMU and other operations.

    perf has an ad-hoc way to do this using trace_printk, but it's
    somewhat limited (and also now spews ugly boot messages when enabled)

    Instead define real trace points for all MSR accesses.

    This adds three new trace points: read_msr and write_msr and rdpmc.

    They also report if the access faulted (if *_safe is used)

    This allows filtering and triggering on specific MSR values, which
    allows various more advanced debugging techniques.

    All the values are well defined in the CPU documentation.

    The trace can be post processed with
    Documentation/trace/postprocess/decode_msr.py to add symbolic MSR
    names to the trace.

    I only added it to native MSR accesses in C, not paravirtualized or in
    entry*.S (which is not too interesting)

    Originally the patch kit moved the MSRs out of line. This uses an
    alternative approach recommended by Steven Rostedt of only moving the
    trace calls out of line, but open coding the access to the jump label.

    Signed-off-by: Andi Kleen
    Signed-off-by: Peter Zijlstra (Intel)
    Acked-by: Steven Rostedt
    Cc: Arnaldo Carvalho de Melo
    Cc: Jiri Olsa
    Cc: Linus Torvalds
    Cc: Mike Galbraith
    Cc: Peter Zijlstra
    Cc: Stephane Eranian
    Cc: Thomas Gleixner
    Cc: Vince Weaver
    Link: http://lkml.kernel.org/r/1449018060-1742-3-git-send-email-andi@firstfloor.org
    Signed-off-by: Ingo Molnar

    Andi Kleen
     

07 Nov, 2015

1 commit

  • Pull tracking updates from Steven Rostedt:
    "Most of the changes are clean ups and small fixes. Some of them have
    stable tags to them. I searched through my INBOX just as the merge
    window opened and found lots of patches to pull. I ran them through
    all my tests and they were in linux-next for a few days.

    Features added this release:
    ----------------------------

    - Module globbing. You can now filter function tracing to several
    modules. # echo '*:mod:*snd*' > set_ftrace_filter (Dmitry Safonov)

    - Tracer specific options are now visible even when the tracer is not
    active. It was rather annoying that you can only see and modify
    tracer options after enabling the tracer. Now they are in the
    options/ directory even when the tracer is not active. Although
    they are still only visible when the tracer is active in the
    trace_options file.

    - Trace options are now per instance (although some of the tracer
    specific options are global)

    - New tracefs file: set_event_pid. If any pid is added to this file,
    then all events in the instance will filter out events that are not
    part of this pid. sched_switch and sched_wakeup events handle next
    and the wakee pids"

    * tag 'trace-v4.4' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace: (68 commits)
    tracefs: Fix refcount imbalance in start_creating()
    tracing: Put back comma for empty fields in boot string parsing
    tracing: Apply tracer specific options from kernel command line.
    tracing: Add some documentation about set_event_pid
    ring_buffer: Remove unneeded smp_wmb() before wakeup of reader benchmark
    tracing: Allow dumping traces without tracking trace started cpus
    ring_buffer: Fix more races when terminating the producer in the benchmark
    ring_buffer: Do no not complete benchmark reader too early
    tracing: Remove redundant TP_ARGS redefining
    tracing: Rename max_stack_lock to stack_trace_max_lock
    tracing: Allow arch-specific stack tracer
    recordmcount: arm64: Replace the ignored mcount call into nop
    recordmcount: Fix endianness handling bug for nop_mcount
    tracepoints: Fix documentation of RCU lockdep checks
    tracing: ftrace_event_is_function() can return boolean
    tracing: is_legal_op() can return boolean
    ring-buffer: rb_event_is_commit() can return boolean
    ring-buffer: rb_per_cpu_empty() can return boolean
    ring_buffer: ring_buffer_empty{cpu}() can return boolean
    ring-buffer: rb_is_reader_page() can return boolean
    ...

    Linus Torvalds
     

04 Nov, 2015

1 commit


21 Oct, 2015

1 commit


05 Oct, 2015

2 commits

  • Intel(R) Trace Hub (TH) is a set of hardware blocks (subdevices) that
    produce, switch and output trace data from multiple hardware and
    software sources over several types of trace output ports encoded
    in System Trace Protocol (MIPI STPv2) and is intended to perform
    full system debugging.

    For these subdevices, we create a bus, where they can be discovered
    and configured by userspace software.

    This patch creates this bus infrastructure, three types of devices
    (source, output, switch), resource allocation, some callback mechanisms
    to facilitate communication between the subdevices' drivers and some
    common sysfs attributes.

    Signed-off-by: Alexander Shishkin
    Signed-off-by: Greg Kroah-Hartman

    Alexander Shishkin
     
  • A System Trace Module (STM) is a device exporting data in System Trace
    Protocol (STP) format as defined by MIPI STP standards. Examples of such
    devices are Intel(R) Trace Hub and Coresight STM.

    This abstraction provides a unified interface for software trace sources
    to send their data over an STM device to a debug host. In order to do
    that, such a trace source needs to be assigned a pair of master/channel
    identifiers that all the data from this source will be tagged with. The
    STP decoder on the debug host side will use these master/channel tags to
    distinguish different trace streams from one another inside one STP
    stream.

    This abstraction provides a configfs-based policy management mechanism
    for dynamic allocation of these master/channel pairs based on trace
    source-supplied string identifier. It has the flexibility of being
    defined at runtime and at the same time (provided that the policy
    definition is aligned with the decoding end) consistency.

    For userspace trace sources, this abstraction provides write()-based and
    mmap()-based (if the underlying stm device allows this) output mechanism.

    For kernel-side trace sources, we provide "stm_source" device class that
    can be connected to an stm device at run time.

    Cc: linux-api@vger.kernel.org
    Reviewed-by: Mathieu Poirier
    Signed-off-by: Alexander Shishkin
    Signed-off-by: Greg Kroah-Hartman

    Alexander Shishkin
     

09 Sep, 2015

1 commit

  • Pull tracing update from Steven Rostedt:
    "Mostly this is just clean ups and micro optimizations.

    The changes with more meat are:

    - Allowing the trace event filters to filter on CPU number and
    process ids

    - Two new markers for trace output latency were added (10 and 100
    msec latencies)

    - Have tracing_thresh filter function profiling time

    I also worked on modifying the ring buffer code for some future work,
    and moved the adding of the timestamp around. One of my changes
    caused a regression, and since other changes were built on top of it
    and already tested, I had to operate a revert of that change. Instead
    of rebasing, this change set has the code that caused a regression as
    well as the code to revert that change without touching the other
    changes that were made on top of it"

    * tag 'trace-v4.3' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace:
    ring-buffer: Revert "ring-buffer: Get timestamp after event is allocated"
    tracing: Don't make assumptions about length of string on task rename
    tracing: Allow triggers to filter for CPU ids and process names
    ftrace: Format MCOUNT_ADDR address as type unsigned long
    tracing: Introduce two additional marks for delay
    ftrace: Fix function_graph duration spacing with 7-digits
    ftrace: add tracing_thresh to function profile
    tracing: Clean up stack tracing and fix fentry updates
    ring-buffer: Reorganize function locations
    ring-buffer: Make sure event has enough room for extend and padding
    ring-buffer: Get timestamp after event is allocated
    ring-buffer: Move the adding of the extended timestamp out of line
    ring-buffer: Add event descriptor to simplify passing data
    ftrace: correct the counter increment for trace_buffer data
    tracing: Fix for non-continuous cpu ids
    tracing: Prefer kcalloc over kzalloc with multiply

    Linus Torvalds
     

04 Sep, 2015

1 commit

  • Pull powerpc updates from Michael Ellerman:

    - support "hybrid" iommu/direct DMA ops for coherent_mask < dma_mask
    from Benjamin Herrenschmidt

    - EEH fixes for SRIOV from Gavin

    - introduce rtas_get_sensor_fast() for IRQ handlers from Thomas Huth

    - use hardware RNG for arch_get_random_seed_* not arch_get_random_*
    from Paul Mackerras

    - seccomp filter support from Michael Ellerman

    - opal_cec_reboot2() handling for HMIs & machine checks from Mahesh
    Salgaonkar

    - add powerpc timebase as a trace clock source from Naveen N. Rao

    - misc cleanups in the xmon, signal & SLB code from Anshuman Khandual

    - add an inline function to update POWER8 HID0 from Gautham R. Shenoy

    - fix pte_pagesize_index() crash on 4K w/64K hash from Michael Ellerman

    - drop support for 64K local store on 4K kernels from Michael Ellerman

    - move dma_get_required_mask() from pnv_phb to pci_controller_ops from
    Andrew Donnellan

    - initialize distance lookup table from drconf path from Nikunj A
    Dadhania

    - enable RTC class support from Vaibhav Jain

    - disable automatically blocked PCI config from Gavin Shan

    - add LEDs driver for PowerNV platform from Vasant Hegde

    - fix endianness issues in the HVSI driver from Laurent Dufour

    - kexec endian fixes from Samuel Mendoza-Jonas

    - fix corrupted pdn list from Gavin Shan

    - fix fenced PHB caused by eeh_slot_error_detail() from Gavin Shan

    - Freescale updates from Scott: Highlights include 32-bit memcpy/memset
    optimizations, checksum optimizations, 85xx config fragments and
    updates, device tree updates, e6500 fixes for non-SMP, and misc
    cleanup and minor fixes.

    - a ton of cxl updates & fixes:
    - add explicit precision specifiers from Rasmus Villemoes
    - use more common format specifier from Rasmus Villemoes
    - destroy cxl_adapter_idr on module_exit from Johannes Thumshirn
    - destroy afu->contexts_idr on release of an afu from Johannes
    Thumshirn
    - compile with -Werror from Daniel Axtens
    - EEH support from Daniel Axtens
    - plug irq_bitmap getting leaked in cxl_context from Vaibhav Jain
    - add alternate MMIO error handling from Ian Munsie
    - allow release of contexts which have been OPENED but not STARTED
    from Andrew Donnellan
    - remove use of macro DEFINE_PCI_DEVICE_TABLE from Vaishali Thakkar
    - release irqs if memory allocation fails from Vaibhav Jain
    - remove racy attempt to force EEH invocation in reset from Daniel
    Axtens
    - fix + cleanup error paths in cxl_dev_context_init from Ian Munsie
    - fix force unmapping mmaps of contexts allocated through the kernel
    api from Ian Munsie
    - set up and enable PSL Timebase from Philippe Bergheaud

    * tag 'powerpc-4.3-1' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux: (140 commits)
    cxl: Set up and enable PSL Timebase
    cxl: Fix force unmapping mmaps of contexts allocated through the kernel api
    cxl: Fix + cleanup error paths in cxl_dev_context_init
    powerpc/eeh: Fix fenced PHB caused by eeh_slot_error_detail()
    powerpc/pseries: Cleanup on pci_dn_reconfig_notifier()
    powerpc/pseries: Fix corrupted pdn list
    powerpc/powernv: Enable LEDS support
    powerpc/iommu: Set default DMA offset in dma_dev_setup
    cxl: Remove racy attempt to force EEH invocation in reset
    cxl: Release irqs if memory allocation fails
    cxl: Remove use of macro DEFINE_PCI_DEVICE_TABLE
    powerpc/powernv: Fix mis-merge of OPAL support for LEDS driver
    powerpc/powernv: Reset HILE before kexec_sequence()
    powerpc/kexec: Reset secondary cpu endianness before kexec
    powerpc/hvsi: Fix endianness issues in the HVSI driver
    leds/powernv: Add driver for PowerNV platform
    powerpc/powernv: Create LED platform device
    powerpc/powernv: Add OPAL interfaces for accessing and modifying system LED states
    powerpc/powernv: Fix the log message when disabling VF
    cxl: Allow release of contexts which have been OPENED but not STARTED
    ...

    Linus Torvalds
     

06 Aug, 2015

2 commits


21 Jul, 2015

1 commit

  • A fine granulity support for delay would be very useful when profiling
    VM logics, such as page allocation including page reclaim and memory
    compaction with function graph.

    Thus, this patch adds two additional marks with two changes.

    - An equal sign in mark selection function is removed to align code
    behavior with comments and documentation.

    - The function graph example related to delay in ftrace.txt is updated
    to cover all supported marks.

    Link: http://lkml.kernel.org/r/1436626300-1679-3-git-send-email-jungseoklee85@gmail.com

    Cc: Byungchul Park
    Signed-off-by: Jungseok Lee
    Signed-off-by: Steven Rostedt

    Jungseok Lee
     

14 May, 2015

1 commit

  • 4a88d44ab17da ("tracing: Remove mentioning of legacy latency_trace file
    from documentation") changed a sentence to refer to only one file
    instead of two, but the sentence still uses "they". Fix it.

    Signed-off-by: Rabin Vincent
    Acked-by: Steven Rostedt
    Signed-off-by: Jonathan Corbet

    Rabin Vincent
     

03 Apr, 2015

1 commit


16 Feb, 2015

1 commit

  • Pull char / misc patches from Greg KH:
    "Here's the big char/misc driver update for 3.20-rc1.

    Lots of little things in here, all described in the changelog.
    Nothing major or unusual, except maybe the binder selinux stuff, which
    was all acked by the proper selinux people and they thought it best to
    come through this tree.

    All of this has been in linux-next with no reported issues for a while"

    * tag 'char-misc-3.20-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc: (90 commits)
    coresight: fix function etm_writel_cp14() parameter order
    coresight-etm: remove check for unknown Kconfig macro
    coresight: fixing CPU hwid lookup in device tree
    coresight: remove the unnecessary function coresight_is_bit_set()
    coresight: fix the debug AMBA bus name
    coresight: remove the extra spaces
    coresight: fix the link between orphan connection and newly added device
    coresight: remove the unnecessary replicator property
    coresight: fix the replicator subtype value
    pdfdocs: Fix 'make pdfdocs' failure for 'uio-howto.tmpl'
    mcb: Fix error path of mcb_pci_probe
    virtio/console: verify device has config space
    ti-st: clean up data types (fix harmless memory corruption)
    mei: me: release hw from reset only during the reset flow
    mei: mask interrupt set bit on clean reset bit
    extcon: max77693: Constify struct regmap_config
    extcon: adc-jack: Release IIO channel on driver remove
    extcon: Remove duplicated include from extcon-class.c
    Drivers: hv: vmbus: hv_process_timer_expiration() can be static
    Drivers: hv: vmbus: serialize Offer and Rescind offer
    ...

    Linus Torvalds
     

10 Feb, 2015

1 commit


05 Feb, 2015

1 commit


15 Dec, 2014

1 commit

  • Pull char/misc driver updates from Greg KH:
    "Here's the big char/misc driver update for 3.19-rc1

    Lots of little things all over the place in different drivers, and a
    new subsystem, "coresight" has been added. Full details are in the
    shortlog"

    * tag 'char-misc-3.19-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc: (73 commits)
    parport: parport_pc, do not remove parent devices early
    spmi: Remove shutdown/suspend/resume kernel-doc
    carma-fpga-program: drop videobuf dependency
    carma-fpga: drop videobuf dependency
    carma-fpga-program.c: fix compile errors
    i8k: Fix temperature bug handling in i8k_get_temp()
    cxl: Name interrupts in /proc/interrupt
    CXL: Return error to PSL if IRQ demultiplexing fails & print clearer warning
    coresight-replicator: remove .owner field for driver
    coresight: fixed comments in coresight.h
    coresight: fix typo in comment in coresight-priv.h
    coresight: bindings for coresight drivers
    coresight: Adding ABI documentation
    w1: support auto-load of w1_bq27000 module.
    w1: avoid potential u16 overflow
    cn: verify msg->len before making callback
    mei: export fw status registers through sysfs
    mei: read and print all six FW status registers
    mei: txe: add cherrytrail device id
    mei: kill cached host and me csr values
    ...

    Linus Torvalds
     

04 Dec, 2014

1 commit

  • Currently, function graph tracer prints "!" or "+" just before
    function execution time to signal a function overhead, depending
    on the time. And some tracers tracing latency also print "!" or
    "+" just after time to signal overhead, depending on the interval
    between events. Even it is usually enough to do that, we sometimes
    need to signal for bigger execution time than 100 micro seconds.

    For example, I used function graph tracer to detect if there is
    any case that exit_mm() takes too much time. I did following steps
    in /sys/kernel/debug/tracing. It was easier to detect very large
    excution time with patched kernel than with original kernel.

    $ echo exit_mm > set_graph_function
    $ echo function_graph > current_tracer
    $ echo > trace
    $ cat trace_pipe > $LOGFILE
    ... (do something and terminate logging)
    $ grep "\\$" $LOGFILE
    3) $ 22082032 us | } /* kernel_map_pages */
    3) $ 22082040 us | } /* free_pages_prepare */
    3) $ 22082113 us | } /* free_hot_cold_page */
    3) $ 22083455 us | } /* free_hot_cold_page_list */
    3) $ 22083895 us | } /* release_pages */
    3) $ 22177873 us | } /* free_pages_and_swap_cache */
    3) $ 22178929 us | } /* unmap_single_vma */
    3) $ 22198885 us | } /* unmap_vmas */
    3) $ 22206949 us | } /* exit_mmap */
    3) $ 22207659 us | } /* mmput */
    3) $ 22207793 us | } /* exit_mm */

    And then, it was easy to find out that a schedule-out occured by
    sub_preempt_count() within kernel_map_pages().

    To detect very large function exection time caused by either problematic
    function implementation or scheduling issues, this patch can be useful.

    Link: http://lkml.kernel.org/r/1416789259-24038-1-git-send-email-byungchul.park@lge.com

    Signed-off-by: Byungchul Park
    Signed-off-by: Steven Rostedt

    Byungchul Park
     

22 Nov, 2014

1 commit

  • Introduce FTRACE_OPS_FL_IPMODIFY to avoid conflict among
    ftrace users who may modify regs->ip to change the execution
    path. If two or more users modify the regs->ip on the same
    function entry, one of them will be broken. So they must add
    IPMODIFY flag and make sure that ftrace_set_filter_ip() succeeds.

    Note that ftrace doesn't allow ftrace_ops which has IPMODIFY
    flag to have notrace hash, and the ftrace_ops must have a
    filter hash (so that the ftrace_ops can hook only specific
    entries), because it strongly depends on the address and
    must be allowed for only few selected functions.

    Link: http://lkml.kernel.org/r/20141121102516.11844.27829.stgit@localhost.localdomain

    Cc: Jiri Kosina
    Cc: Seth Jennings
    Cc: Petr Mladek
    Cc: Vojtech Pavlik
    Cc: Miroslav Benes
    Cc: Ingo Molnar
    Cc: Ananth N Mavinakayanahalli
    Cc: Josh Poimboeuf
    Cc: Namhyung Kim
    Signed-off-by: Masami Hiramatsu
    [ fixed up some of the comments ]
    Signed-off-by: Steven Rostedt

    Masami Hiramatsu
     

08 Nov, 2014

1 commit


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

1 commit

  • 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