Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Commits on May 27, 2015
  1. @borkmann @davem330

    tools: bpf_jit_disasm: fix segfault on disabled debugging log output

    borkmann authored davem330 committed
    With recent debugging, I noticed that bpf_jit_disasm segfaults when
    there's no debugging output from the JIT compiler to the kernel log.
    
    Reason is that when regexec(3) doesn't match on anything, start/end
    offsets are not being filled out and contain some uninitialized garbage
    from stack. Thus, we need zero out offsets first.
    
    Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
    Signed-off-by: David S. Miller <davem@davemloft.net>
Commits on May 16, 2015
  1. Merge branch 'for-rc' of git://git.kernel.org/pub/scm/linux/kernel/gi…

    authored
    …t/rzhang/linux
    
    Pull thermal fixes from Zhang Rui:
     "Specifics:
    
       - fix an issue in intel_powerclamp driver that idle injection target
         is not accurately maintained on newer Intel CPUs.  Package C8 to
         C10 states are introduced on these CPUs but they were not included
         in the package c-state residency calculation.  From Jacob Pan.
    
       - fix a problem that package c-state idle injection was missing on
         Broadwell server, by adding its id to intel_powerclamp driver.
         From Jacob Pan.
    
       - a couple of small fixes and cleanups from Joe Perches, Mathias
         Krause, Dan Carpenter and Anand Moon"
    
    * 'for-rc' of git://git.kernel.org/pub/scm/linux/kernel/git/rzhang/linux:
      tools/thermal: tmon: fixed the 'make install' command
      thermal: rockchip: fix an error code
      thermal/powerclamp: fix missing newer package c-states
      thermal/intel_powerclamp: add id for broadwell server
      thermal/intel_powerclamp: add __init / __exit annotations
      thermal: Use bool function return values of true/false not 1/0
  2. Merge tag 'linux-kselftest-4.1-rc4' of git://git.kernel.org/pub/scm/l…

    authored
    …inux/kernel/git/shuah/linux-kselftest
    
    Pull kselftest fixes from Shuah Khan:
     "Urgent fix for Kselftest regression introduced in 4.1-rc1 by the new
      x86 test due to its hard dependency on 32-bit build environment.
    
      A set of 5 patches fix the make kselftest run and kselftest install"
    
    * tag 'linux-kselftest-4.1-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest:
      selftests, x86: Rework x86 target architecture detection
      selftests, x86: Remove useless run_tests rule
      selftests/x86: install tests
      selftest/x86: have no dependency on all when cross building
      selftest/x86: build both bitnesses
Commits on May 15, 2015
  1. Merge branch 'liblockdep-fixes' of git://git.kernel.org/pub/scm/linux…

    Ingo Molnar authored
    …/kernel/git/sashal/linux into perf/urgent
    
    Pull liblockdep fixes from Sasha Levin:
    
     "two fixes that deal with compilation errors in liblockdep."
    
    Signed-off-by: Ingo Molnar <mingo@kernel.org>
