29 Mar, 2012

5 commits

  • hugepage-mmap.c, hugepage-shm.c and map_hugetlb.c in Documentation/vm are
    simple pass/fail tests, It's better to promote them to
    tools/testing/selftests.

    Thanks suggestion of Andrew Morton about this. They all need firstly
    setting up proper nr_hugepages and hugepage-mmap need to mount hugetlbfs.
    So I add a shell script run_vmtests to do such work which will call the
    three test programs and check the return value of them.

    Changes to original code including below:
    a. add run_vmtests script
    b. return error when read_bytes mismatch with writed bytes.
    c. coding style fixes: do not use assignment in if condition

    [akpm@linux-foundation.org: build the targets before trying to execute them]
    [akpm@linux-foundation.org: Documentation/vm/ no longer has a Makefile. Fixes "make clean"]
    Signed-off-by: Dave Young
    Cc: Wu Fengguang
    Cc: Christoph Lameter
    Cc: Pekka Enberg
    Cc: Frederic Weisbecker
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Dave Young
     
  • We have tools/vm/ folder for vm tools, so move slabinfo.c from tools/slub/
    to tools/vm/

    Signed-off-by: Dave Young
    Cc: Wu Fengguang
    Acked-by: Christoph Lameter
    Cc: Pekka Enberg
    Cc: Frederic Weisbecker
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Dave Young
     
  • tools/ is the better place for vm tools which are used by many people.
    Moving them to tools also make them open to more users instead of hide in
    Documentation folder.

    This patch moves page-types.c to tools/vm/page-types.c. Also add a
    Makefile in tools/vm and fix two coding style problems: a) change const
    arrary to 'const char * const', b) change a space to tab for indent.

    Signed-off-by: Dave Young
    Acked-by: Wu Fengguang
    Cc: Christoph Lameter
    Cc: Pekka Enberg
    Cc: Frederic Weisbecker
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Dave Young
     
  • So a "make run_tests" will build the tests before trying to run them.

    Acked-by: Frederic Weisbecker
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Andrew Morton
     
  • Remove the run_tests script and launch the selftests by calling "make
    run_tests" from the selftests top directory instead. This delegates to
    the Makefile in each selftest directory, where it is decided how to launch
    the local test.

    This removes the need to add each selftest directory to the now removed
    "run_tests" top script.

    Signed-off-by: Frederic Weisbecker
    Cc: Dave Young
    Cc: Christoph Lameter
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Frederic Weisbecker
     

28 Mar, 2012

1 commit

  • Pull networking fixes from David Miller:
    1) Name string overrun fix in gianfar driver from Joe Perches.

    2) VHOST bug fixes from Michael S. Tsirkin and Nadav Har'El

    3) Fix dependencies on xt_LOG netfilter module, from Pablo Neira Ayuso.

    4) Fix RCU locking in xt_CT, also from Pablo Neira Ayuso.

    5) Add a parameter to skb_add_rx_frag() so we can fix the truesize
    adjustments in the drivers that use it. The individual drivers
    aren't fixed by this commit, but will be dealt with using follow-on
    commits. From Eric Dumazet.

    6) Add some device IDs to qmi_wwan driver, from Andrew Bird.

    7) Fix a potential rcu_read_lock() imbalancein rt6_fill_node(). From
    Eric Dumazet.

    * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net:
    net: fix a potential rcu_read_lock() imbalance in rt6_fill_node()
    net: add a truesize parameter to skb_add_rx_frag()
    gianfar: Fix possible overrun and simplify interrupt name field creation
    USB: qmi_wwan: Add ZTE (Vodafone) K3570-Z and K3571-Z net interfaces
    USB: option: Ignore ZTE (Vodafone) K3570/71 net interfaces
    USB: qmi_wwan: Add ZTE (Vodafone) K3565-Z and K4505-Z net interfaces
    qlcnic: Bug fix for LRO
    netfilter: nf_conntrack: permanently attach timeout policy to conntrack
    netfilter: xt_CT: fix assignation of the generic protocol tracker
    netfilter: xt_CT: missing rcu_read_lock section in timeout assignment
    netfilter: cttimeout: fix dependency with l4protocol conntrack module
    netfilter: xt_LOG: use CONFIG_IP6_NF_IPTABLES instead of CONFIG_IPV6
    vhost: fix release path lockdep checks
    vhost: don't forget to schedule()
    tools/virtio: stub out strong barriers
    tools/virtio: add linux/hrtimer.h stub
    tools/virtio: add linux/module.h stub

    Linus Torvalds
     

