23 Oct, 2015

1 commit

  • commit c2e4b24ff848bb180f9b9cd873a38327cd219ad2 upstream.

    When a trace recorded on a 32-bit device is processed with a 64-bit
    binary, the higher 32-bits of the address need to ignored.

    The lack of this results in the output of the 64-bit pointer
    value to the trace as the 32-bit address lookup fails in find_printk().

    Before:

    burn-1778 [003] 548.600305: bputs: 0xc0046db2s: 2cec5c058d98c

    After:

    burn-1778 [003] 548.600305: bputs: 0xc0046db2s: RT throttling activated

    The problem occurs in PRINT_FIELD when the field is recognized as a
    pointer to a string (of the type const char *)

    Heterogeneous architectures cases below can arise and should be handled:

    * Traces recorded using 32-bit addresses processed on a 64-bit machine
    * Traces recorded using 64-bit addresses processed on a 32-bit machine

    Reported-by: Juri Lelli
    Signed-off-by: Kapileshwar Singh
    Reviewed-by: Steven Rostedt
    Cc: David Ahern
    Cc: Javi Merino
    Cc: Jiri Olsa
    Cc: Namhyung Kim
    Link: http://lkml.kernel.org/r/1442928123-13824-1-git-send-email-kapileshwar.singh@arm.com
    Signed-off-by: Arnaldo Carvalho de Melo
    Signed-off-by: Greg Kroah-Hartman

    Kapileshwar Singh
     

15 May, 2015

1 commit


13 May, 2015

2 commits


07 May, 2015

1 commit

  • Pull perf fixes from Ingo Molnar:
    "Mostly tooling fixes, but also an uncore PMU driver fix and an uncore
    PMU driver hardware-enablement addition"

    * 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
    perf probe: Fix segfault if passed with ''.
    perf report: Fix -T/--threads option to work again
    perf bench numa: Fix immediate meeting of convergence condition
    perf bench numa: Fixes of --quiet argument
    perf bench futex: Fix hung wakeup tasks after requeueing
    perf probe: Fix bug with global variables handling
    perf top: Fix a segfault when kernel map is restricted.
    tools lib traceevent: Fix build failure on 32-bit arch
    perf kmem: Fix compiles on RHEL6/OL6
    tools lib api: Undefine _FORTIFY_SOURCE before setting it
    perf kmem: Consistently use PRIu64 for printing u64 values
    perf trace: Disable events and drain events when forked workload ends
    perf trace: Enable events when doing system wide tracing and starting a workload
    perf/x86/intel/uncore: Move PCI IDs for IMC to uncore driver
    perf/x86/intel/uncore: Add support for Intel Haswell ULT (lower power Mobile Processor) IMC uncore PMUs
    perf/x86/intel: Add cpu_(prepare|starting|dying) for core_pmu

    Linus Torvalds
     

24 Apr, 2015

2 commits

  • In my i386 build, it failed like this:

    CC event-parse.o
    event-parse.c: In function 'print_str_arg':
    event-parse.c:3868:5: warning: format '%lu' expects argument of type 'long unsigned int',
    but argument 3 has type 'uint64_t' [-Wformat]

    Signed-off-by: Namhyung Kim
    Acked-by: Javi Merino
    Link: http://lkml.kernel.org/r/20150424020218.GF1905@sejong
    Signed-off-by: Arnaldo Carvalho de Melo

    Namhyung Kim
     
  • Some toolchains (like Hardened Gentoo) define _FORTIFY_SOURCE in the
    built-in, default args. This causes perf builds to fail with:

    :0:0: error: "_FORTIFY_SOURCE" redefined [-Werror]
    : note: this is the location of the previous definition cc1:
    all warnings being treated as errors

    To avoid this, undefine _FORTIFY_SOURCE before (possibly re-)defining it
    in tools/lib/api.

    v2 applies cleanly on top of already pulled kbuild changes for 4.1-rc1.

    Signed-off-by: Bobby Powers
    Acked-by: Jiri Olsa
    Cc: Dirk Gouders
    Cc: Michal Marek
    Cc: Paul Mackerras
    Cc: Peter Zijlstra
    Cc: linux-kbuild@vger.kernel.org
    Link: http://lkml.kernel.org/r/1429658381-3039-1-git-send-email-bobbypowers@gmail.com
    Signed-off-by: Arnaldo Carvalho de Melo

    Bobby Powers
     