Commits on May 13, 2015
  1. @sashalevin

    tools/liblockdep: Fix compilation error

    Eunbong Song authored sashalevin committed
    Recent changes to kernel/locking/lockdep.c broke the liblockdep build. Fix
    that.
    
    Signed-off-by: Eunbong Song <eunb.song@samsung.com>
    Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
  2. @sashalevin

    tools/liblockdep: Fix linker error in case of cross compile

    Eunbong Song authored sashalevin committed
    If we try to cross compile liblockdep, even if we set the CROSS_COMPILE variable
    the linker error can occur because LD is not set with CROSS_COMPILE.
    This patch adds "LD" can be set automatically with CROSS_COMPILE variable so
    fixes linker error problem.
    
    Signed-off-by: Eunbong Song <eunb.song@samsung.com>
    Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
  3. selftests, x86: Rework x86 target architecture detection

    Andy Lutomirski authored Shuah Khan committed
    We currently fail to build on a non-multilib x86_64 target.  We
    print a helpful error, but it's nicer to allow the build to succeed.
    Fix it and improve cross-compilation support by detecting
    architecture support directly and building only the relevant tests.
    
    Signed-off-by: Andy Lutomirski <luto@kernel.org>
    Signed-off-by: Shuah Khan <shuahkh@osg.samsung.com>
  4. selftests, x86: Remove useless run_tests rule

    Andy Lutomirski authored Shuah Khan committed
    Now that selftests/x86 uses the kselftest infrastructure, the
    run_x86_tests.sh mechanism is just in the way.
    
    Signed-off-by: Andy Lutomirski <luto@kernel.org>
    Signed-off-by: Shuah Khan <shuahkh@osg.samsung.com>
  5. @EmbeddedAndroid

    selftests/x86: install tests

    EmbeddedAndroid authored Shuah Khan committed
    Include lib.mk and set TEST_PROGS where appropriate.
    
    Cc: Andy Lutomirski <luto@amacapital.net>
    Signed-off-by: Tyler Baker <tyler.baker@linaro.org>
    Signed-off-by: Shuah Khan <shuahkh@osg.samsung.com>
  6. @EmbeddedAndroid

    selftest/x86: have no dependency on all when cross building

    EmbeddedAndroid authored Shuah Khan committed
    If the CROSS_COMPILE is set remove all's dependency on all_32 and all_64.
    
    Cc: Andy Lutomirski <luto@amacapital.net>
    Acked-by: Andy Lutomirski <luto@kernel.org>
    Signed-off-by: Tyler Baker <tyler.baker@linaro.org>
    Signed-off-by: Shuah Khan <shuahkh@osg.samsung.com>
  7. @EmbeddedAndroid

    selftest/x86: build both bitnesses

    EmbeddedAndroid authored Shuah Khan committed
    Using uname with the processor flag option in some cases can yield 'unknown'
    so lets use the machine flag option as it is deterministic. Add a dependency
    for all_32 when building on a x86 64 bit host so that both bitnesses are
    built in this case.
    
    Cc: Andy Lutomirski <luto@amacapital.net>
    Acked-by: Andy Lutomirski <luto@kernel.org>
    Signed-off-by: Tyler Baker <tyler.baker@linaro.org>
    Signed-off-by: Shuah Khan <shuahkh@osg.samsung.com>
Commits on May 12, 2015
  1. @wildea01

    perf tools: Use getconf to determine number of online CPUs

    wildea01 authored Arnaldo Carvalho de Melo committed
    Parsing /proc/cpuinfo is a fiddly, arch-dependent business and a recent
    change to get it working for Sparc broke arm and arm64 platforms.
    
    Use sysconf to determine the number of online CPUs only parsing
    /proc/cpuinfo when sysconf is not available.
    
    Signed-off-by: Will Deacon <will.deacon@arm.com>
    Acked-by: Jiri Olsa <jolsa@kernel.org>
    Tested-by: Arnaldo Carvalho de Melo <acme@redhat.com>
    Cc: David Ahern <david.ahern@oracle.com>
    Cc: Mark Rutland <Mark.Rutland@arm.com>
    Cc: Namhyung Kim <namhyung@kernel.org>
    Link: http://lkml.kernel.org/r/20150423140454.GJ1652@arm.com
    [ Made it fall back to parsing /proc when getconf not found ]
    Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
  2. tools: Fix tools/vm build

    Andi Kleen authored Arnaldo Carvalho de Melo committed
    libabikfs.a doesn't exist anymore, so we now need to link with libapi.a.
    
    Signed-off-by: Andi Kleen <ak@linux.intel.com>
    Cc: Andrew Morton <akpm@linux-foundation.org>
    Link: http://lkml.kernel.org/r/1426199953-15324-1-git-send-email-andi@firstfloor.org
    Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Commits on May 9, 2015
  1. @zhang-rui

    tools/thermal: tmon: fixed the 'make install' command

    Anand Moon authored zhang-rui committed
    To install tmon we issue "make install" which produces bellow error.
    
    root@odroidxu3:/usr/src/odroidxu3-4.y-testing/tools/thermal/tmon# make install
    mkdir -p /usr/bin
    install -m 755 -p "tmon" "/usr/bin/tmon"
    mkdir -p /
    install -m 644 -p "" "/"
    install: cannot stat ‘’: No such file or directory
    make: [install] Error 1 (ignored)
    
    Signed-off-by: Anand Moon <linux.amoon@gmail.com>
    Acked-by: Jacob Pan <jacob.jun.pan@linux.intel.com>
    Signed-off-by: Zhang Rui <rui.zhang@intel.com>
