17 Jan, 2012

1 commit

  • * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-ktest:
    ktest: Add INGORE_ERRORS to ignore warnings in boot up
    ktest: Still do reboot even for REBOOT_TYPE = script
    ktest: Fix compare script to test if options are not documented
    ktest: Detect typos in option names
    ktest: Have all values be set by defaults
    ktest: Change initialization of defaults hash to perl format
    ktest: Add options SWITCH_TO_GOOD and SWITCH_TO_TEST
    ktest: Allow overriding bisect test results
    ktest: Evaluate options before processing them
    ktest: Evaluate $KERNEL_VERSION in both install and post install
    ktest: Only ask options needed for install
    ktest: When creating a new config, ask for BUILD_OPTIONS
    ktest: Do not ask for some options if the only test is build
    ktest: Ask for type of test when creating a new config
    ktest: Allow bisect test to restart where it left off
    ktest: When creating new config, allow the use of ${THIS_DIR}
    ktest: Add default for ssh-user, build-target and target-image
    ktest: Allow success logs to be stored
    ktest: Save test output

    Linus Torvalds
     

16 Jan, 2012

1 commit

  • * 'perf-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (39 commits)
    perf tools: Fix compile error on x86_64 Ubuntu
    perf report: Fix --stdio output alignment when --showcpuutilization used
    perf annotate: Get rid of field_sep check
    perf annotate: Fix usage string
    perf kmem: Fix a memory leak
    perf kmem: Add missing closedir() calls
    perf top: Add error message for EMFILE
    perf test: Change type of '-v' option to INCR
    perf script: Add missing closedir() calls
    tracing: Fix compile error when static ftrace is enabled
    recordmcount: Fix handling of elf64 big-endian objects.
    perf tools: Add const.h to MANIFEST to make perf-tar-src-pkg work again
    perf tools: Add support for guest/host-only profiling
    perf kvm: Do guest-only counting by default
    perf top: Don't update total_period on process_sample
    perf hists: Stop using 'self' for struct hist_entry
    perf hists: Rename total_session to total_period
    x86: Add counter when debug stack is used with interrupts enabled
    x86: Allow NMIs to hit breakpoints in i386
    x86: Keep current stack in NMI breakpoints
    ...

    Linus Torvalds
     

15 Jan, 2012

1 commit

  • * 'for-3.3' of git://linux-nfs.org/~bfields/linux: (31 commits)
    nfsd4: nfsd4_create_clid_dir return value is unused
    NFSD: Change name of extended attribute containing junction
    svcrpc: don't revert to SVC_POOL_DEFAULT on nfsd shutdown
    svcrpc: fix double-free on shutdown of nfsd after changing pool mode
    nfsd4: be forgiving in the absence of the recovery directory
    nfsd4: fix spurious 4.1 post-reboot failures
    NFSD: forget_delegations should use list_for_each_entry_safe
    NFSD: Only reinitilize the recall_lru list under the recall lock
    nfsd4: initialize special stateid's at compile time
    NFSd: use network-namespace-aware cache registering routines
    SUNRPC: create svc_xprt in proper network namespace
    svcrpc: update outdated BKL comment
    nfsd41: allow non-reclaim open-by-fh's in 4.1
    svcrpc: avoid memory-corruption on pool shutdown
    svcrpc: destroy server sockets all at once
    svcrpc: make svc_delete_xprt static
    nfsd: Fix oops when parsing a 0 length export
    nfsd4: Use kmemdup rather than duplicating its implementation
    nfsd4: add a separate (lockowner, inode) lookup
    nfsd4: fix CONFIG_NFSD_FAULT_INJECTION compile error
    ...

    Linus Torvalds
     

13 Jan, 2012