24 Mar, 2012

3 commits


23 Mar, 2012

1 commit

  • Pull x86/build changes from Ingo Molnar.

    * 'x86-build-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
    x86, build: Fix portability issues when cross-building
    x86, tools: Remove unneeded header files from tools/build.c
    USB: ffs-test: Don't duplicate {get,put}_unaligned*() functions
    x86, efi: Fix endian issues and unaligned accesses
    x86, boot: Restrict CFLAGS for hostprogs
    x86, mkpiggy: Don't open code put_unaligned_le32()
    x86, relocs: Don't open code put_unaligned_le32()
    tools/include: Add byteshift headers for endian access

    Linus Torvalds
     

21 Mar, 2012

9 commits

  • The option REBOOT_ON_SUCCESS is global, and will have the machine reboot
    the the box if all tests are successful. But a test may not want the
    machine to reboot, and perhaps have the kernel it loaded be used to
    install the next kernel. Or the last test may set up a kernel that the
    user may want to look at. In this case, the user could have the global
    option REBOOT_ON_SUCCESS be true, but if a test is defined to run at the
    end, that test can override the global option and keep the kernel it
    installed for the user to log in with.

    Signed-off-by: Steven Rostedt

    Steven Rostedt
     
  • When the option SWITCH_TO_GOOD is set, it will be called when the system
    needs to reboot to the good server. But currently, this keeps the reboot
    from happening. The SWITCH_TO_GOOD is just a way to get to a new kernel,
    it may not mean to not reboot.

    Signed-off-by: Steven Rostedt

    Steven Rostedt
     
  • Currently the option used to scp both the modules to the target as well
    as the kernel image are the same (SCP_TO_TARGET). But some embedded
    boards may require them to be different. The modules may need to be put
    directly on the board, but the kernel image may need to go to a
    tftpserver.

    Add the option SCP_TO_TARGET_INSTALL that will allow the user to change
    the config so that they may have the modules and image got to different
    machines.

    Signed-off-by: Steven Rostedt

    Steven Rostedt
     
  • When IGNORE_ERRORS is set, ktest will not fail a test if a backtrace
    is detected. But this can be an issue if the user added it in the
    config but forgot to remove it. They may be left wondering why their
    test did not fail, or even worse, why their bisect gave the wrong
    commit.

    Add a warning in the output if IGNORE_WARNINGS is set, and ktest detects
    a kernel error.

    Signed-off-by: Steven Rostedt

    Steven Rostedt
     
  • To keep the modules from bloating the target's filesystem
    strip them during the install.

    Signed-off-by: Steven Rostedt

    Steven Rostedt
     
  • Pull trivial tree from Jiri Kosina:
    "It's indeed trivial -- mostly documentation updates and a bunch of
    typo fixes from Masanari.

    There are also several linux/version.h include removals from Jesper."

    * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial: (101 commits)
    kcore: fix spelling in read_kcore() comment
    constify struct pci_dev * in obvious cases
    Revert "char: Fix typo in viotape.c"
    init: fix wording error in mm_init comment
    usb: gadget: Kconfig: fix typo for 'different'
    Revert "power, max8998: Include linux/module.h just once in drivers/power/max8998_charger.c"
    writeback: fix fn name in writeback_inodes_sb_nr_if_idle() comment header
    writeback: fix typo in the writeback_control comment
    Documentation: Fix multiple typo in Documentation
    tpm_tis: fix tis_lock with respect to RCU
    Revert "media: Fix typo in mixer_drv.c and hdmi_drv.c"
    Doc: Update numastat.txt
    qla4xxx: Add missing spaces to error messages
    compiler.h: Fix typo
    security: struct security_operations kerneldoc fix
    Documentation: broken URL in libata.tmpl
    Documentation: broken URL in filesystems.tmpl
    mtd: simplify return logic in do_map_probe()
    mm: fix comment typo of truncate_inode_pages_range
    power: bq27x00: Fix typos in comment
    ...

    Linus Torvalds
     
  • Pull USB merge for 3.4-rc1 from Greg KH:
    "Here's the big USB merge for the 3.4-rc1 merge window.

    Lots of gadget driver reworks here, driver updates, xhci changes, some
    new drivers added, usb-serial core reworking to fix some bugs, and
    other various minor things.

    There are some patches touching arch code, but they have all been
    acked by the various arch maintainers."

    * tag 'usb-3.3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb: (302 commits)
    net: qmi_wwan: add support for ZTE MF820D
    USB: option: add ZTE MF820D
    usb: gadget: f_fs: Remove lock is held before freeing checks
    USB: option: make interface blacklist work again
    usb/ub: deprecate & schedule for removal the "Low Performance USB Block" driver
    USB: ohci-pxa27x: add clk_prepare/clk_unprepare calls
    USB: use generic platform driver on ath79
    USB: EHCI: Add a generic platform device driver
    USB: OHCI: Add a generic platform device driver
    USB: ftdi_sio: new PID: LUMEL PD12
    USB: ftdi_sio: add support for FT-X series devices
    USB: serial: mos7840: Fixed MCS7820 device attach problem
    usb: Don't make USB_ARCH_HAS_{XHCI,OHCI,EHCI} depend on USB_SUPPORT.
    usb gadget: fix a section mismatch when compiling g_ffs with CONFIG_USB_FUNCTIONFS_ETH
    USB: ohci-nxp: Remove i2c_write(), use smbus
    USB: ohci-nxp: Support for LPC32xx
    USB: ohci-nxp: Rename symbols from pnx4008 to nxp
    USB: OHCI-HCD: Rename ohci-pnx4008 to ohci-nxp
    usb: gadget: Kconfig: fix typo for 'different'
    usb: dwc3: pci: fix another failure path in dwc3_pci_probe()
    ...

    Linus Torvalds
     
  • Pull driver core patches for 3.4-rc1 from Greg KH:
    "Here's the big driver core merge for 3.4-rc1.

    Lots of various things here, sysfs fixes/tweaks (with the nlink
    breakage reverted), dynamic debugging updates, w1 drivers, hyperv
    driver updates, and a variety of other bits and pieces, full
    information in the shortlog."

    * tag 'driver-core-3.3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core: (78 commits)
    Tools: hv: Support enumeration from all the pools
    Tools: hv: Fully support the new KVP verbs in the user level daemon
    Drivers: hv: Support the newly introduced KVP messages in the driver
    Drivers: hv: Add new message types to enhance KVP
    regulator: Support driver probe deferral
    Revert "sysfs: Kill nlink counting."
    uevent: send events in correct order according to seqnum (v3)
    driver core: minor comment formatting cleanups
    driver core: move the deferred probe pointer into the private area
    drivercore: Add driver probe deferral mechanism
    DS2781 Maxim Stand-Alone Fuel Gauge battery and w1 slave drivers
    w1_bq27000: Only one thread can access the bq27000 at a time.
    w1_bq27000 - remove w1_bq27000_write
    w1_bq27000: remove unnecessary NULL test.
    sysfs: Fix memory leak in sysfs_sd_setsecdata().
    intel_idle: Revert change of auto_demotion_disable_flags for Nehalem
    w1: Fix w1_bq27000
    driver-core: documentation: fix up Greg's email address
    powernow-k6: Really enable auto-loading
    powernow-k7: Fix CPU family number
    ...

    Linus Torvalds
     
  • Pull perf events changes for v3.4 from Ingo Molnar:

    - New "hardware based branch profiling" feature both on the kernel and
    the tooling side, on CPUs that support it. (modern x86 Intel CPUs
    with the 'LBR' hardware feature currently.)

    This new feature is basically a sophisticated 'magnifying glass' for
    branch execution - something that is pretty difficult to extract from
    regular, function histogram centric profiles.

    The simplest mode is activated via 'perf record -b', and the result
    looks like this in perf report:

    $ perf record -b any_call,u -e cycles:u branchy

    $ perf report -b --sort=symbol
    52.34% [.] main [.] f1
    24.04% [.] f1 [.] f3
    23.60% [.] f1 [.] f2
    0.01% [k] _IO_new_file_xsputn [k] _IO_file_overflow
    0.01% [k] _IO_vfprintf_internal [k] _IO_new_file_xsputn
    0.01% [k] _IO_vfprintf_internal [k] strchrnul
    0.01% [k] __printf [k] _IO_vfprintf_internal
    0.01% [k] main [k] __printf

    This output shows from/to branch columns and shows the highest
    percentage (from,to) jump combinations - i.e. the most likely taken
    branches in the system. "branches" can also include function calls
    and any other synchronous and asynchronous transitions of the
    instruction pointer that are not 'next instruction' - such as system
    calls, traps, interrupts, etc.

    This feature comes with (hopefully intuitive) flat ascii and TUI
    support in perf report.

    - Various 'perf annotate' visual improvements for us assembly junkies.
    It will now recognize function calls in the TUI and by hitting enter
    you can follow the call (recursively) and back, amongst other
    improvements.

    - Multiple threads/processes recording support in perf record, perf
    stat, perf top - which is activated via a comma-list of PIDs:

    perf top -p 21483,21485
    perf stat -p 21483,21485 -ddd
    perf record -p 21483,21485

    - Support for per UID views, via the --uid paramter to perf top, perf
    report, etc. For example 'perf top --uid mingo' will only show the
    tasks that I am running, excluding other users, root, etc.

    - Jump label restructurings and improvements - this includes the
    factoring out of the (hopefully much clearer) include/linux/static_key.h
    generic facility:

    struct static_key key = STATIC_KEY_INIT_FALSE;

    ...

    if (static_key_false(&key))
    do unlikely code
    else
    do likely code

    ...
    static_key_slow_inc();
    ...
    static_key_slow_inc();
    ...

    The static_key_false() branch will be generated into the code with as
    little impact to the likely code path as possible. the
    static_key_slow_*() APIs flip the branch via live kernel code patching.

    This facility can now be used more widely within the kernel to
    micro-optimize hot branches whose likelihood matches the static-key
    usage and fast/slow cost patterns.

    - SW function tracer improvements: perf support and filtering support.

    - Various hardenings of the perf.data ABI, to make older perf.data's
    smoother on newer tool versions, to make new features integrate more
    smoothly, to support cross-endian recording/analyzing workflows
    better, etc.

    - Restructuring of the kprobes code, the splitting out of 'optprobes',
    and a corner case bugfix.

    - Allow the tracing of kernel console output (printk).

    - Improvements/fixes to user-space RDPMC support, allowing user-space
    self-profiling code to extract PMU counts without performing any
    system calls, while playing nice with the kernel side.

    - 'perf bench' improvements

    - ... and lots of internal restructurings, cleanups and fixes that made
    these features possible. And, as usual this list is incomplete as
    there were also lots of other improvements

    * 'perf-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (120 commits)
    perf report: Fix annotate double quit issue in branch view mode
    perf report: Remove duplicate annotate choice in branch view mode
    perf/x86: Prettify pmu config literals
    perf report: Enable TUI in branch view mode
    perf report: Auto-detect branch stack sampling mode
    perf record: Add HEADER_BRANCH_STACK tag
    perf record: Provide default branch stack sampling mode option
    perf tools: Make perf able to read files from older ABIs
    perf tools: Fix ABI compatibility bug in print_event_desc()
    perf tools: Enable reading of perf.data files from different ABI rev
    perf: Add ABI reference sizes
    perf report: Add support for taken branch sampling
    perf record: Add support for sampling taken branch
    perf tools: Add code to support PERF_SAMPLE_BRANCH_STACK
    x86/kprobes: Split out optprobe related code to kprobes-opt.c
    x86/kprobes: Fix a bug which can modify kernel code permanently
    x86/kprobes: Fix instruction recovery on optimized path
    perf: Add callback to flush branch_stack on context switch
    perf: Disable PERF_SAMPLE_BRANCH_* when not supported
    perf/x86: Add LBR software filter support for Intel CPUs
    ...

    Linus Torvalds
     