Commits on May 6, 2015
  1. Merge branch 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/…

    authored
    …linux/kernel/git/tip/tip
    
    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
Commits on May 5, 2015
  1. perf probe: Fix segfault if passed with ''.

    Wang Nan authored Arnaldo Carvalho de Melo committed
    Since parse_perf_probe_point() deals with a user passed argument, we
    should not assume it to be a valid string.
    
    Without this patch, if pass '' to perf probe, a segfault raises:
    
     $ perf probe -a ''
     Segmentation fault
    
    This patch checks argument of parse_perf_probe_point() before
    string processing.
    
    After this patch:
    
     $ perf probe -a ''
    
      usage: perf probe [<options>] 'PROBEDEF' ['PROBEDEF' ...]
         or: perf probe [<options>] --add 'PROBEDEF' [--add 'PROBEDEF' ...]
         ...
    
    Signed-off-by: Wang Nan <wangnan0@huawei.com>
    Acked-by: Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com>
    Tested-by: Arnaldo Carvalho de Melo <acme@redhat.com>
    Cc: David Ahern <dsahern@gmail.com>
    Cc: Jiri Olsa <jolsa@kernel.org>
    Cc: Paul Mackerras <paulus@samba.org>
    Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
    Cc: Zefan Li <lizefan@huawei.com>
    Link: http://lkml.kernel.org/r/1430210769-94177-1-git-send-email-wangnan0@huawei.com
    Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Commits on May 1, 2015
  1. @namhyung

    perf report: Fix -T/--threads option to work again

    namhyung authored Arnaldo Carvalho de Melo committed
    The commit 512ae1b ("perf tools: Consolidate management of default
    sort orders") changed default value of the 'sort_order' variable to NULL
    indicating that users don't set any sort keys on the command line.
    
    However it missed to update a check in perf_evlist__tty_browse_hists()
    so that 'perf report -T' cannot show the per-thread values after the
    normal output.  This patch fixes it to work again.
    
    Note that the -T option only works on --stdio and neither --sort nor
    --parent option was given.
    
    Signed-off-by: Namhyung Kim <namhyung@kernel.org>
    Cc: Andi Kleen <andi@firstfloor.org>
    Cc: David Ahern <dsahern@gmail.com>
    Cc: Jiri Olsa <jolsa@redhat.com>
    Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
    Cc: Stephane Eranian <eranian@google.com>
    Link: http://lkml.kernel.org/r/1430309328-28317-1-git-send-email-namhyung@kernel.org
    Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
  2. @mpe

    selftests/powerpc: Fix the pmu install rule

    mpe authored
    My patch to add install support for the powerpc selftests had a typo,
    leading to the three tests in the pmu directory itself not being
    installed.
    
    Fixes: 6faeeea ("selftests: Add install support for the powerpc tests")
    Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Commits on Apr 30, 2015
  1. @mpe

    Revert "powerpc/tm: Abort syscalls in active transactions"

    mpe authored
    This reverts commit feba403.
    
    Although the principle of this change is good, the implementation has a
    few issues.
    
    Firstly we can sometimes fail to abort a syscall because r12 may have
    been clobbered by C code if we went down the virtual CPU accounting
    path, or if syscall tracing was enabled.
    
    Secondly we have decided that it is safer to abort the syscall even
    earlier in the syscall entry path, so that we avoid the syscall tracing
    path when we are transactional.
    
    So that we have time to thoroughly test those changes we have decided to
    revert this for this merge window and will merge the fixed version in
    the next window.
    
    NB. Rather than reverting the selftest we just drop tm-syscall from
    TEST_PROGS so that it's not run by default.
    
    Fixes: feba403 ("powerpc/tm: Abort syscalls in active transactions")
    Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Commits on Apr 27, 2015
  1. @pholasek

    perf bench numa: Fix immediate meeting of convergence condition

    pholasek authored Arnaldo Carvalho de Melo committed
    This patch fixes the race in the beginning of benchmark run when some
    threads hasn't got assigned curr_cpu yet so they don't occur in
    nodes-of-process stats and benchmark concludes that all remaining
    threads are converged already.
    
    The race can be reproduced with small amount of threads and some bigger
    amount of shared process memory, e.g. one process, two threads and 5GB
    of process memory.
    
    Signed-off-by: Petr Holasek <pholasek@redhat.com>
    Reviewed-by: Ingo Molnar <mingo@kernel.org>
    Cc: Jiri Olsa <jolsa@redhat.com>
    Link: http://lkml.kernel.org/r/1429198699-25039-4-git-send-email-pholasek@redhat.com
    Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
  2. @pholasek

    perf bench numa: Fixes of --quiet argument

    pholasek authored Arnaldo Carvalho de Melo committed
    Corrected description and fixed function of --quiet argument.
    
    Signed-off-by: Petr Holasek <pholasek@redhat.com>
    Reviewed-by: Ingo Molnar <mingo@kernel.org>
    Cc: Jiri Olsa <jolsa@redhat.com>
    Link: http://lkml.kernel.org/r/1429198699-25039-2-git-send-email-pholasek@redhat.com
    Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
  3. perf bench futex: Fix hung wakeup tasks after requeueing

    Davidlohr Bueso authored Arnaldo Carvalho de Melo committed
    The futex-requeue benchmark can hang because of missing wakeups once the
    benchmark is done, ie:
    
    [Run 1]: Requeued 1024 of 1024 threads in 0.3290 ms
    perf: couldn't wakeup all tasks (135/1024)
    
    This bug, while perhaps suggesting missing wakeups in kernel futex code,
    is merely a consequence of the crappy FUTEX_CMP_REQUEUE man page,
    incorrectly mentioning that the number of requeued tasks is in fact
    returned, not the wakeups.
    
    This patch acknowledges this and updates the corresponding futex_wake
    code around it.
    
    Signed-off-by: Davidlohr Bueso <dbueso@suse.de>
    Cc: Mel Gorman <mgorman@suse.de>
    Link: http://lkml.kernel.org/r/1429894848.10273.44.camel@stgolabs.net
    Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
  4. perf probe: Fix bug with global variables handling

    He Kuang authored Arnaldo Carvalho de Melo committed
    There are missing curly braces which causes find_variable() return wrong
    value when probing with global variables.
    
    This problem can be reproduced as following:
    
      $ perf probe -v --add='generic_perform_write global_variable_for_test'
      ...
      Try to find probe point from debuginfo.
      Probe point found: generic_perform_write+0
      Searching 'global_variable_for_test' variable in context.
      An error occurred in debuginfo analysis (-2).
        Error: Failed to add events. Reason: No such file or directory (Code: -2)
    
    After this patch:
    
      $ perf probe -v --add='generic_perform_write global_variable_for_test'
      ...
      Converting variable global_variable_for_test into trace event.
      global_variable_for_test type is int.
      Found 1 probe_trace_events.
      Opening /sys/kernel/debug/tracing/kprobe_events write=1
      Added new event:
      Writing event: p:probe/generic_perform_write _stext+1237464
      global_variable_for_test=@global_variable_for_test+0:s32
        probe:generic_perform_write (on generic_perform_write with
        global_variable_for_test)
    
      You can now use it in all perf tools, such as:
    
          perf record -e probe:generic_perform_write -aR sleep 1
    
    Signed-off-by: He Kuang <hekuang@huawei.com>
    Acked-by: Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com>
    Cc: Paul Mackerras <paulus@samba.org>
    Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
    Cc: Wang Nan <wangnan0@huawei.com>
    Link: http://lkml.kernel.org/r/1429949338-18678-1-git-send-email-hekuang@huawei.com
    Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
  5. perf top: Fix a segfault when kernel map is restricted.

    Wang Nan authored Arnaldo Carvalho de Melo committed
    Perf top raise a warning if a kernel sample is collected but kernel map
    is restricted. The warning message needs to dereference al.map->dso...
    
    However, previous perf_event__preprocess_sample() doesn't always
    guarantee al.map != NULL, for example, when kernel map is restricted.
    
    This patch validates al.map before dereferencing, avoid the segfault.
    
    Before this patch:
    
     $ cat /proc/sys/kernel/kptr_restrict
     1
     $ perf top -p  120183
     perf: Segmentation fault
     -------- backtrace --------
     /path/to/perf[0x509868]
     /lib64/libc.so.6(+0x3545f)[0x7f9a1540045f]
     /path/to/perf[0x448820]
     /path/to/perf(cmd_top+0xe3c)[0x44a5dc]
     /path/to/perf[0x4766a2]
     /path/to/perf(main+0x5f5)[0x42e545]
     /lib64/libc.so.6(__libc_start_main+0xf4)[0x7f9a153ecbd4]
     /path/to/perf[0x42e674]
    
    And gdb call trace:
    
     Program received signal SIGSEGV, Segmentation fault.
     perf_event__process_sample (machine=0xa44030, sample=0x7fffffffa4c0, evsel=0xa43b00, event=0x7ffff41c3000, tool=0x7fffffffa8a0)
        at builtin-top.c:736
     736				  !RB_EMPTY_ROOT(&al.map->dso->symbols[MAP__FUNCTION]) ?
     (gdb) bt
     #0  perf_event__process_sample (machine=0xa44030, sample=0x7fffffffa4c0, evsel=0xa43b00, event=0x7ffff41c3000, tool=0x7fffffffa8a0)
         at builtin-top.c:736
     #1  perf_top__mmap_read_idx (top=top@entry=0x7fffffffa8a0, idx=idx@entry=0) at builtin-top.c:855
     #2  0x000000000044a5dd in perf_top__mmap_read (top=0x7fffffffa8a0) at builtin-top.c:872
     #3  __cmd_top (top=0x7fffffffa8a0) at builtin-top.c:997
     #4  cmd_top (argc=<optimized out>, argv=<optimized out>, prefix=<optimized out>) at builtin-top.c:1267
     #5  0x00000000004766a3 in run_builtin (p=p@entry=0x8a6ce8 <commands+264>, argc=argc@entry=3, argv=argv@entry=0x7fffffffdf70)
          at perf.c:371
     #6  0x000000000042e546 in handle_internal_command (argv=0x7fffffffdf70, argc=3) at perf.c:430
     #7  run_argv (argv=0x7fffffffdcf0, argcp=0x7fffffffdcfc) at perf.c:474
     #8  main (argc=3, argv=0x7fffffffdf70) at perf.c:589
     (gdb)
    
    Signed-off-by: Wang Nan <wangnan0@huawei.com>
    Tested-by: Arnaldo Carvalho de Melo <acme@redhat.com>
    Cc: David Ahern <dsahern@gmail.com>
    Cc: Jiri Olsa <jolsa@kernel.org>
    Cc: Paul Mackerras <paulus@samba.org>
    Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
    Cc: Zefan Li <lizefan@huawei.com>
    Link: http://lkml.kernel.org/r/1429946703-80807-1-git-send-email-wangnan0@huawei.com
    Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Commits on Apr 26, 2015
  1. Merge tag 'pm+acpi-4.1-rc1-2' of git://git.kernel.org/pub/scm/linux/k…

    authored
    …ernel/git/rafael/linux-pm
    
    Pull more power management and ACPI updates from Rafael Wysocki:
     "These are fixes mostly (intel_pstate, ACPI core, ACPI EC driver,
      cpupower tool), a new CPU ID for the Intel RAPL driver and one
      intel_pstate driver improvement that didn't make it to my previous
      pull requests due to timing.
    
      Specifics:
    
       - Fix a build warning in the intel_pstate driver showing up in
         non-SMP builds (Borislav Petkov)
    
       - Change one of the intel_pstate's P-state selection parameters for
         Baytrail and Cherrytrail CPUs to significantly improve performance
         at the cost of a small increase in energy consumption (Kristen
         Carlson Accardi)
    
       - Fix a NULL pointer dereference in the ACPI EC driver due to an
         unsafe list walk in the query handler removal routine (Chris
         Bainbridge)
    
       - Get rid of a false-positive lockdep warning in the ACPI container
         hot-remove code (Rafael J Wysocki)
    
       - Prevent the ACPI device enumeration code from creating device
         objects of a wrong type in some cases (Rafael J Wysocki)
    
       - Add Skylake processors support to the Intel RAPL power capping
         driver (Brian Bian)
    
       - Drop the stale MAINTAINERS entry for the ACPI dock driver that is
         regarded as part of the ACPI core and maintained along with it now
         (Chao Yu)
    
       - Fix cpupower tool breakage caused by a library API change in libpci
         3.3.0 (Lucas Stach)"
    
    * tag 'pm+acpi-4.1-rc1-2' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm:
      ACPI / scan: Add a scan handler for PRP0001
      ACPI / scan: Annotate physical_node_lock in acpi_scan_is_offline()
      ACPI / EC: fix NULL pointer dereference in acpi_ec_remove_query_handler()
      MAINTAINERS: remove maintainship entry of docking station driver
      powercap / RAPL: Add support for Intel Skylake processors
      cpufreq: intel_pstate: Fix an annoying !CONFIG_SMP warning
      intel_pstate: Change the setpoint for Atom params
      cpupower: fix breakage from libpci API change