3 commits

  • Andrew explains:

    - various misc stuff

    - Most of the rest of MM: memcg, threaded hugepages, others.

    - cpumask

    - kexec

    - kdump

    - some direct-io performance tweaking

    - radix-tree optimisations

    - new selftests code

    A note on this: often people will develop a new userspace-visible
    feature and will develop userspace code to exercise/test that
    feature. Then they merge the patch and the selftest code dies.
    Sometimes we paste it into the changelog. Sometimes the code gets
    thrown into Documentation/(!).

    This saddens me. So this patch creates a bare-bones framework which
    will henceforth allow me to ask people to include their test apps in
    the kernel tree so we can keep them alive. Then when people enhance
    or fix the feature, I can ask them to update the test app too.

    The infrastruture is terribly trivial at present - let's see how it
    evolves.

    - checkpoint/restart feature work.

    A note on this: this is a project by various mad Russians to perform
    c/r mainly from userspace, with various oddball helper code added
    into the kernel where the need is demonstrated.

    So rather than some large central lump of code, what we have is
    little bits and pieces popping up in various places which either
    expose something new or which permit something which is normally
    kernel-private to be modified.

    The overall project is an ongoing thing. I've judged that the size
    and scope of the thing means that we're more likely to be successful
    with it if we integrate the support into mainline piecemeal rather
    than allowing it all to develop out-of-tree.

    However I'm less confident than the developers that it will all
    eventually work! So what I'm asking them to do is to wrap each piece
    of new code inside CONFIG_CHECKPOINT_RESTORE. So if it all
    eventually comes to tears and the project as a whole fails, it should
    be a simple matter to go through and delete all trace of it.

    This lot pretty much wraps up the -rc1 merge for me.

    * akpm: (96 commits)
    unlzo: fix input buffer free
    ramoops: update parameters only after successful init
    ramoops: fix use of rounddown_pow_of_two()
    c/r: prctl: add PR_SET_MM codes to set up mm_struct entries
    c/r: procfs: add start_data, end_data, start_brk members to /proc/$pid/stat v4
    c/r: introduce CHECKPOINT_RESTORE symbol
    selftests: new x86 breakpoints selftest
    selftests: new very basic kernel selftests directory
    radix_tree: take radix_tree_path off stack
    radix_tree: remove radix_tree_indirect_to_ptr()
    dio: optimize cache misses in the submission path
    vfs: cache request_queue in struct block_device
    fs/direct-io.c: calculate fs_count correctly in get_more_blocks()
    drivers/parport/parport_pc.c: fix warnings
    panic: don't print redundant backtraces on oops
    sysctl: add the kernel.ns_last_pid control
    kdump: add udev events for memory online/offline
    include/linux/crash_dump.h needs elf.h
    kdump: fix crash_kexec()/smp_send_stop() race in panic()
    kdump: crashk_res init check for /sys/kernel/kexec_crash_size
    ...

    Linus Torvalds
     
  • Bring a first selftest in the relevant directory. This tests several
    combinations of breakpoints and watchpoints in x86, as well as icebp traps
    and int3 traps. Given the amount of breakpoint regressions we raised
    after we merged the generic breakpoint infrastructure, such selftest
    became necessary and can still serve today as a basis for new patches that
    touch the do_debug() path.

    Signed-off-by: Frederic Weisbecker
    Cc: Thomas Gleixner
    Cc: Ingo Molnar
    Cc: H. Peter Anvin
    Cc: Jason Wessel
    Cc: Will Deacon
    Cc: Michal Marek
    Cc: Sam Ravnborg
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Frederic Weisbecker
     
  • Bring a new kernel selftests directory in tools/testing/selftests. To
    add a new selftest, create a subdirectory with the sources and a
    makefile that creates a target named "run_test" then add the
    subdirectory name to the TARGET var in tools/testing/selftests/Makefile
    and tools/testing/selftests/run_tests script.

    This can help centralizing and maintaining any useful selftest that
    developers usually tend to let rust in peace on some random server.

    Suggested-by: Andrew Morton
    Signed-off-by: Frederic Weisbecker
    Cc: Thomas Gleixner
    Cc: Ingo Molnar
    Cc: "H. Peter Anvin"
    Cc: Jason Wessel
    Cc: Will Deacon
    Cc: Steven Rostedt
    Cc: Michal Marek
    Cc: Sam Ravnborg
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Frederic Weisbecker
     

12 Jan, 2012