15 Apr, 2015

1 commit

  • Pull perf changes from Ingo Molnar:
    "Core kernel changes:

    - One of the more interesting features in this cycle is the ability
    to attach eBPF programs (user-defined, sandboxed bytecode executed
    by the kernel) to kprobes.

    This allows user-defined instrumentation on a live kernel image
    that can never crash, hang or interfere with the kernel negatively.
    (Right now it's limited to root-only, but in the future we might
    allow unprivileged use as well.)

    (Alexei Starovoitov)

    - Another non-trivial feature is per event clockid support: this
    allows, amongst other things, the selection of different clock
    sources for event timestamps traced via perf.

    This feature is sought by people who'd like to merge perf generated
    events with external events that were measured with different
    clocks:

    - cluster wide profiling

    - for system wide tracing with user-space events,

    - JIT profiling events

    etc. Matching perf tooling support is added as well, available via
    the -k, --clockid parameter to perf record et al.

    (Peter Zijlstra)

    Hardware enablement kernel changes:

    - x86 Intel Processor Trace (PT) support: which is a hardware tracer
    on steroids, available on Broadwell CPUs.

    The hardware trace stream is directly output into the user-space
    ring-buffer, using the 'AUX' data format extension that was added
    to the perf core to support hardware constraints such as the
    necessity to have the tracing buffer physically contiguous.

    This patch-set was developed for two years and this is the result.
    A simple way to make use of this is to use BTS tracing, the PT
    driver emulates BTS output - available via the 'intel_bts' PMU.
    More explicit PT specific tooling support is in the works as well -
    will probably be ready by 4.2.

    (Alexander Shishkin, Peter Zijlstra)

    - x86 Intel Cache QoS Monitoring (CQM) support: this is a hardware
    feature of Intel Xeon CPUs that allows the measurement and
    allocation/partitioning of caches to individual workloads.

    These kernel changes expose the measurement side as a new PMU
    driver, which exposes various QoS related PMU events. (The
    partitioning change is work in progress and is planned to be merged
    as a cgroup extension.)

    (Matt Fleming, Peter Zijlstra; CPU feature detection by Peter P
    Waskiewicz Jr)

    - x86 Intel Haswell LBR call stack support: this is a new Haswell
    feature that allows the hardware recording of call chains, plus
    tooling support. To activate this feature you have to enable it
    via the new 'lbr' call-graph recording option:

    perf record --call-graph lbr
    perf report

    or:

    perf top --call-graph lbr

    This hardware feature is a lot faster than stack walk or dwarf
    based unwinding, but has some limitations:

    - It reuses the current LBR facility, so LBR call stack and
    branch record can not be enabled at the same time.

    - It is only available for user-space callchains.

    (Yan, Zheng)

    - x86 Intel Broadwell CPU support and various event constraints and
    event table fixes for earlier models.

    (Andi Kleen)

    - x86 Intel HT CPUs event scheduling workarounds. This is a complex
    CPU bug affecting the SNB,IVB,HSW families that results in counter
    value corruption. The mitigation code is automatically enabled and
    is transparent.

    (Maria Dimakopoulou, Stephane Eranian)

    The perf tooling side had a ton of changes in this cycle as well, so
    I'm only able to list the user visible changes here, in addition to
    the tooling changes outlined above:

    User visible changes affecting all tools:

    - Improve support of compressed kernel modules (Jiri Olsa)
    - Save DSO loading errno to better report errors (Arnaldo Carvalho de Melo)
    - Bash completion for subcommands (Yunlong Song)
    - Add 'I' event modifier for perf_event_attr.exclude_idle bit (Jiri Olsa)
    - Support missing -f to override perf.data file ownership. (Yunlong Song)
    - Show the first event with an invalid filter (David Ahern, Arnaldo Carvalho de Melo)

    User visible changes in individual tools:

    'perf data':

    New tool for converting perf.data to other formats, initially
    for the CTF (Common Trace Format) from LTTng (Jiri Olsa,
    Sebastian Siewior)

    'perf diff':

    Add --kallsyms option (David Ahern)

    'perf list':

    Allow listing events with 'tracepoint' prefix (Yunlong Song)

    Sort the output of the command (Yunlong Song)

    'perf kmem':

    Respect -i option (Jiri Olsa)

    Print big numbers using thousands' group (Namhyung Kim)

    Allow -v option (Namhyung Kim)

    Fix alignment of slab result table (Namhyung Kim)

    'perf probe':

    Support multiple probes on different binaries on the same command line (Masami Hiramatsu)

    Support unnamed union/structure members data collection. (Masami Hiramatsu)

    Check kprobes blacklist when adding new events. (Masami Hiramatsu)

    'perf record':

    Teach 'perf record' about perf_event_attr.clockid (Peter Zijlstra)

    Support recording running/enabled time (Andi Kleen)

    'perf sched':

    Improve the performance of 'perf sched replay' on high CPU core count machines (Yunlong Song)

    'perf report' and 'perf top':

    Allow annotating entries in callchains in the hists browser (Arnaldo Carvalho de Melo)

    Indicate which callchain entries are annotated in the
    TUI hists browser (Arnaldo Carvalho de Melo)

    Add pid/tid filtering to 'report' and 'script' commands (David Ahern)

    Consider PERF_RECORD_ events with cpumode == 0 in 'perf top', removing one
    cause of long term memory usage buildup, i.e. not processing PERF_RECORD_EXIT
    events (Arnaldo Carvalho de Melo)

    'perf stat':

    Report unsupported events properly (Suzuki K. Poulose)

    Output running time and run/enabled ratio in CSV mode (Andi Kleen)

    'perf trace':

    Handle legacy syscalls tracepoints (David Ahern, Arnaldo Carvalho de Melo)

    Only insert blank duration bracket when tracing syscalls (Arnaldo Carvalho de Melo)

    Filter out the trace pid when no threads are specified (Arnaldo Carvalho de Melo)

    Dump stack on segfaults (Arnaldo Carvalho de Melo)

    No need to explicitely enable evsels for workload started from perf, let it
    be enabled via perf_event_attr.enable_on_exec, removing some events that take
    place in the 'perf trace' before a workload is really started by it.
    (Arnaldo Carvalho de Melo)

    Allow mixing with tracepoints and suppressing plain syscalls. (Arnaldo Carvalho de Melo)

    There's also been a ton of infrastructure work done, such as the
    split-out of perf's build system into tools/build/ and other changes -
    see the shortlog and changelog for details"

    * 'perf-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (358 commits)
    perf/x86/intel/pt: Clean up the control flow in pt_pmu_hw_init()
    perf evlist: Fix type for references to data_head/tail
    perf probe: Check the orphaned -x option
    perf probe: Support multiple probes on different binaries
    perf buildid-list: Fix segfault when show DSOs with hits
    perf tools: Fix cross-endian analysis
    perf tools: Fix error path to do closedir() when synthesizing threads
    perf tools: Fix synthesizing fork_event.ppid for non-main thread
    perf tools: Add 'I' event modifier for exclude_idle bit
    perf report: Don't call map__kmap if map is NULL.
    perf tests: Fix attr tests
    perf probe: Fix ARM 32 building error
    perf tools: Merge all perf_event_attr print functions
    perf record: Add clockid parameter
    perf sched replay: Use replay_repeat to calculate the runavg of cpu usage instead of the default value 10
    perf sched replay: Support using -f to override perf.data file ownership
    perf sched replay: Fix the EMFILE error caused by the limitation of the maximum open files
    perf sched replay: Handle the dead halt of sem_wait when create_tasks() fails for any task
    perf sched replay: Fix the segmentation fault problem caused by pr_err in threads
    perf sched replay: Realloc the memory of pid_to_task stepwise to adapt to the different pid_max configurations
    ...

    Linus Torvalds
     

