30 Jan, 2013

1 commit


08 Dec, 2012

1 commit


20 Nov, 2012

1 commit

  • Make perf build for x86 once the UAPI disintegration patches for that arch
    have been applied by adding the appropriate -I flags - in the right order -
    and then converting some #includes that use ../.. notation to find main kernel
    headerfiles to use and instead.

    Note that -Iarch/foo/include/uapi is present _before_ -Iarch/foo/include.
    This makes sure we get the userspace version of the pt_regs struct. Ideally,
    we wouldn't have the latter -I flag at all, but unfortunately we want
    asm/svm.h and asm/vmx.h in builtin-kvm.c and these aren't part of the UAPI -
    at least not for x86. I wonder if the bits outside of the __KERNEL__ guards
    *should* be transferred there.

    I note also that perf seems to do its dependency handling manually by listing
    all the header files it might want to use in LIB_H in the Makefile. Can this
    be changed to use -MD?

    Note that to do make this work, we need to export and UAPI disintegrate
    linux/hw_breakpoint.h, which I think should've been exported previously so that
    perf can access the bits. We have to do this in the same patch to maintain
    bisectability.

    Signed-off-by: David Howells

    David Howells
     

09 Nov, 2012

1 commit

  • Arnaldo reported that annotation during perf top resulted in a segfault.
    It was because the env->arch was NULL and we don't set it for a live
    session. In fact, no need to look up objdump in this case since we can
    use system's default (native) objdump.

    Reported-by: Arnaldo Carvalho de Melo
    Signed-off-by: Namhyung Kim
    Cc: David Ahern
    Cc: Ingo Molnar
    Cc: Irina Tirdea
    Cc: Paul Mackerras
    Cc: Peter Zijlstra
    Link: http://lkml.kernel.org/r/1352251815-12615-1-git-send-email-namhyung@kernel.org
    Signed-off-by: Arnaldo Carvalho de Melo

    Namhyung Kim
     

06 Nov, 2012

1 commit

  • David reported that perf report for i686 target data on x86_64 host
    failed to work because it tried to find out cross-compiled objdump.

    However objdump for x86_64 is compatible to i686 so that it doesn't need
    to do it at all. To prevent similar artifacts, normalize arch name when
    comparing host and file architectures.

    Reported-by: David Ahern
    Signed-off-by: Namhyung Kim
    Reviewed-by: David Ahern
    Tested-by: David Ahern
    Cc: David Ahern
    Cc: Ingo Molnar
    Cc: Irina Tirdea
    Cc: Paul Mackerras
    Cc: Peter Zijlstra
    Link: http://lkml.kernel.org/r/1351835406-15208-1-git-send-email-namhyung@kernel.org
    Signed-off-by: Arnaldo Carvalho de Melo

    Namhyung Kim
     

25 Oct, 2012

1 commit

  • As we have architecture information of saved perf.data file, we can try
    to find cross-built objdump path.

    The triplets include support for Android (arm, x86 and mips
    architectures).

    Signed-off-by: Irina Tirdea
    Originally-by: Namhyung Kim
    Acked-by: Namhyung Kim
    Cc: David Ahern
    Cc: Ingo Molnar
    Cc: Jiri Olsa
    Cc: Namhyung Kim
    Cc: Paul Mackerras
    Cc: Pekka Enberg
    Cc: Peter Zijlstra
    Cc: Steven Rostedt
    Link: http://lkml.kernel.org/r/1350344020-8071-5-git-send-email-irina.tirdea@gmail.com
    Signed-off-by: Arnaldo Carvalho de Melo

    Irina Tirdea
     

12 Aug, 2012

1 commit

  • This brings the support for DWARF cfi unwinding on perf post
    processing. Call frame informations are retrieved and then passed
    to libunwind that requests memory and register content from the
    applications.

    Adding unwind object to handle the user stack backtrace based
    on the user register values and user stack dump.

    The unwind object access the libunwind via remote interface
    and provides to it all the necessary data to unwind the stack.

    The unwind interface provides following function:
    unwind__get_entries

    And callback (specified in above function) to retrieve
    the backtrace entries:
    typedef int (*unwind_entry_cb_t)(struct unwind_entry *entry,
    void *arg);

    Signed-off-by: Jiri Olsa
    Original-patch-by: Frederic Weisbecker
    Cc: "Frank Ch. Eigler"
    Cc: Arun Sharma
    Cc: Benjamin Redelings
    Cc: Corey Ashford
    Cc: Cyrill Gorcunov
    Cc: Frank Ch. Eigler
    Cc: Frederic Weisbecker
    Cc: Ingo Molnar
    Cc: Masami Hiramatsu
    Cc: Paul Mackerras
    Cc: Peter Zijlstra
    Cc: Robert Richter
    Cc: Stephane Eranian
    Cc: Tom Zanussi
    Cc: Ulrich Drepper
    Link: http://lkml.kernel.org/r/1344345647-11536-12-git-send-email-jolsa@redhat.com
    [ Replaced use of perf_session by usage of perf_evsel ]
    Signed-off-by: Arnaldo Carvalho de Melo

    Jiri Olsa
     