3 commits

  • This is a better location instead of having it in Documentation.

    Signed-off-by: Davidlohr Bueso
    Signed-off-by: Rusty Russell (fixed compile)

    Davidlohr Bueso
     
  • Remove wrapper functions. This makes the allocation type explicit in
    all callers; I used GPF_KERNEL where it seemed obvious, left it at
    GFP_ATOMIC otherwise.

    Signed-off-by: Rusty Russell
    Reviewed-by: Christoph Hellwig

    Rusty Russell
     
  • We were cheating with our barriers; using the smp ones rather than the
    real device ones. That was fine, until rpmsg came along, which is
    used to talk to a real device (a non-SMP CPU).

    Unfortunately, just putting back the real barriers (reverting
    d57ed95d) causes a performance regression on virtio-pci. In
    particular, Amos reports netbench's TCP_RR over virtio_net CPU
    utilization increased up to 35% while throughput went down by up to
    14%.

    By comparison, this branch is in the noise.

    Reference: https://lkml.org/lkml/2011/12/11/22

    Signed-off-by: Rusty Russell

    Rusty Russell
     

11 Jan, 2012

1 commit


09 Jan, 2012

1 commit

  • * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial: (53 commits)
    Kconfig: acpi: Fix typo in comment.
    misc latin1 to utf8 conversions
    devres: Fix a typo in devm_kfree comment
    btrfs: free-space-cache.c: remove extra semicolon.
    fat: Spelling s/obsolate/obsolete/g
    SCSI, pmcraid: Fix spelling error in a pmcraid_err() call
    tools/power turbostat: update fields in manpage
    mac80211: drop spelling fix
    types.h: fix comment spelling for 'architectures'
    typo fixes: aera -> area, exntension -> extension
    devices.txt: Fix typo of 'VMware'.
    sis900: Fix enum typo 'sis900_rx_bufer_status'
    decompress_bunzip2: remove invalid vi modeline
    treewide: Fix comment and string typo 'bufer'
    hyper-v: Update MAINTAINERS
    treewide: Fix typos in various parts of the kernel, and fix some comments.
    clockevents: drop unknown Kconfig symbol GENERIC_CLOCKEVENTS_MIGR
    gpio: Kconfig: drop unknown symbol 'CS5535_GPIO'
    leds: Kconfig: Fix typo 'D2NET_V2'
    sound: Kconfig: drop unknown symbol ARCH_CLPS7500
    ...

    Fix up trivial conflicts in arch/powerpc/platforms/40x/Kconfig (some new
    kconfig additions, close to removed commented-out old ones)

    Linus Torvalds
     

08 Jan, 2012