17 Mar, 2012

3 commits

  • We have only supported enumeration only from the AUTO pool. Now support
    enumeration from all the available pools.

    Signed-off-by: K. Y. Srinivasan
    Reviewed-by: Haiyang Zhang
    Reviewed-by: Dan Carpenter
    Signed-off-by: Greg Kroah-Hartman

    K. Y. Srinivasan
     
  • Now fully support the new KVP messages in the user level daemon. Hyper-V defines
    multiple persistent pools to which the host can write/read/modify KVP tuples.
    In this patch we implement a file for each specified pool, where the KVP tuples
    will be stored in the guest.

    Signed-off-by: K. Y. Srinivasan
    Reviewed-by: Haiyang Zhang
    Reviewed-by: Dan Carpenter
    Signed-off-by: Greg Kroah-Hartman

    K. Y. Srinivasan
     
  • Support the newly defined KVP message types. It turns out that the host
    pushes a set of standard key value pairs as soon as the guest opens the KVP channel.
    Since we cannot handle these tuples until the user level daemon loads up, defer
    reading the KVP channel until the user level daemon is launched.

    Signed-off-by: K. Y. Srinivasan
    Reviewed-by: Haiyang Zhang
    Reviewed-by: Dan Carpenter
    Signed-off-by: Greg Kroah-Hartman

    K. Y. Srinivasan
     