Commits on Apr 24, 2015
  1. @namhyung

    tools lib traceevent: Fix build failure on 32-bit arch

    namhyung authored Arnaldo Carvalho de Melo committed
    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 <namhyung@kernel.org>
    Acked-by: Javi Merino <javi.merino@arm.com>
    Link: http://lkml.kernel.org/r/20150424020218.GF1905@sejong
    Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
  2. perf kmem: Fix compiles on RHEL6/OL6

    David Ahern authored Arnaldo Carvalho de Melo committed
    0d68bc9 breaks compiles on RHEL6/OL6:
        cc1: warnings being treated as errors
        builtin-kmem.c: In function ‘search_page_alloc_stat’:
        builtin-kmem.c:322: error: declaration of ‘stat’ shadows a global declaration
                                node = &parent->rb_left;
        /usr/include/sys/stat.h:455: error: shadowed declaration is here
        builtin-kmem.c: In function ‘perf_evsel__process_page_alloc_event’:
        builtin-kmem.c:378: error: declaration of ‘stat’ shadows a global declaration
        /usr/include/sys/stat.h:455: error: shadowed declaration is here
        builtin-kmem.c: In function ‘perf_evsel__process_page_free_event’:
        builtin-kmem.c:431: error: declaration of ‘stat’ shadows a global declaration
        /usr/include/sys/stat.h:455: error: shadowed declaration is here
    
    Rename local variable to pstat to avoid the name conflict.
    
    Signed-off-by: David Ahern <david.ahern@oracle.com>
    Link: http://lkml.kernel.org/r/1429033773-31383-1-git-send-email-david.ahern@oracle.com
    Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Commits on Apr 23, 2015
  1. @bpowers

    tools lib api: Undefine _FORTIFY_SOURCE before setting it

    bpowers authored Arnaldo Carvalho de Melo committed
    Some toolchains (like Hardened Gentoo) define _FORTIFY_SOURCE in the
    built-in, default args.  This causes perf builds to fail with:
    
    <command-line>:0:0: error: "_FORTIFY_SOURCE" redefined [-Werror]
    <built-in>: 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 <bobbypowers@gmail.com>
    Acked-by: Jiri Olsa <jolsa@kernel.org>
    Cc: Dirk Gouders <dirk@gouders.net>
    Cc: Michal Marek <mmarek@suse.cz>
    Cc: Paul Mackerras <paulus@samba.org>
    Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
    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 <acme@redhat.com>
  2. @wildea01

    perf kmem: Consistently use PRIu64 for printing u64 values

    wildea01 authored Arnaldo Carvalho de Melo committed
    Building the perf tool for 32-bit ARM results in the following build
    error due to a combination of an incorrect conversion specifier and
    compiling with -Werror:
    
      builtin-kmem.c: In function ‘print_page_summary’:
      builtin-kmem.c:644:9: error: format ‘%lu’ expects argument of type ‘long unsigned int’, but argument 3 has type ‘u64’ [-Werror=format=]
               nr_alloc_freed, (total_alloc_freed_bytes) / 1024);
               ^
      builtin-kmem.c:647:9: error: format ‘%lu’ expects argument of type ‘long unsigned int’, but argument 3 has type ‘u64’ [-Werror=format=]
               (total_page_alloc_bytes - total_alloc_freed_bytes) / 1024);
               ^
      cc1: all warnings being treated as errors
    
    This patch fixes the problem by consistently using PRIu64 for printing
    out u64 values.
    
    Signed-off-by: Will Deacon <will.deacon@arm.com>
    Cc: David Ahern <dsahern@gmail.com>
    Cc: Jiri Olsa <jolsa@redhat.com>
    Cc: Joonsoo Kim <js1304@gmail.com>
    Cc: Minchan Kim <minchan@kernel.org>
    Cc: Namhyung Kim <namhyung@kernel.org>
    Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
    Link: http://lkml.kernel.org/r/1429796437-1790-1-git-send-email-will.deacon@arm.com
    Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
  3. perf trace: Disable events and drain events when forked workload ends

    Arnaldo Carvalho de Melo authored
    We were not checking in the inner event processing loop if the forked workload
    had finished, which, on a busy system, may make it take a long time trying to
    drain events, entering a seemingly neverending loop, waiting for the system to
    get idle enough to make it drain the buffers.
    
    Fix it by disabling the events when 'done' is true, in the inner loop, to start
    draining what is in the buffers.
    
    Now:
    
    [root@ssdandy ~]# time trace --filter-pids 14003 -a sleep 1 | tail
      996.748 ( 0.002 ms): sh/30296 rt_sigprocmask(how: SETMASK, nset: 0x7ffc83418160, sigsetsize: 8) = 0
      996.751 ( 0.002 ms): sh/30296 rt_sigprocmask(how: BLOCK, nset: 0x7ffc834181f0, oset: 0x7ffc83418270, sigsetsize: 8) = 0
      996.755 ( 0.002 ms): sh/30296 rt_sigaction(sig: INT, act: 0x7ffc83417f50, oact: 0x7ffc83417ff0, sigsetsize: 8) = 0
     1004.543 ( 0.362 ms): tail/30198  ... [continued]: read()) = 4096
     1004.548 ( 7.791 ms): sh/30296 wait4(upid: -1, stat_addr: 0x7ffc834181a0) ...
     1004.975 ( 0.427 ms): tail/30198 read(buf: 0x7633f0, count: 8192) = 4096
     1005.390 ( 0.410 ms): tail/30198 read(buf: 0x765410, count: 8192) = 4096
     1005.743 ( 0.348 ms): tail/30198 read(buf: 0x7633f0, count: 8192) = 4096
     1006.197 ( 0.449 ms): tail/30198 read(buf: 0x765410, count: 8192) = 4096
     1006.492 ( 0.290 ms): tail/30198 read(buf: 0x7633f0, count: 8192) = 4096
    
    real	0m1.219s
    user	0m0.704s
    sys	0m0.331s
    [root@ssdandy ~]#
    
    Reported-by: Michael Petlan <mpetlan@redhat.com>
    Suggested-by: Jiri Olsa <jolsa@redhat.com>
    Acked-by: Jiri Olsa <jolsa@redhat.com>
    Cc: Adrian Hunter <adrian.hunter@intel.com>
    Cc: Borislav Petkov <bp@suse.de>
    Cc: David Ahern <dsahern@gmail.com>
    Cc: Don Zickus <dzickus@redhat.com>
    Cc: Frederic Weisbecker <fweisbec@gmail.com>
    Cc: Namhyung Kim <namhyung@kernel.org>
    Cc: Stephane Eranian <eranian@google.com>
    Link: http://lkml.kernel.org/n/tip-p6kpn1b26qcbe47pufpw0tex@git.kernel.org
    Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
  4. perf trace: Enable events when doing system wide tracing and starting…

    Arnaldo Carvalho de Melo authored
    … a workload
    
     commit f7aa222
     Author: Arnaldo Carvalho de Melo <acme@redhat.com>
     Date:   Tue Feb 3 13:25:39 2015 -0300
    
        perf trace: No need to enable evsels for workload started from perf
    
    The assumption was that whenever a workload is specified, the
    attr.enable_on_exec evsel flag would be set, but that is not happening
    when perf_record_opts.system_wide is set, for instance
    
    That resulted in both perf_evlist__enable() and attr.enable_on_exec
    being not called/set, which made the events to remain disabled while the
    workload runs, producing no output.
    
    Fix it,  by calling perf_evlist__enable() in the 'trace' tool
    when forking and not targetting a workload started from trace
    
    v2: Test against !target__none(), as suggested by Namhyung Kim, that is
    what is used in perf_evsel__config() when deciding if the
    attr.enable_on_exec flag to be set. More work is needed to cover other
    cases such as opts->initial_delay.
    
    Acked-by: Jiri Olsa <jolsa@redhat.com>
    Cc: Adrian Hunter <adrian.hunter@intel.com>
    Cc: Borislav Petkov <bp@suse.de>
    Cc: David Ahern <dsahern@gmail.com>
    Cc: Don Zickus <dzickus@redhat.com>
    Cc: Frederic Weisbecker <fweisbec@gmail.com>
    Cc: Namhyung Kim <namhyung@kernel.org>
    Cc: Stephane Eranian <eranian@google.com>
    Link: http://lkml.kernel.org/n/tip-27z7169pvfxgj8upic636syv@git.kernel.org
    Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Commits on Apr 21, 2015
  1. Merge tag 'char-misc-4.1-rc1' of git://git.kernel.org/pub/scm/linux/k…

    authored
    …ernel/git/gregkh/char-misc
    
    Pull char/misc driver updates from Greg KH:
     "Here's the big char/misc driver patchset for 4.1-rc1.
    
      Lots of different driver subsystem updates here, nothing major, full
      details are in the shortlog.
    
      All of this has been in linux-next for a while"
    
    * tag 'char-misc-4.1-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc: (133 commits)
      mei: trace: remove unused TRACE_SYSTEM_STRING
      DTS: ARM: OMAP3-N900: Add lis3lv02d support
      Documentation: DT: lis302: update wakeup binding
      lis3lv02d: DT: add wakeup unit 2 and wakeup threshold
      lis3lv02d: DT: use s32 to support negative values
      Drivers: hv: hv_balloon: correctly handle num_pages>INT_MAX case
      Drivers: hv: hv_balloon: correctly handle val.freeram<num_pages case
      mei: replace check for connection instead of transitioning
      mei: use mei_cl_is_connected consistently
      mei: fix mei_poll operation
      hv_vmbus: Add gradually increased delay for retries in vmbus_post_msg()
      Drivers: hv: hv_balloon: survive ballooning request with num_pages=0
      Drivers: hv: hv_balloon: eliminate jumps in piecewiese linear floor function
      Drivers: hv: hv_balloon: do not online pages in offline blocks
      hv: remove the per-channel workqueue
      hv: don't schedule new works in vmbus_onoffer()/vmbus_onoffer_rescind()
      hv: run non-blocking message handlers in the dispatch tasklet
      coresight: moving to new "hwtracing" directory
      coresight-tmc: Adding a status interface to sysfs
      coresight: remove the unnecessary configuration coresight-default-sink
      ...