9 commits

  • The ctype.h include is not needed here and it breaks build on some systems (at
    least 64bit Ubuntu 10.04) like below. Just get rid of it.

    CC util/trace-event-info.o
    cc1: warnings being treated as errors
    util/trace-event-info.c: In function ‘record_file’:
    util/trace-event-info.c:192: error: implicit declaration of function ‘pwrite’
    util/trace-event-info.c:192: error: nested extern declaration of ‘pwrite’
    make: *** [util/trace-event-info.o] Error 1

    Cc: Ingo Molnar
    Cc: Joerg Roedel
    Cc: Paul Mackerras
    Cc: Peter Zijlstra
    Link: http://lkml.kernel.org/r/1326035430-7621-1-git-send-email-namhyung@gmail.com
    Signed-off-by: Namhyung Kim
    Signed-off-by: Arnaldo Carvalho de Melo

    Namhyung Kim
     
  • Current perf report output is broken if --showcpuutilization is used.
    Combination with -n and/or --show-total-period make things worse.
    This patch fixes it as follows:

    before:
    48.25% 48.25% 0.00% sleep [kernel.kallsyms] [k] trace_hardirqs_off
    34.99% 34.99% 0.00% sleep [kernel.kallsyms] [k] __find_get_block_slow
    15.99% 15.99% 0.00% sleep [kernel.kallsyms] [k] lock_release_holdtime
    0.77% 0.77% 0.00% sleep [kernel.kallsyms] [k] native_write_msr_safe

    after:
    48.25% 48.25% 0.00% sleep [kernel.kallsyms] [k] trace_hardirqs_off
    34.99% 34.99% 0.00% sleep [kernel.kallsyms] [k] __find_get_block_slow
    15.99% 15.99% 0.00% sleep [kernel.kallsyms] [k] lock_release_holdtime
    0.77% 0.77% 0.00% sleep [kernel.kallsyms] [k] native_write_msr_safe

    Cc: Ingo Molnar
    Cc: Paul Mackerras
    Cc: Peter Zijlstra
    Link: http://lkml.kernel.org/r/1325957132-10600-8-git-send-email-namhyung@gmail.com
    Signed-off-by: Namhyung Kim
    Signed-off-by: Arnaldo Carvalho de Melo

    Namhyung Kim
     
  • The 'field_sep' variable is not set anywhere. Just remove the
    conditional.

    Cc: Ingo Molnar
    Cc: Paul Mackerras
    Cc: Peter Zijlstra
    Link: http://lkml.kernel.org/r/1325957132-10600-7-git-send-email-namhyung@gmail.com
    Signed-off-by: Namhyung Kim
    Signed-off-by: Arnaldo Carvalho de Melo

    Namhyung Kim
     
  • The annotate command doesn't take non-option arguments.

    In fact, it can take last argument as a symbol filter though, but that's
    a special case and, IMHO, it should be discouraged in favor of the -s
    option.

    Cc: Ingo Molnar
    Cc: Paul Mackerras
    Cc: Peter Zijlstra
    Link: http://lkml.kernel.org/r/1325957132-10600-6-git-send-email-namhyung@gmail.com
    Signed-off-by: Namhyung Kim
    Signed-off-by: Arnaldo Carvalho de Melo

    Namhyung Kim
     
  • The 'str' should be freed when sort_dimension__add() failed too.

    Cc: Ingo Molnar
    Cc: Paul Mackerras
    Cc: Peter Zijlstra
    Link: http://lkml.kernel.org/r/1325957132-10600-5-git-send-email-namhyung@gmail.com
    Signed-off-by: Namhyung Kim
    Signed-off-by: Arnaldo Carvalho de Melo

    Namhyung Kim
     
  • The setup_cpunode_map() calls opendir() but misses corresponding
    closedir(). Add them.

    Cc: Ingo Molnar
    Cc: Paul Mackerras
    Cc: Peter Zijlstra
    Link: http://lkml.kernel.org/r/1325957132-10600-4-git-send-email-namhyung@gmail.com
    Signed-off-by: Namhyung Kim
    Signed-off-by: Arnaldo Carvalho de Melo

    Namhyung Kim
     
  • When a user tries to open so many events, perf_event_open syscall may
    fail with EMFILE. Provide advise for that case.

    Cc: Ingo Molnar
    Cc: Paul Mackerras
    Cc: Peter Zijlstra
    Link: http://lkml.kernel.org/r/1325957132-10600-3-git-send-email-namhyung@gmail.com
    Signed-off-by: Namhyung Kim
    Signed-off-by: Arnaldo Carvalho de Melo

    Namhyung Kim
     
  • The '-v' option is usually defined via OPT_INCR not _INTEGER. Follow
    the trend :).

    Cc: Ingo Molnar
    Cc: Paul Mackerras
    Cc: Peter Zijlstra
    Link: http://lkml.kernel.org/r/1325957132-10600-2-git-send-email-namhyung@gmail.com
    Signed-off-by: Namhyung Kim
    Signed-off-by: Arnaldo Carvalho de Melo

    Namhyung Kim
     
  • The get_script_path() calls opendir() but misses corresponding
    closedir()'s. Add them.

    Cc: Ingo Molnar
    Cc: Paul Mackerras
    Cc: Peter Zijlstra
    Link: http://lkml.kernel.org/r/1325957132-10600-1-git-send-email-namhyung@gmail.com
    Signed-off-by: Namhyung Kim
    Signed-off-by: Arnaldo Carvalho de Melo

    Namhyung Kim
     

07 Jan, 2012