14 Mar, 2012

5 commits

  • On ancient systems I get this build failure:

    util/../../../arch/x86/include/asm/unistd.h:67:29: error: asm/unistd_64.h: No such file or directory
    In file included from util/cache.h:7,
    from builtin-test.c:8:
    util/../perf.h: In function ‘sys_perf_event_open’:In file included from util/../perf.h:16
    perf.h:170: error: ‘__NR_perf_event_open’ undeclared (first use in this function)

    The reason is that this old system does not have the split
    unistd.h headers yet, from which to pick up the syscall
    definitions.

    Add the syscall numbers to the already existing i386 and x86_64
    blocks in perf.h, and also provide empty include file stubs.

    With this patch perf builds and works fine on 5 years old
    user-space as well.

    Cc: Peter Zijlstra
    Cc: Arnaldo Carvalho de Melo
    Link: http://lkml.kernel.org/n/tip-jctwg64le1w47tuaoeyftsg9@git.kernel.org
    Signed-off-by: Ingo Molnar
    Signed-off-by: Arnaldo Carvalho de Melo

    Ingo Molnar
     
  • Several places were expecting that the value returned was the number of
    characters printed, not what would be printed if there was space.

    Fix it by using the scnprintf and vscnprintf variants we inherited from
    the kernel sources.

    Some corner cases where the number of printed characters were not
    accounted were fixed too.

    Reported-by: Anton Blanchard
    Cc: Anton Blanchard
    Cc: Eric B Munson
    Cc: David Ahern
    Cc: Frederic Weisbecker
    Cc: Mike Galbraith
    Cc: Paul Mackerras
    Cc: Peter Zijlstra
    Cc: Stephane Eranian
    Cc: Yanmin Zhang
    Cc: stable@kernel.org
    Link: http://lkml.kernel.org/n/tip-kwxo2eh29cxmd8ilixi2005x@git.kernel.org
    Signed-off-by: Arnaldo Carvalho de Melo

    Arnaldo Carvalho de Melo
     
  • I have a workload where perf top scribbles over the stack and we SEGV.
    What makes it interesting is that an snprintf is causing this.

    The workload is a c++ gem that has method names over 3000 characters
    long, but snprintf is designed to avoid overrunning buffers. So what
    went wrong?

    The problem is we assume snprintf returns the number of characters
    written:

    ret += repsep_snprintf(bf + ret, size - ret, "[%c] ", self->level);
    ...
    ret += repsep_snprintf(bf + ret, size - ret, "%s", self->ms.sym->name);

    Unfortunately this is not how snprintf works. snprintf returns the
    number of characters that would have been written if there was enough
    space. In the above case, if the first snprintf returns a value larger
    than size, we pass a negative size into the second snprintf and happily
    scribble over the stack. If you have 3000 character c++ methods thats a
    lot of stack to trample.

    This patch fixes repsep_snprintf by clamping the value at size - 1 which
    is the maximum snprintf can write before adding the NULL terminator.

    I get the sinking feeling that there are a lot of other uses of snprintf
    that have this same bug, we should audit them all.

    Cc: David Ahern
    Cc: Eric B Munson
    Cc: Frederic Weisbecker
    Cc: Ingo Molnar
    Cc: Paul Mackerras
    Cc: Peter Zijlstra
    Cc: Yanmin Zhang
    Cc: stable@kernel.org
    Link: http://lkml.kernel.org/r/20120307114249.44275ca3@kryten
    Signed-off-by: Anton Blanchard
    Signed-off-by: Arnaldo Carvalho de Melo

    Anton Blanchard
     
  • Add additional KVP (Key Value Pair) protocol messages to
    enhance KVP functionality for Linux guests on Hyper-V. As part of this,
    patch define an explicit version negoitiation message.

    Reviewed-by: Haiyang Zhang
    Signed-off-by: K. Y. Srinivasan
    Signed-off-by: Greg Kroah-Hartman

    K. Y. Srinivasan
     
  • This patch fixes a buffer overrun bug in
    tracepoint_id_to_path(). The bug manisfested itself as a memory
    error reported by perf record. I ran into it with perf sched:

    $ perf sched rec noploop 2 noploop for 2 seconds
    [ perf record: Woken up 14 times to write data ]
    [ perf record: Captured and wrote 42.701 MB perf.data (~1865622 samples) ]
    Fatal: No memory to alloc tracepoints list

    It turned out that tracepoint_id_to_path() was reading the
    tracepoint id using read() but the buffer was not large enough
    to include the \n terminator for id with 4 digits or more.

    The patch fixes the problem by extending the buffer to a more
    reasonable size covering all possible id length include \n
    terminator. Note that atoll() stops at the first non digit
    character, thus it is not necessary to clear the buffer between
    each read.

    Signed-off-by: Stephane Eranian
    Acked-by: Arnaldo Carvalho de Melo
    Acked-by: Peter Zijlstra
    Cc: fweisbec@gmail.com
    Cc: dsahern@gmail.com
    Link: http://lkml.kernel.org/r/20120313155102.GA6465@quad
    Signed-off-by: Ingo Molnar

    Stephane Eranian
     