11 Aug, 2012

1 commit

  • Adding header files to access unified API for arch registers.

    util/perf_regs.h - global perf_reg declarations
    arch/x86/include/perf_regs.h - x86 arch specific

    Adding perf_reg_name function to obtain register name based on the reg
    ID value, and PERF_REGS_MASK macro with mask definition of all current
    arch registers (will be used in unwind patches).

    Signed-off-by: Jiri Olsa
    Cc: "Frank Ch. Eigler"
    Cc: Arun Sharma
    Cc: Benjamin Redelings
    Cc: Corey Ashford
    Cc: Cyrill Gorcunov
    Cc: Frank Ch. Eigler
    Cc: Frederic Weisbecker
    Cc: Ingo Molnar
    Cc: Masami Hiramatsu
    Cc: Paul Mackerras
    Cc: Peter Zijlstra
    Cc: Robert Richter
    Cc: Stephane Eranian
    Cc: Tom Zanussi
    Cc: Ulrich Drepper
    Link: http://lkml.kernel.org/r/1344345647-11536-9-git-send-email-jolsa@redhat.com
    Signed-off-by: Arnaldo Carvalho de Melo

    Jiri Olsa
     

14 Mar, 2012

1 commit

  • 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
     

25 Nov, 2011

1 commit


08 Oct, 2011

1 commit

  • The goal of this patch is to include more information about the host
    environment into the perf.data so it is more self-descriptive. Overtime,
    profiles are captured on various machines and it becomes hard to track
    what was recorded, on what machine and when.

    This patch provides a way to solve this by extending the perf.data file
    with basic information about the host machine. To add those extensions,
    we leverage the feature bits capabilities of the perf.data format. The
    change is backward compatible with existing perf.data files.

    We define the following useful new extensions:
    - HEADER_HOSTNAME: the hostname
    - HEADER_OSRELEASE: the kernel release number
    - HEADER_ARCH: the hw architecture
    - HEADER_CPUDESC: generic CPU description
    - HEADER_NRCPUS: number of online/avail cpus
    - HEADER_CMDLINE: perf command line
    - HEADER_VERSION: perf version
    - HEADER_TOPOLOGY: cpu topology
    - HEADER_EVENT_DESC: full event description (attrs)
    - HEADER_CPUID: easy-to-parse low level CPU identication

    The small granularity for the entries is to make it easier to extend
    without breaking backward compatiblity. Many entries are provided as
    ASCII strings.

    Perf report/script have been modified to print the basic information as
    easy-to-parse ASCII strings. Extended information about CPU and NUMA
    topology may be requested with the -I option.

    Thanks to David Ahern for reviewing and testing the many versions of
    this patch.

    $ perf report --stdio
    # ========
    # captured on : Mon Sep 26 15:22:14 2011
    # hostname : quad
    # os release : 3.1.0-rc4-tip
    # perf version : 3.1.0-rc4
    # arch : x86_64
    # nrcpus online : 4
    # nrcpus avail : 4
    # cpudesc : Intel(R) Core(TM)2 Quad CPU Q6600 @ 2.40GHz
    # cpuid : GenuineIntel,6,15,11
    # total memory : 8105360 kB
    # cmdline : /home/eranian/perfmon/official/tip/build/tools/perf/perf record date
    # event : name = cycles, type = 0, config = 0x0, config1 = 0x0, config2 = 0x0, excl_usr = 0, excl_kern = 0, id = { 29, 30, 31,
    # HEADER_CPU_TOPOLOGY info available, use -I to display
    # HEADER_NUMA_TOPOLOGY info available, use -I to display
    # ========
    #
    ...

    $ perf report --stdio -I
    # ========
    # captured on : Mon Sep 26 15:22:14 2011
    # hostname : quad
    # os release : 3.1.0-rc4-tip
    # perf version : 3.1.0-rc4
    # arch : x86_64
    # nrcpus online : 4
    # nrcpus avail : 4
    # cpudesc : Intel(R) Core(TM)2 Quad CPU Q6600 @ 2.40GHz
    # cpuid : GenuineIntel,6,15,11
    # total memory : 8105360 kB
    # cmdline : /home/eranian/perfmon/official/tip/build/tools/perf/perf record date
    # event : name = cycles, type = 0, config = 0x0, config1 = 0x0, config2 = 0x0, excl_usr = 0, excl_kern = 0, id = { 29, 30, 31,
    # sibling cores : 0-3
    # sibling threads : 0
    # sibling threads : 1
    # sibling threads : 2
    # sibling threads : 3
    # node0 meminfo : total = 8320608 kB, free = 7571024 kB
    # node0 cpu list : 0-3
    # ========
    #
    ...

    Reviewed-by: David Ahern
    Tested-by: David Ahern
    Cc: David Ahern
    Cc: Ingo Molnar
    Cc: Peter Zijlstra
    Cc: Robert Richter
    Cc: Andi Kleen
    Link: http://lkml.kernel.org/r/20110930134040.GA5575@quad
    Signed-off-by: Stephane Eranian
    [ committer notes: Use --show-info in the tools as was in the docs, rename
    perf_header_fprintf_info to perf_file_section__fprintf_info, fixup
    conflict with f69b64f7 "perf: Support setting the disassembler style" ]
    Signed-off-by: Arnaldo Carvalho de Melo

    Stephane Eranian
     