7 commits

  • * 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc: (185 commits)
    powerpc: fix compile error with 85xx/p1010rdb.c
    powerpc: fix compile error with 85xx/p1023_rds.c
    powerpc/fsl: add MSI support for the Freescale hypervisor
    arch/powerpc/sysdev/fsl_rmu.c: introduce missing kfree
    powerpc/fsl: Add support for Integrated Flash Controller
    powerpc/fsl: update compatiable on fsl 16550 uart nodes
    powerpc/85xx: fix PCI and localbus properties in p1022ds.dts
    powerpc/85xx: re-enable ePAPR byte channel driver in corenet32_smp_defconfig
    powerpc/fsl: Update defconfigs to enable some standard FSL HW features
    powerpc: Add TBI PHY node to first MDIO bus
    sbc834x: put full compat string in board match check
    powerpc/fsl-pci: Allow 64-bit PCIe devices to DMA to any memory address
    powerpc: Fix unpaired probe_hcall_entry and probe_hcall_exit
    offb: Fix setting of the pseudo-palette for >8bpp
    offb: Add palette hack for qemu "standard vga" framebuffer
    offb: Fix bug in calculating requested vram size
    powerpc/boot: Change the WARN to INFO for boot wrapper overlap message
    powerpc/44x: Fix build error on currituck platform
    powerpc/boot: Change the load address for the wrapper to fit the kernel
    powerpc/44x: Enable CRASH_DUMP for 440x
    ...

    Fix up a trivial conflict in arch/powerpc/include/asm/cputime.h due to
    the additional sparse-checking code for cputime_t.

    Linus Torvalds
     
  • Fixes:
    |make: *** No rule to make target `../../include/linux/const.h', needed by `builtin-annotate.o'. Stop.

    Cc: Ingo Molnar
    Cc: Paul Mackerras
    Cc: Peter Zijlstra
    Link: http://lkml.kernel.org/r/1324128938-17553-1-git-send-email-sebastian@breakpoint.cc
    Signed-off-by: Sebastian Andrzej Siewior
    Signed-off-by: Arnaldo Carvalho de Melo

    Sebastian Andrzej Siewior
     
  • To restrict a counter to either host or guest mode this patch introduces
    two new event modifiers: G and H.

    With G the counter is configured in guest-only mode and with H in
    host-only mode.

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

    Joerg Roedel
     
  • Make use of exclude_guest and exlude_host in perf-kvm to do only
    guest-only counting by default.

    Cc: Gleb Natapov
    Cc: Ingo Molnar
    Cc: Joerg Roedel
    Cc: Peter Zijlstra
    Signed-off-by: Gleb Natapov
    Signed-off-by: Joerg Roedel
    [ committer note: Moved perf_{guest,host} & event_attr_init to util.c ]
    [ so as not to drag more stuff to the python binding]
    Signed-off-by: Arnaldo Carvalho de Melo

    Joerg Roedel
     
  • It will be recalculated at __hists__output_resort, to take into account
    filters possibly applied by the TUI, etc.

    Since we do the percent math only for those entries that will appear on
    the TUI instead of for _all_ the entries at decay time, updating it for
    each sample makes the entries seem to decay faster when using the
    navigation keys (since the screen will be refreshed), as we're not
    coalescing the entries that are being batched to be merged at next
    resort/decay time, but considering their periods.

    Bug introduced in 743eb86.

    Reported-by: Ingo Molnar
    Cc: David Ahern
    Cc: Frederic Weisbecker
    Cc: Mike Galbraith
    Cc: Paul Mackerras
    Cc: Peter Zijlstra
    Cc: Stephane Eranian
    Link: http://lkml.kernel.org/n/tip-k0d0rq9a8nqtkqohov8cir72@git.kernel.org
    Signed-off-by: Arnaldo Carvalho de Melo

    Arnaldo Carvalho de Melo
     
  • Stop using this python/OOP convention, doesn't really helps. Will do
    more from time to time till we get it cleaned up in all of /perf.

    Suggested-by: Thomas Gleixner
    Cc: David Ahern
    Cc: Frederic Weisbecker
    Cc: Mike Galbraith
    Cc: Paul Mackerras
    Cc: Peter Zijlstra
    Cc: Stephane Eranian
    Link: http://lkml.kernel.org/n/tip-me4dyj6s5snh7jr8wb9gzt82@git.kernel.org
    Signed-off-by: Arnaldo Carvalho de Melo

    Arnaldo Carvalho de Melo
     
  • Nowadays we do it per evsel, not per session (that may have multiple
    evsels), so rename it to avoid confusion.

    Cc: David Ahern
    Cc: Frederic Weisbecker
    Cc: Mike Galbraith
    Cc: Paul Mackerras
    Cc: Peter Zijlstra
    Cc: Stephane Eranian
    Link: http://lkml.kernel.org/n/tip-azsgomr5h4dmaudoogw48w49@git.kernel.org
    Signed-off-by: Arnaldo Carvalho de Melo

    Arnaldo Carvalho de Melo
     