13 Mar, 2012

5 commits

  • Merge reason: The 'perf record -b' hardware branch sampling feature is ready for upstream.

    Signed-off-by: Ingo Molnar

    Ingo Molnar
     
  • This patch fixes perf report to not go back two levels when
    pressing the 'q' key while annotating in branch view mode.

    When pressing 'q' in annotate mode and if the branch source
    and target belong to different functions, perf now brings
    up the annotation popup menu again to offer the option to
    annotate the other branch source or target.

    As part of the code restructuring in perf_evsel__hists_browse()
    we also fix a memory leak on options[] in case of error.

    Signed-off-by: Stephane Eranian
    Cc: peterz@infradead.org
    Cc: acme@redhat.com
    Cc: asharma@fb.com
    Cc: ravitillo@lbl.gov
    Cc: vweaver1@eecs.utk.edu
    Cc: khandual@linux.vnet.ibm.com
    Cc: dsahern@gmail.com
    Link: http://lkml.kernel.org/r/1331565210-10865-3-git-send-email-eranian@google.com
    Signed-off-by: Ingo Molnar

    Stephane Eranian
     
  • This patch removes the duplicated annotate selection when
    browsing in branch view mode. If the sym and dso oof the branch
    source and target are the same, then only one annotate choice is
    proposed.

    Signed-off-by: Stephane Eranian
    Cc: peterz@infradead.org
    Cc: acme@redhat.com
    Cc: asharma@fb.com
    Cc: ravitillo@lbl.gov
    Cc: vweaver1@eecs.utk.edu
    Cc: khandual@linux.vnet.ibm.com
    Cc: dsahern@gmail.com
    Link: http://lkml.kernel.org/r/1331565210-10865-2-git-send-email-eranian@google.com
    Signed-off-by: Ingo Molnar

    Stephane Eranian
     
  • Merge reason: We are going to queue up a dependent patch.

    Signed-off-by: Ingo Molnar

    Ingo Molnar
     
  • This resolves the conflict with drivers/usb/host/ehci-fsl.h that
    happened with changes in Linus's and this branch at the same time.

    Signed-off-by: Greg Kroah-Hartman

    Greg Kroah-Hartman
     