08 Apr, 2015

1 commit

  • Currently it ignores operator priority and just sets processed args as a
    right operand. But it could result in priority inversion in case that
    the right operand is also a operator arg and its priority is lower.

    For example, following print format is from new kmem events.

    "page=%p", REC->pfn != -1UL ? (((struct page *)(0xffffea0000000000UL)) + (REC->pfn)) : ((void *)0)

    But this was treated as below:

    REC->pfn != ((null - 1UL) ? ((struct page *)0xffffea0000000000UL + REC->pfn) : (void *) 0)

    In this case, the right arg was '?' operator which has lower priority.
    But it just sets the whole arg so making the output confusing - page was
    always 0 or 1 since that's the result of logical operation.

    With this patch, it can handle it properly like following:

    ((REC->pfn != (null - 1UL)) ? ((struct page *)0xffffea0000000000UL + REC->pfn) : (void *) 0)

    Signed-off-by: Namhyung Kim
    Acked-by: Steven Rostedt
    Cc: David Ahern
    Cc: Jiri Olsa
    Cc: Joonsoo Kim
    Cc: Minchan Kim
    Cc: Peter Zijlstra
    Cc: linux-mm@kvack.org
    Link: http://lkml.kernel.org/r/1428298576-9785-10-git-send-email-namhyung@kernel.org
    [ Replaced 'swap' with 'rotate' in a comment as requested by Steve and agreed by Namhyung ]
    Signed-off-by: Arnaldo Carvalho de Melo

    Namhyung Kim
     