05 Jan, 2012

2 commits

  • When testing a kernel that has warnings, ktest.pl will fail the test
    when it sees the warning. If you need to test the the kernel and want
    to ignore the errors that are produced, the option IGNORE_ERRORS has
    been added. When IGNORE_ERRORS is set to something other than 0, it will
    ignore call traces due to WARN_ON().

    Signed-off-by: Steven Rostedt

    Steven Rostedt
     
  • The REBOOT_TYPE may be either grub or script, if it is script
    it is expected that a REBOOT_SCRIPT is defined.

    With the SWITCH_TO_TEST which is the complement of SWITCH_TO_GOOD,
    which does basically the same thing as REBOOT_SCRIPT and but for
    both grub and script, the REBOOT_SCRIPT does not need to be mandatory
    anymore.

    Do not require the REBOOT_SCRIPT and always run the reboot code
    for both grub and script.

    Signed-off-by: Steven Rostedt

    Steven Rostedt
     

04 Jan, 2012

5 commits

  • The --host option certainly enables host-data collection.

    Cc: Avi Kivity
    Cc: Ingo Molnar
    Cc: Peter Zijlstra
    Cc: Joerg Roedel
    Cc: kvm@vger.kernel.org
    Link: http://lkml.kernel.org/r/1317816084-18026-5-git-send-email-gleb@redhat.com
    Signed-off-by: Gleb Natapov
    Signed-off-by: Joerg Roedel
    Signed-off-by: Arnaldo Carvalho de Melo

    Joerg Roedel
     
  • As script_spec__delete() frees given struct script_spec it should not be
    called if we failed to allocate the struct. Also it's the only caller of
    the function, we can get rid of the function itself.

    Cc: Ingo Molnar
    Cc: Paul Mackerras
    Cc: Peter Zijlstra
    Link: http://lkml.kernel.org/r/1325000151-4463-4-git-send-email-namhyung@gmail.com
    Signed-off-by: Namhyung Kim
    Signed-off-by: Arnaldo Carvalho de Melo

    Namhyung Kim
     
  • The 'buf' should be freed when symbol wasn't found too.

    Cc: Ingo Molnar
    Cc: Paul Mackerras
    Cc: Peter Zijlstra
    Link: http://lkml.kernel.org/r/1325000151-4463-3-git-send-email-namhyung@gmail.com
    Signed-off-by: Namhyung Kim
    Signed-off-by: Arnaldo Carvalho de Melo

    Namhyung Kim
     
  • The get_ratio_color() returns appropriate color string based on @ratio.
    It helps reducing code duplication.

    Cc: Ingo Molnar
    Cc: Paul Mackerras
    Cc: Peter Zijlstra
    Link: http://lkml.kernel.org/r/1325000151-4463-2-git-send-email-namhyung@gmail.com
    Signed-off-by: Namhyung Kim
    Signed-off-by: Arnaldo Carvalho de Melo

    Namhyung Kim
     
  • The 'size' cannot be 0 because it was set to 8 on the above line in case
    it was 0 and never changed.

    Cc: Ingo Molnar
    Cc: Paul Mackerras
    Cc: Peter Zijlstra
    Link: http://lkml.kernel.org/r/1325000151-4463-1-git-send-email-namhyung@gmail.com
    Signed-off-by: Namhyung Kim
    Signed-off-by: Arnaldo Carvalho de Melo

    Namhyung Kim
     

02 Jan, 2012

1 commit


30 Dec, 2011

1 commit


24 Dec, 2011