12 Aug, 2011

1 commit


05 Jan, 2011

1 commit


07 Aug, 2010

1 commit

  • …git/tip/linux-2.6-tip

    * 'perf-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip: (162 commits)
    tracing/kprobes: unregister_trace_probe needs to be called under mutex
    perf: expose event__process function
    perf events: Fix mmap offset determination
    perf, powerpc: fsl_emb: Restore setting perf_sample_data.period
    perf, powerpc: Convert the FSL driver to use local64_t
    perf tools: Don't keep unreferenced maps when unmaps are detected
    perf session: Invalidate last_match when removing threads from rb_tree
    perf session: Free the ref_reloc_sym memory at the right place
    x86,mmiotrace: Add support for tracing STOS instruction
    perf, sched migration: Librarize task states and event headers helpers
    perf, sched migration: Librarize the GUI class
    perf, sched migration: Make the GUI class client agnostic
    perf, sched migration: Make it vertically scrollable
    perf, sched migration: Parameterize cpu height and spacing
    perf, sched migration: Fix key bindings
    perf, sched migration: Ignore unhandled task states
    perf, sched migration: Handle ignored migrate out events
    perf: New migration tool overview
    tracing: Drop cpparg() macro
    perf: Use tracepoint_synchronize_unregister() to flush any pending tracepoint call
    ...

    Fix up trivial conflicts in Makefile and drivers/cpufreq/cpufreq.c

    Linus Torvalds
     

31 Jul, 2010

1 commit


22 Jul, 2010

1 commit


15 Jul, 2010

1 commit


12 Jul, 2010

1 commit

  • Implement get_arch_regstr() for SH so that, given a DWARF register number, the
    corresponding symbolic name of that register can be looked up.

    Acked-by: Masami Hiramatsu
    Cc: Masami Hiramatsu
    Cc: Peter Zijlstra
    Cc: Paul Mackerras
    Cc: Ingo Molnar
    Cc: Ian Munsie
    LKML-Reference:
    Signed-off-by: Matt Fleming
    Signed-off-by: Arnaldo Carvalho de Melo

    Matt Fleming
     

09 Jul, 2010

1 commit


22 Apr, 2010

2 commits

  • This adds mappings from the register numbers from DWARF to the
    register names used in the PowerPC Regs and Stack Access API. This
    allows perf probe to be used to record variable contents on PowerPC.

    This requires the functionality represented by the config symbol
    HAVE_REGS_AND_STACK_ACCESS_API in order to function, although it will
    compile without it. That functionality is added for PowerPC in commit
    359e4284 ("powerpc: Add kprobe-based event tracer").

    Signed-off-by: Ian Munsie
    Acked-by: Masami Hiramatsu
    Signed-off-by: Paul Mackerras

    Ian Munsie
     
  • The perf userspace tool included some architecture specific code to map
    registers from the DWARF register number into the names used by the regs
    and stack access API.

    This moves the architecture specific code out into a separate
    arch/x86 directory along with the infrastructure required to use it.

    Signed-off-by: Ian Munsie
    Acked-by: Masami Hiramatsu
    Signed-off-by: Paul Mackerras

    Ian Munsie