26 Mar, 2015

1 commit

  • Guilherme Cox found that:

    There is, however, a potential bug if there is an item with code zero
    that is not the first one in the symbol list, since eval_flag(..)
    returns 0 when it doesn't find anything.

    That is, if you have the following enums:

    enum {
    FOO_START = 0,
    FOO_GO = 1,
    FOO_END = 2
    }

    and then have:

    __print_symbolic(foo, FOO_GO, "go", FOO_START, "start",
    FOO_END, "end")

    If none of the enums are known to pevent, then eval_flag() will return
    zero, and it will match it to the first item in the list, which would be
    FOO_GO, which is not zero.

    Luckily, in most cases, the first element would be zero, and the parsing
    would match out of sheer luck.

    Reported-by: Guilherme Cox
    Signed-off-by: Steven Rostedt
    Cc: Jiri Olsa
    Cc: Namhyung Kim
    Link: http://lkml.kernel.org/r/20150324145813.0bfe95ba@gandalf.local.home
    Signed-off-by: Arnaldo Carvalho de Melo

    Steven Rostedt
     

25 Mar, 2015

1 commit

  • Use %pS for actual addresses, otherwise you'll get bad output
    on arches like ppc64 where %pF expects a function descriptor.

    Link: http://lkml.kernel.org/r/1426130037-17956-22-git-send-email-scottwood@freescale.com

    Signed-off-by: Scott Wood
    Signed-off-by: Steven Rostedt

    Scott Wood
     

24 Mar, 2015