4 commits

  • The current perf scripting facility only supports tracepoints. This
    patch implements a generic perl handler to support other events than
    tracepoints too.

    This patch introduces a function process_event() that is called by perf
    for each sample. The function is called with byte streams as arguments
    containing information about the event, its attributes, the sample and
    raw data. Perl's unpack() function can easily be used for byte decoding.
    The following is the default implementation for process_event() that can
    also be generated with perf script:

    # Packed byte string args of process_event():
    #
    # $event: union perf_event util/event.h
    # $attr: struct perf_event_attr linux/perf_event.h
    # $sample: struct perf_sample util/event.h
    # $raw_data: perf_sample->raw_data util/event.h

    sub process_event
    {
    my ($event, $attr, $sample, $raw_data) = @_;

    my @event = unpack("LSS", $event);
    my @attr = unpack("LLQQQQQLLQQ", $attr);
    my @sample = unpack("QLLQQQQQLL", $sample);
    my @raw_data = unpack("C*", $raw_data);

    use Data::Dumper;
    print Dumper \@event, \@attr, \@sample, \@raw_data;
    }

    Cc: Ingo Molnar
    Cc: Peter Zijlstra
    Cc: Stephane Eranian
    Link: http://lkml.kernel.org/r/1323969824-9711-4-git-send-email-robert.richter@amd.com
    Signed-off-by: Robert Richter
    Signed-off-by: Arnaldo Carvalho de Melo

    Robert Richter
     
  • This patch introduces the for_each_set_bit() macro and modifies feature
    implementation to use it.

    Cc: Frederic Weisbecker
    Cc: Ingo Molnar
    Cc: Peter Zijlstra
    Cc: Stephane Eranian
    Link: http://lkml.kernel.org/r/1323248577-11268-8-git-send-email-robert.richter@amd.com
    Signed-off-by: Robert Richter
    Signed-off-by: Arnaldo Carvalho de Melo

    Robert Richter
     
  • The features HEADER_TRACE_INFO and HEADER_BUILD_ID are handled
    different when writing the feature section. All other features are
    simply disabled on failure and writing the section goes on without
    returning an error. There is no reason for these special cases. This
    patch unifies handling of the features.

    This should be ok since all features can be parsed independently.
    Offset and size of a feature's block is stored in struct perf_file_
    section right after the data block of perf.data (see perf_session__
    write_header()). Thus, if a feature does not exist then other features
    can be processed anyway.

    Also moving special code for HEADER_BUILD_ID out to write_build_id().

    v2:
    * perf record throws an error now if buildids may not be generated,
    which can be disabled with the --no-buildid option.

    Cc: Frederic Weisbecker
    Cc: Ingo Molnar
    Cc: Peter Zijlstra
    Cc: Stephane Eranian
    Link: http://lkml.kernel.org/r/1323248577-11268-6-git-send-email-robert.richter@amd.com
    Signed-off-by: Robert Richter
    Signed-off-by: Arnaldo Carvalho de Melo

    Robert Richter
     
  • The default input file for perf report is not handled the same way as
    perf record does it for its output file. This leads to unexpected
    behavior of perf report, etc. E.g.:

    # perf record -a -e cpu-cycles sleep 2 | perf report | cat
    failed to open perf.data: No such file or directory (try 'perf record' first)

    While perf record writes to a fifo, perf report expects perf.data to be
    read. This patch changes this to accept fifos as input file.

    Applies to the following commands:

    perf annotate
    perf buildid-list
    perf evlist
    perf kmem
    perf lock
    perf report
    perf sched
    perf script
    perf timechart

    Also fixes char const* -> const char* type declaration for filename
    strings.

    v2:
    * Prevent potential null pointer access to input_name in
    builtin-report.c. Needed due to removal of patch "perf report: Setup
    browser if stdout is a pipe"

    Cc: Frederic Weisbecker
    Cc: Ingo Molnar
    Cc: Peter Zijlstra
    Cc: Stephane Eranian
    Link: http://lkml.kernel.org/r/1323248577-11268-5-git-send-email-robert.richter@amd.com
    Signed-off-by: Robert Richter
    Signed-off-by: Arnaldo Carvalho de Melo

    Robert Richter