Commits on Apr 19, 2015
  1. Merge branch 'turbostat' of git://git.kernel.org/pub/scm/linux/kernel…

    authored
    …/git/lenb/linux
    
    Pull turbostat update from Len Brown:
     "Updates to the turbostat utility.
    
      Just one kernel dependency in this batch -- added a #define to
      msr-index.h"
    
    * 'turbostat' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux:
      tools/power turbostat: correct dumped pkg-cstate-limit value
      tools/power turbostat: calculate TSC frequency from CPUID(0x15) on SKL
      tools/power turbostat: correct DRAM RAPL units on recent Xeon processors
      tools/power turbostat: Initial Skylake support
      tools/power turbostat: Use $(CURDIR) instead of $(PWD) and add support for O= option in Makefile
      tools/power turbostat: modprobe msr, if needed
      tools/power turbostat: dump MSR_TURBO_RATIO_LIMIT2
      tools/power turbostat: use new MSR_TURBO_RATIO_LIMIT names
      x86 msr-index: define MSR_TURBO_RATIO_LIMIT,1,2
      tools/power turbostat: label base frequency
      tools/power turbostat: update PERF_LIMIT_REASONS decoding
      tools/power turbostat: simplify default output
  2. Merge branches 'pm-cpufreq', 'powercap' and 'pm-tools'

    Rafael J. Wysocki authored
    * pm-cpufreq:
      cpufreq: intel_pstate: Fix an annoying !CONFIG_SMP warning
      intel_pstate: Change the setpoint for Atom params
    
    * powercap:
      powercap / RAPL: Add support for Intel Skylake processors
    
    * pm-tools:
      cpupower: fix breakage from libpci API change
Commits on Apr 18, 2015
  1. @lenb

    tools/power turbostat: correct dumped pkg-cstate-limit value

    lenb authored
    HSW expanded MSR_PKG_CST_CONFIG_CONTROL.Package-C-State-Limit,
    from bits[2:0] used by previous implementations, to [3:0].
    The value 1000b is unlimited, and is used by BDW and SKL too.
    
    Signed-off-by: Len Brown <len.brown@intel.com>
Something went wrong with that request. Please try again.