10 commits

  • Since 6ea22486ba46 ("tracing: Add array printing helper") trace can
    generate traces with variable element size arrays. Add support to
    parse them.

    Signed-off-by: Javi Merino
    Acked-by: Namhyung Kim
    Acked-by: Steven Rostedt
    Cc: Jiri Olsa
    Link: http://lkml.kernel.org/r/1427195239-15730-1-git-send-email-javi.merino@arm.com
    Signed-off-by: Arnaldo Carvalho de Melo

    Javi Merino
     
  • valgrind showed that the filter token wasn't being freed properly in
    process_filter().

    Signed-off-by: Steven Rostedt
    Cc: Andrew Morton
    Cc: Jiri Olsa
    Cc: Namhyung Kim
    Link: http://lkml.kernel.org/r/20150324135923.817723903@goodmis.org
    Signed-off-by: Arnaldo Carvalho de Melo

    Steven Rostedt (Red Hat)
     
  • For debugging purposes, it may be helpful for the kbuffer library to flag
    when crossing a sub buffer.

    Signed-off-by: Steven Rostedt
    Cc: Andrew Morton
    Cc: Jiri Olsa
    Cc: Namhyung Kim
    Link: http://lkml.kernel.org/r/20150324135923.650983637@goodmis.org
    Signed-off-by: Arnaldo Carvalho de Melo

    Steven Rostedt (Red Hat)
     
  • When a event PADDING is hit (a deleted event that is still in the ring
    buffer), translate_data() sets the length of the padding and also updates
    the data pointer which is passed back to the caller.

    This is unneeded because the caller also updates the data pointer with
    the passed back length. translate_data() should not update the pointer,
    only set the length.

    Signed-off-by: Steven Rostedt
    Cc: Andrew Morton
    Cc: Jiri Olsa
    Cc: Namhyung Kim
    Cc: stable@vger.kernel.org # 3.12+
    Link: http://lkml.kernel.org/r/20150324135923.461431960@goodmis.org
    Signed-off-by: Arnaldo Carvalho de Melo

    Steven Rostedt (Red Hat)
     
  • When a plugin option is defined, by default it is a boolean (true or false).

    If the option is something else, then it needs to set its "value" field to
    a default string other than NULL (can be just "").

    If the value is not set then the option is considered boolean, and the
    updating of the option value will be handled accordingly.

    Signed-off-by: Steven Rostedt
    Cc: Andrew Morton
    Cc: Jiri Olsa
    Cc: Namhyung Kim
    Link: http://lkml.kernel.org/r/20150324135923.308372986@goodmis.org
    Signed-off-by: Arnaldo Carvalho de Melo

    Steven Rostedt
     
  • There is a pevent_data_comm_from_pid() that returns the cmdline stored for
    a given pid in order for users to map pids to comms, but there's no method
    to convert a comm back to a pid. This is useful for filters that specify
    a comm instead of a PID (it's faster than searching each individual event).

    Add a way to retrieve a comm from a pid. Since there can be more than one
    pid associated to a comm, it returns a data structure that lets the user
    iterate over all the saved comms for a given pid.

    Signed-off-by: Steven Rostedt
    Cc: Andrew Morton
    Cc: Jiri Olsa
    Cc: Namhyung Kim
    Link: http://lkml.kernel.org/r/20150324135923.001103479@goodmis.org
    Signed-off-by: Arnaldo Carvalho de Melo

    Steven Rostedt (Red Hat)
     
  • The %z printf specifier was not handled making trace_printk()s in the
    kernel that used this break on output.

    Reported-by: Shawn Bohrer
    Signed-off-by: Steven Rostedt
    Cc: Andrew Morton
    Cc: Jiri Olsa
    Cc: Namhyung Kim
    Cc: Shawn Bohrer
    Link: http://lkml.kernel.org/r/20150324135922.844361717@goodmis.org
    Signed-off-by: Arnaldo Carvalho de Melo

    Steven Rostedt (Red Hat)
     
  • The pevent->trace_clock should not be a direct pointer to what was
    given. It should be copied and freed.

    Note, valgrind pointed this out when a caller passed in a pointer that
    needed to be freed and it never was. Ideally, pevent should copy it
    (which this change does), and free the copy. It's up to the caller to
    free the clock string passed in.

    Signed-off-by: Steven Rostedt
    Cc: Andrew Morton
    Cc: Jiri Olsa
    Cc: Namhyung Kim
    Link: http://lkml.kernel.org/r/20150324135922.695906738@goodmis.org
    Signed-off-by: Arnaldo Carvalho de Melo

    Steven Rostedt (Red Hat)
     
  • It is possible that a pid has no associated comm attached to it, although it
    can still be passed to pevent_register_comm().

    But if comm is NULL, it will cause strdup() to segfault. To prevent this
    from happening, if comm is NULL use the default "" name for the
    pid.

    Signed-off-by: Josef Bacik
    Cc: Andrew Morton
    Cc: Jiri Olsa
    Cc: Namhyung Kim
    Link: http://lkml.kernel.org/r/20150324135922.549965495@goodmis.org
    Link: http://lkml.kernel.org/p/1403799732-30308-1-git-send-email-jbacik@fb.com
    Signed-off-by: Steven Rostedt
    Signed-off-by: Arnaldo Carvalho de Melo

    Josef Bacik
     
  • The sequence of allocating the print_arg field, calling process_arg()
    and verifying that the next event delimiter is repeated twice in
    process_hex() and will also be used for process_int_array().

    Factor it out to a function to avoid writing the same code again and
    again.

    Signed-off-by: Javi Merino
    Acked-by: Namhyung Kim
    Acked-by: Steven Rostedt
    Cc: Jiri Olsa
    Link: http://lkml.kernel.org/r/1426875176-30244-2-git-send-email-javi.merino@arm.com
    Signed-off-by: Arnaldo Carvalho de Melo

    Javi Merino
     

22 Mar, 2015

1 commit

  • Move the calls that frees the resources allocated for a struct format_field to
    a separate routine.

    Signed-off-by: David Ahern
    Acked-by: Steven Rostedt
    Link: http://lkml.kernel.org/r/1426790181-19118-1-git-send-email-dsahern@gmail.com
    [ Split this part from a larger patch, added pevent_ prefix as requested by Steven ]
    Signed-off-by: Arnaldo Carvalho de Melo

    David Ahern
     

26 Feb, 2015

1 commit


13 Feb, 2015

4 commits

  • Move the lockdep library building under tools build framework.

    Signed-off-by: Jiri Olsa
    Cc: Alexis Berlemont
    Cc: Borislav Petkov
    Cc: Corey Ashford
    Cc: David Ahern
    Cc: Frederic Weisbecker
    Cc: Namhyung Kim
    Cc: Paul Mackerras
    Cc: Peter Zijlstra
    Cc: S. Lockwood-Childs
    Cc: Sasha Levin
    Cc: Stephane Eranian
    Link: http://lkml.kernel.org/n/tip-i0t25buqyo5jfvzpw2347h1h@git.kernel.org
    Signed-off-by: Arnaldo Carvalho de Melo

    Jiri Olsa
     
  • Move the libtraceevent library building under tools build framework.

    Signed-off-by: Jiri Olsa
    Tested-by: Sukadev Bhattiprolu
    Tested-by: Will Deacon
    Cc: Alexis Berlemont
    Cc: Borislav Petkov
    Cc: Corey Ashford
    Cc: David Ahern
    Cc: Frederic Weisbecker
    Cc: Namhyung Kim
    Cc: Paul Mackerras
    Cc: Peter Zijlstra
    Cc: Stephane Eranian
    Cc: Steven Rostedt
    Link: http://lkml.kernel.org/n/tip-opvx59tcawlmm916lg4aff4h@git.kernel.org
    Signed-off-by: Arnaldo Carvalho de Melo

    Jiri Olsa
     
  • Renaming libapikfs.a to libapi.a, because it's not just 'fs' specific
    library now.

    Signed-off-by: Jiri Olsa
    Tested-by: Sukadev Bhattiprolu
    Tested-by: Will Deacon
    Cc: Alexis Berlemont
    Cc: Borislav Petkov
    Cc: Corey Ashford
    Cc: David Ahern
    Cc: Frederic Weisbecker
    Cc: Namhyung Kim
    Cc: Paul Mackerras
    Cc: Peter Zijlstra
    Cc: Stephane Eranian
    Link: http://lkml.kernel.org/n/tip-g1mk5oj2ayq4vn653ovfg3gv@git.kernel.org
    Signed-off-by: Arnaldo Carvalho de Melo

    Jiri Olsa
     
  • Move the libapikfs library building under tools build framework.

    Signed-off-by: Jiri Olsa
    Tested-by: Sukadev Bhattiprolu
    Tested-by: Will Deacon
    Cc: Alexis Berlemont
    Cc: Borislav Petkov
    Cc: Corey Ashford
    Cc: David Ahern
    Cc: Frederic Weisbecker
    Cc: Namhyung Kim
    Cc: Paul Mackerras
    Cc: Peter Zijlstra
    Cc: Stephane Eranian
    Link: http://lkml.kernel.org/n/tip-xjo8r7nuqy9mvlfrmx9zcfwb@git.kernel.org
    Signed-off-by: Arnaldo Carvalho de Melo

    Jiri Olsa
     

10 Feb, 2015

1 commit

  • Pull perf updates from Ingo Molnar:
    "Kernel side changes:

    - AMD range breakpoints support:

    Extend breakpoint tools and core to support address range through
    perf event with initial backend support for AMD extended
    breakpoints.

    The syntax is:

    perf record -e mem:addr/len:type

    For example set write breakpoint from 0x1000 to 0x1200 (0x1000 + 512)

    perf record -e mem:0x1000/512:w

    - event throttling/rotating fixes

    - various event group handling fixes, cleanups and general paranoia
    code to be more robust against bugs in the future.

    - kernel stack overhead fixes

    User-visible tooling side changes:

    - Show precise number of samples in at the end of a 'record' session,
    if processing build ids, since we will then traverse the whole
    perf.data file and see all the PERF_RECORD_SAMPLE records,
    otherwise stop showing the previous off-base heuristicly counted
    number of "samples" (Namhyung Kim).

    - Support to read compressed module from build-id cache (Namhyung
    Kim)

    - Enable sampling loads and stores simultaneously in 'perf mem'
    (Stephane Eranian)

    - 'perf diff' output improvements (Namhyung Kim)

    - Fix error reporting for evsel pgfault constructor (Arnaldo Carvalho
    de Melo)

    Tooling side infrastructure changes:

    - Cache eh/debug frame offset for dwarf unwind (Namhyung Kim)

    - Support parsing parameterized events (Cody P Schafer)

    - Add support for IP address formats in libtraceevent (David Ahern)

    Plus other misc fixes"

    * 'perf-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (48 commits)
    perf: Decouple unthrottling and rotating
    perf: Drop module reference on event init failure
    perf: Use POLLIN instead of POLL_IN for perf poll data in flag
    perf: Fix put_event() ctx lock
    perf: Fix move_group() order
    perf: Fix event->ctx locking
    perf: Add a bit of paranoia
    perf symbols: Convert lseek + read to pread
    perf tools: Use perf_data_file__fd() consistently
    perf symbols: Support to read compressed module from build-id cache
    perf evsel: Set attr.task bit for a tracking event
    perf header: Set header version correctly
    perf record: Show precise number of samples
    perf tools: Do not use __perf_session__process_events() directly
    perf callchain: Cache eh/debug frame offset for dwarf unwind
    perf tools: Provide stub for missing pthread_attr_setaffinity_np
    perf evsel: Don't rely on malloc working for sz 0
    tools lib traceevent: Add support for IP address formats
    perf ui/tui: Show fatal error message only if exists
    perf tests: Fix typo in sample-parsing.c
    ...

    Linus Torvalds
     

07 Feb, 2015

5 commits

  • Add tracefs_configured() to return true if tracefs is configured in the
    kernel (succeeds to find tracefs), and debugfs_configured() if debugfs
    is configured in the kernel (succeeds to find debugfs).

    Signed-off-by: Steven Rostedt
    Acked-by: Jiri Olsa
    Cc: Andrew Morton
    Cc: Ingo Molnar
    Cc: Masami Hiramatsu
    Cc: Namhyung Kim
    Link: http://lkml.kernel.org/r/20150202193553.190606690@goodmis.org
    Signed-off-by: Arnaldo Carvalho de Melo

    Steven Rostedt (Red Hat)
     
  • Instead of hard coding "/sys/kernel/debug" everywhere, create a macro to
    hold where the default path exists.

    Signed-off-by: Steven Rostedt
    Acked-by: Jiri Olsa
    Cc: Andrew Morton
    Cc: Ingo Molnar
    Cc: Masami Hiramatsu
    Cc: Namhyung Kim
    Link: http://lkml.kernel.org/r/20150202193553.032117017@goodmis.org
    Signed-off-by: Arnaldo Carvalho de Melo

    Steven Rostedt (Red Hat)
     
  • Since tracefs will now hold the event directory for perf, and even
    though by default, debugfs still mounts tracefs on the debugfs/tracing
    directory, the system admin may now choose to not mount debugfs and
    instead just mount tracefs instead.

    Having tracefs helper functions will facilitate having perf look for
    tracefs first, and then try debugfs as a fallback.

    Signed-off-by: Steven Rostedt
    Acked-by: Jiri Olsa
    Cc: Andrew Morton
    Cc: Ingo Molnar
    Cc: Masami Hiramatsu
    Cc: Namhyung Kim
    Link: http://lkml.kernel.org/r/20150202193552.898934751@goodmis.org
    Signed-off-by: Arnaldo Carvalho de Melo

    Steven Rostedt (Red Hat)
     
  • In preparation for adding tracefs for perf to use, create a findfs
    helper utility that find_debugfs uses instead of hard coding the search
    in the code. This will allow for a find_tracefs to be used as well.

    Signed-off-by: Steven Rostedt
    Acked-by: Jiri Olsa
    Cc: Andrew Morton
    Cc: Ingo Molnar
    Cc: Masami Hiramatsu
    Cc: Namhyung Kim
    Link: http://lkml.kernel.org/r/20150202193552.735023362@goodmis.org
    Signed-off-by: Arnaldo Carvalho de Melo

    Steven Rostedt (Red Hat)
     
  • It's rather strange to be checking the debugfs MAGIC number for the
    tracing directory. A system admin may want to have a custom set of
    events to trace and it should be allowed to let the admin make a temp
    file (even for tracing virtual boxes, this is useful).

    Also with the coming tracefs, the files may not even be under debugfs,
    so checking the debugfs MAGIC number is pointless.

    Signed-off-by: Steven Rostedt
    Acked-by: Jiri Olsa
    Cc: Andrew Morton
    Cc: Ingo Molnar
    Cc: Masami Hiramatsu
    Cc: Namhyung Kim
    Link: http://lkml.kernel.org/r/20150202193552.546175764@goodmis.org
    Signed-off-by: Arnaldo Carvalho de Melo

    Steven Rostedt (Red Hat)
     

06 Feb, 2015

1 commit

  • So that we can specify a FILE object where to direct the formatted
    output.

    Cc: Adrian Hunter
    Cc: Borislav Petkov
    Cc: David Ahern
    Cc: Don Zickus
    Cc: Frederic Weisbecker
    Cc: Jiri Olsa
    Cc: Mike Galbraith
    Cc: Namhyung Kim
    Cc: Peter Zijlstra
    Cc: Stephane Eranian
    Cc: Steven Rostedt
    Link: http://lkml.kernel.org/n/tip-a49bhdrx8851f04hppn8bqxq@git.kernel.org
    Signed-off-by: Arnaldo Carvalho de Melo

    Arnaldo Carvalho de Melo
     

30 Jan, 2015

2 commits


26 Jan, 2015

1 commit

  • Add helpers for the following kernel formats:
    %pi4 print an IPv4 address with leading zeros
    %pI4 print an IPv4 address without leading zeros
    %pi6 print an IPv6 address without colons
    %pI6 print an IPv6 address with colons
    %pI6c print an IPv6 address in compressed form with colons
    %pISpc print an IP address from a sockaddr

    Allows these formats to be used in tracepoints.

    Quite a bit of this is adapted from code in lib/vsprintf.c.

    v4:
    - fixed pI6c description in git commit message per Valdis' comment

    v3:
    - use of 'c' and 'p' requires 'I'

    v2:
    - pass ptr+1 to print_ip_arg per Namhyung's comments
    - added field length checks to sockaddr function

    Signed-off-by: David Ahern
    Acked-by: Steven Rostedt
    Cc: Jiri Olsa
    Cc: Namhyung Kim
    Link: http://lkml.kernel.org/r/1418955071-36241-1-git-send-email-dsahern@gmail.com
    Signed-off-by: Arnaldo Carvalho de Melo

    David Ahern
     

23 Jan, 2015

2 commits

  • If debugfs was already mounted, then its a matter of not finding the
    tracepoint, tell the user that perhaps a CONFIG_ setting is not enabled.

    Cc: Adrian Hunter
    Cc: Borislav Petkov
    Cc: David Ahern
    Cc: Don Zickus
    Cc: Frederic Weisbecker
    Cc: Jiri Olsa
    Cc: Namhyung Kim
    Cc: Stephane Eranian
    Link: http://lkml.kernel.org/n/tip-6chfytoflyx3jwfqm7ebltu0@git.kernel.org
    Signed-off-by: Arnaldo Carvalho de Melo

    Arnaldo Carvalho de Melo
     
  • There will be other cases where not just a tracepoint event is being
    opened below the debugfs mountpoint, but it is rather common, so provide
    one helper for that.

    Cc: Adrian Hunter
    Cc: Borislav Petkov
    Cc: David Ahern
    Cc: Don Zickus
    Cc: Frederic Weisbecker
    Cc: Jiri Olsa
    Cc: Namhyung Kim
    Cc: Stephane Eranian
    Link: http://lkml.kernel.org/n/tip-q6e6zct49ql6nbcw8kkg0lbj@git.kernel.org
    Signed-off-by: Arnaldo Carvalho de Melo

    Arnaldo Carvalho de Melo
     

22 Jan, 2015

1 commit

  • It was hardcoded for one specific tracepoint, leftover from its initial
    user: 'perf trace'.

    Cc: Adrian Hunter
    Cc: Borislav Petkov
    Cc: David Ahern
    Cc: Don Zickus
    Cc: Frederic Weisbecker
    Cc: Jiri Olsa
    Cc: Namhyung Kim
    Cc: Stephane Eranian
    Link: http://lkml.kernel.org/n/tip-j1jicvwljy5qx1nah4mkmyke@git.kernel.org
    Signed-off-by: Arnaldo Carvalho de Melo

    Arnaldo Carvalho de Melo