10 Mar, 2012

1 commit


09 Mar, 2012

7 commits

  • This patch updates perf report to support TUI mode
    when the perf.data file contains samples with branch
    stacks.

    For each row in the report, it is possible to annotate
    either the source or target of each branch.

    Signed-off-by: Stephane Eranian
    Cc: peterz@infradead.org
    Cc: acme@redhat.com
    Cc: asharma@fb.com
    Cc: ravitillo@lbl.gov
    Cc: vweaver1@eecs.utk.edu
    Cc: khandual@linux.vnet.ibm.com
    Cc: dsahern@gmail.com
    Link: http://lkml.kernel.org/r/1331246868-19905-5-git-send-email-eranian@google.com
    Signed-off-by: Ingo Molnar

    Stephane Eranian
     
  • This patch enhances perf report to auto-detect when the
    perf.data file contains samples with branch stacks. That way it
    is not necessary to use the -b option.

    To force branch view mode to off, simply use --no-branch-stack.

    Signed-off-by: Stephane Eranian
    Cc: peterz@infradead.org
    Cc: acme@redhat.com
    Cc: asharma@fb.com
    Cc: ravitillo@lbl.gov
    Cc: vweaver1@eecs.utk.edu
    Cc: khandual@linux.vnet.ibm.com
    Cc: dsahern@gmail.com
    Link: http://lkml.kernel.org/r/1331246868-19905-4-git-send-email-eranian@google.com
    Signed-off-by: Ingo Molnar

    Stephane Eranian
     
  • This patch adds a new feature bit, namely,
    HEADER_BRANCH_STACK. When present, it indicates
    that sample records may contain branch stack.

    This could be useful to a viewer to switch to
    branch mode without having to parse all the
    samples or without a specific cmdline option.

    This will be used in a subsequent patch to
    enhance perf report with branch stacks.

    Signed-off-by: Stephane Eranian
    Cc: peterz@infradead.org
    Cc: acme@redhat.com
    Cc: asharma@fb.com
    Cc: ravitillo@lbl.gov
    Cc: vweaver1@eecs.utk.edu
    Cc: khandual@linux.vnet.ibm.com
    Cc: dsahern@gmail.com
    Link: http://lkml.kernel.org/r/1331246868-19905-3-git-send-email-eranian@google.com
    Signed-off-by: Ingo Molnar

    Stephane Eranian
     
  • This patch chanegs the logic of the -b, --branch-stack options
    of perf record.

    Based on users' request, the patch provides a default filter
    mode with the -b (or --branch-any) option. With the option,
    any type of taken branches is sampled.

    With -j (or --branch-filter), the user can specify any
    valid combination of branch types and privilege levels
    if supported by the underlying hardware.

    The -b (--branch any) is a shortcut for: --branch-filter any.

    $ perf record -b foo

    or:

    $ perf record --branch-filter any foo

    For more specific filtering:

    $ perf record --branch-filter ind_call,u foo

    Signed-off-by: Stephane Eranian
    Cc: peterz@infradead.org
    Cc: acme@redhat.com
    Cc: asharma@fb.com
    Cc: ravitillo@lbl.gov
    Cc: vweaver1@eecs.utk.edu
    Cc: khandual@linux.vnet.ibm.com
    Cc: dsahern@gmail.com
    Link: http://lkml.kernel.org/r/1331246868-19905-2-git-send-email-eranian@google.com
    Signed-off-by: Ingo Molnar

    Stephane Eranian
     
  • This patches provides a way to handle legacy perf.data
    files. Legacy files are those using the older PERFFILE
    signature.

    For those, it is still necessary to detect endianness but
    without comparing their header->attr_size with the
    tool's own version as it may be different. Instead, we use
    a reference table for all known sizes from the legacy era.

    We try all the combinations for sizes and endianness. If we find
    a match, we proceed, otherwise we return: "incompatible file
    format".

    This is also done for the pipe-mode file format.

    Signed-off-by: Stephane Eranian
    Cc: peterz@infradead.org
    Cc: acme@redhat.com
    Cc: robert.richter@amd.com
    Cc: ming.m.lin@intel.com
    Cc: andi@firstfloor.org
    Cc: asharma@fb.com
    Cc: ravitillo@lbl.gov
    Cc: vweaver1@eecs.utk.edu
    Cc: khandual@linux.vnet.ibm.com
    Cc: dsahern@gmail.com
    Link: http://lkml.kernel.org/r/1328826068-11713-19-git-send-email-eranian@google.com
    Signed-off-by: Ingo Molnar

    Stephane Eranian
     
  • This patches cleans up local variable types for msz and ret.
    They need to be size_t and ssize_t respectively.

    It also fixes a bug whereby perf would not read attr struct
    with a different size than what it knows about.

    Signed-off-by: Stephane Eranian
    Cc: peterz@infradead.org
    Cc: acme@redhat.com
    Cc: robert.richter@amd.com
    Cc: ming.m.lin@intel.com
    Cc: andi@firstfloor.org
    Cc: asharma@fb.com
    Cc: ravitillo@lbl.gov
    Cc: vweaver1@eecs.utk.edu
    Cc: khandual@linux.vnet.ibm.com
    Cc: dsahern@gmail.com
    Link: http://lkml.kernel.org/r/1328826068-11713-18-git-send-email-eranian@google.com
    Signed-off-by: Ingo Molnar

    Stephane Eranian
     
  • This patch allows perf to process perf.data files generated
    using an ABI that has a different perf_event_attr struct size,
    i.e., a different ABI version.

    The perf_event_attr can be extended, yet perf needs to cope with
    older perf.data files. Similarly, perf must be able to cope with
    a perf.data file which is using a newer version of the ABI than
    what it knows about.

    This patch adds read_attr(), a routine that reads a
    perf_event_attr struct from a file incrementally based on its
    advertised size. If the on-file struct is smaller than what perf
    knows, then the extra fields are zeroed. If the on-file struct
    is bigger, then perf only uses what it knows about, the rest is
    skipped.

    Signed-off-by: Stephane Eranian
    Cc: peterz@infradead.org
    Cc: acme@redhat.com
    Cc: robert.richter@amd.com
    Cc: ming.m.lin@intel.com
    Cc: andi@firstfloor.org
    Cc: asharma@fb.com
    Cc: ravitillo@lbl.gov
    Cc: vweaver1@eecs.utk.edu
    Cc: khandual@linux.vnet.ibm.com
    Cc: dsahern@gmail.com
    Link: http://lkml.kernel.org/r/1328826068-11713-17-git-send-email-eranian@google.com
    Signed-off-by: Ingo Molnar

    Stephane Eranian