1. 25 Aug, 2010 1 commit
    • Lin Ming's avatar
      perf: Remove unused variable · 04fba671
      Lin Ming authored
      This fixes the following build warning introduced by the
      callchain rework:
      
        arch/x86/kernel/cpu/perf_event.c:1574: warning: ‘perf_callchain_entry_nmi’ defined but not used
      Signed-off-by: default avatarLin Ming <ming.m.lin@intel.com>
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Cc: Frederic Weisbecker <fweisbec@gmail.com>
      LKML-Reference: <1282718949.16443.75.camel@minggr.sh.intel.com>
      Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
      04fba671
  2. 22 Aug, 2010 3 commits
    • Frederic Weisbecker's avatar
      perf: Support for callchains merge · 612d4fd7
      Frederic Weisbecker authored
      If we sort the histograms by comm, which is the default,
      we need to merge some of them, typically different thread
      histograms of a same process, or just same comm. But during
      this merge, we forgot to merge callchains.
      
      So imagine we have three threads (tids: 1000, 1001, 1002) that
      belong to comm "foo".
      
      tid 1000 got 100 events
      tid 1001 got 10 events
      tid 1002 got 3 events
      
      Once we merge these histograms to get a per comm result, we'll
      finally get:
      
      "foo" got 113 events
      
      The problem is if we merge 1000 and 1001 histograms into 1002, then
      the end merge result, wrt callchains, will be only callchains that
      belong to 1002.
      This is because we haven't handled callchains in the merge. Only those
      from one of the threads inside a common comm survive.
      
      It means during this merge, we can lose a lot of callchains.
      
      Fix this by implementing callchains merge and apply it on histograms
      that collapse.
      Reported-by: default avatarChristoph Hellwig <hch@infradead.org>
      Signed-off-by: default avatarFrederic Weisbecker <fweisbec@gmail.com>
      Cc: Ingo Molnar <mingo@elte.hu>
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
      Cc: Paul Mackerras <paulus@samba.org>
      612d4fd7
    • Frederic Weisbecker's avatar
      perf: Rename append_callchain into callchain_append · 6cb8e561
      Frederic Weisbecker authored
      Do that to start a consistant callchain API namespace.
      Signed-off-by: default avatarFrederic Weisbecker <fweisbec@gmail.com>
      Cc: Ingo Molnar <mingo@elte.hu>
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Christoph Hellwig <hch@infradead.org>
      6cb8e561
    • Frederic Weisbecker's avatar
      perf: Keep track of the max depth of a callchain · d2009c51
      Frederic Weisbecker authored
      In order to implement callchains collapsing, we need to keep
      track of the maximum depth in a histogram tree of callchains.
      This way we'll avoid allocating an arbitrary temporary buffer
      size on callchain merge time.
      Signed-off-by: default avatarFrederic Weisbecker <fweisbec@gmail.com>
      Cc: Ingo Molnar <mingo@elte.hu>
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Christoph Hellwig <hch@infradead.org>
      d2009c51
  3. 21 Aug, 2010 2 commits
  4. 20 Aug, 2010 1 commit
    • Peter Zijlstra's avatar
      perf: Remove superfluous return values from perf_callchain_*() · ed805261
      Peter Zijlstra authored
      Fixes these build warnings introduced by the callchain
      rework:
      
       arch/x86/kernel/cpu/perf_event.c: In function ‘perf_callchain_kernel’:
       arch/x86/kernel/cpu/perf_event.c:1646: warning: ‘return’ with a value, in function returning void
       arch/x86/kernel/cpu/perf_event.c: In function ‘perf_callchain_user’:
       arch/x86/kernel/cpu/perf_event.c:1699: warning: ‘return’ with a value, in function returning void
       arch/x86/kernel/cpu/perf_event.c: At top level:
       arch/x86/kernel/cpu/perf_event.c:1607: warning: ‘perf_callchain_entry_nmi’ defined but not used
      Signed-off-by: default avatarPeter Zijlstra <a.p.zijlstra@chello.nl>
      Acked-by: default avatarFrederic Weisbecker <fweisbec@gmail.com>
      LKML-Reference: <new-submission>
      Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
      ed805261
  5. 19 Aug, 2010 4 commits
  6. 18 Aug, 2010 10 commits
    • Namhyung Kim's avatar
      perf, tracing: add missing __percpu markups · 6016ee13
      Namhyung Kim authored
      ftrace_event_call->perf_events, perf_trace_buf,
      fgraph_data->cpu_data and some local variables are percpu pointers
      missing __percpu markups. Add them.
      Signed-off-by: default avatarNamhyung Kim <namhyung@gmail.com>
      Acked-by: default avatarTejun Heo <tj@kernel.org>
      Cc: Steven Rostedt <rostedt@goodmis.org>
      Cc: Ingo Molnar <mingo@elte.hu>
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Stephane Eranian <eranian@google.com>
      LKML-Reference: <1281498479-28551-1-git-send-email-namhyung@gmail.com>
      Signed-off-by: default avatarFrederic Weisbecker <fweisbec@gmail.com>
      6016ee13
    • Frederic Weisbecker's avatar
      perf: Humanize the number of contexts · 7ae07ea3
      Frederic Weisbecker authored
      Instead of hardcoding the number of contexts for the recursions
      barriers, define a cpp constant to make the code more
      self-explanatory.
      Signed-off-by: default avatarFrederic Weisbecker <fweisbec@gmail.com>
      Cc: Ingo Molnar <mingo@elte.hu>
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Stephane Eranian <eranian@google.com>
      7ae07ea3
    • Frederic Weisbecker's avatar
      perf: Fix race in callchains · 927c7a9e
      Frederic Weisbecker authored
      Now that software events don't have interrupt disabled anymore in
      the event path, callchains can nest on any context. So seperating
      nmi and others contexts in two buffers has become racy.
      
      Fix this by providing one buffer per nesting level. Given the size
      of the callchain entries (2040 bytes * 4), we now need to allocate
      them dynamically.
      
      v2: Fixed put_callchain_entry call after recursion.
          Fix the type of the recursion, it must be an array.
      
      v3: Use a manual pr cpu allocation (temporary solution until NMIs
          can safely access vmalloc'ed memory).
          Do a better separation between callchain reference tracking and
          allocation. Make the "put" path lockless for non-release cases.
      
      v4: Protect the callchain buffers with rcu.
      
      v5: Do the cpu buffers allocations node affine.
      Signed-off-by: default avatarFrederic Weisbecker <fweisbec@gmail.com>
      Tested-by: default avatarWill Deacon <will.deacon@arm.com>
      Cc: Ingo Molnar <mingo@elte.hu>
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Stephane Eranian <eranian@google.com>
      Cc: Paul Mundt <lethal@linux-sh.org>
      Cc: David Miller <davem@davemloft.net>
      Cc: Borislav Petkov <bp@amd64.org>
      927c7a9e
    • Frederic Weisbecker's avatar
      perf: Factorize callchain context handling · f72c1a93
      Frederic Weisbecker authored
      Store the kernel and user contexts from the generic layer instead
      of archs, this gathers some repetitive code.
      Signed-off-by: default avatarFrederic Weisbecker <fweisbec@gmail.com>
      Acked-by: default avatarPaul Mackerras <paulus@samba.org>
      Tested-by: default avatarWill Deacon <will.deacon@arm.com>
      Cc: Ingo Molnar <mingo@elte.hu>
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
      Cc: Stephane Eranian <eranian@google.com>
      Cc: David Miller <davem@davemloft.net>
      Cc: Paul Mundt <lethal@linux-sh.org>
      Cc: Borislav Petkov <bp@amd64.org>
      f72c1a93
    • Frederic Weisbecker's avatar
      perf: Generalize some arch callchain code · 56962b44
      Frederic Weisbecker authored
      - Most archs use one callchain buffer per cpu, except x86 that needs
        to deal with NMIs. Provide a default perf_callchain_buffer()
        implementation that x86 overrides.
      
      - Centralize all the kernel/user regs handling and invoke new arch
        handlers from there: perf_callchain_user() / perf_callchain_kernel()
        That avoid all the user_mode(), current->mm checks and so...
      
      - Invert some parameters in perf_callchain_*() helpers: entry to the
        left, regs to the right, following the traditional (dst, src).
      Signed-off-by: default avatarFrederic Weisbecker <fweisbec@gmail.com>
      Acked-by: default avatarPaul Mackerras <paulus@samba.org>
      Tested-by: default avatarWill Deacon <will.deacon@arm.com>
      Cc: Ingo Molnar <mingo@elte.hu>
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
      Cc: Stephane Eranian <eranian@google.com>
      Cc: David Miller <davem@davemloft.net>
      Cc: Paul Mundt <lethal@linux-sh.org>
      Cc: Borislav Petkov <bp@amd64.org>
      56962b44
    • Frederic Weisbecker's avatar
      perf: Generalize callchain_store() · 70791ce9
      Frederic Weisbecker authored
      callchain_store() is the same on every archs, inline it in
      perf_event.h and rename it to perf_callchain_store() to avoid
      any collision.
      
      This removes repetitive code.
      Signed-off-by: default avatarFrederic Weisbecker <fweisbec@gmail.com>
      Acked-by: default avatarPaul Mackerras <paulus@samba.org>
      Tested-by: default avatarWill Deacon <will.deacon@arm.com>
      Cc: Ingo Molnar <mingo@elte.hu>
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
      Cc: Stephane Eranian <eranian@google.com>
      Cc: David Miller <davem@davemloft.net>
      Cc: Paul Mundt <lethal@linux-sh.org>
      Cc: Borislav Petkov <bp@amd64.org>
      70791ce9
    • Frederic Weisbecker's avatar
      perf: Drop unappropriate tests on arch callchains · c1a65932
      Frederic Weisbecker authored
      Drop the TASK_RUNNING test on user tasks for callchains as
      this check doesn't seem to make any sense.
      
      Also remove the tests for !current that is not supposed to
      happen and current->pid as this should be handled at the
      generic level, with exclude_idle attribute.
      Signed-off-by: default avatarFrederic Weisbecker <fweisbec@gmail.com>
      Tested-by: default avatarWill Deacon <will.deacon@arm.com>
      Cc: Ingo Molnar <mingo@elte.hu>
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Stephane Eranian <eranian@google.com>
      Cc: David Miller <davem@davemloft.net>
      Cc: Paul Mundt <lethal@linux-sh.org>
      Cc: Borislav Petkov <bp@amd64.org>
      c1a65932
    • Li Zefan's avatar
      tracing: Clean up seqfile code for format file · 86397dc3
      Li Zefan authored
      Remove the nasty hack that marks a pointer's LSB to distinguish common
      fields from event fields. Replace it with a more sane approach.
      Signed-off-by: default avatarLi Zefan <lizf@cn.fujitsu.com>
      LKML-Reference: <4C6A23C2.9020606@cn.fujitsu.com>
      Signed-off-by: default avatarSteven Rostedt <rostedt@goodmis.org>
      86397dc3
    • Zhang, Yanmin's avatar
      perf, x86: Fix Intel-nhm PMU programming errata workaround · 351af072
      Zhang, Yanmin authored
      Fix the Errata AAK100/AAP53/BD53 workaround, the officialy documented
      workaround we implemented in:
      
       11164cd4: perf, x86: Add Nehelem PMU programming errata workaround
      
      doesn't actually work fully and causes a stuck PMU state
      under load and non-functioning perf profiling.
      
      A functional workaround was found by trial & error.
      
      Affects all Nehalem-class Intel PMUs.
      Signed-off-by: default avatarZhang Yanmin <yanmin_zhang@linux.intel.com>
      Signed-off-by: default avatarPeter Zijlstra <a.p.zijlstra@chello.nl>
      LKML-Reference: <1281073148.2125.63.camel@ymzhang.sh.intel.com>
      Cc: Arjan van de Ven <arjan@linux.intel.com>
      Cc: "H. Peter Anvin" <hpa@zytor.com>
      Cc: <stable@kernel.org> # .35.x
      Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
      351af072
    • Ingo Molnar's avatar
      Merge branch 'perf/urgent' of... · 9d5f3714
      Ingo Molnar authored
      Merge branch 'perf/urgent' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux-2.6 into perf/urgent
      9d5f3714
  7. 17 Aug, 2010 2 commits
    • Bernd Petrovitsch's avatar
      perf tools: Fix build on POSIX shells · 033a273f
      Bernd Petrovitsch authored
      POSIX sh does not specify the brace expansion, so fix it by replacing the
      global $(shell ...) lines quite at the top creating the output directories with
      real rules.
      
      Cc: Ingo Molnar <mingo@elte.hu>
      Cc: Kusanagi Kouichi <slash@ac.auone-net.jp>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Paul Mackerras <paulus@samba.org>
      LKML-Reference: <1282046280.5822.4.camel@thorin>
      Signed-off-by: default avatarBernd Petrovitsch <bernd@sysprog.at>
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      033a273f
    • Randy Dunlap's avatar
      latencytop: Fix kconfig dependency warnings · 625fdcaa
      Randy Dunlap authored
      warning: (LATENCYTOP && HAVE_LATENCYTOP_SUPPORT) selects
      SCHED_DEBUG which has unmet direct dependencies (DEBUG_KERNEL &&
      PROC_FS) warning: (LATENCYTOP && HAVE_LATENCYTOP_SUPPORT) selects
      SCHEDSTATS which has unmet direct dependencies (DEBUG_KERNEL && PROC_FS)
      
      Add depends on STACKTRACE_SUPPORT for 'select STACKTRACE'.
      Add depends on PROC_FS since that is where the output goes.
      Signed-off-by: default avatarRandy Dunlap <randy.dunlap@oracle.com>
      Cc: Arjan van de Ven <arjan@linux.intel.com>
      LKML-Reference: <20100812123121.a7c99cde.randy.dunlap@oracle.com>
      Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
      625fdcaa
  8. 16 Aug, 2010 8 commits
    • Ingo Molnar's avatar
      Merge branch 'perf/urgent' of... · f24645a9
      Ingo Molnar authored
      Merge branch 'perf/urgent' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux-2.6 into perf/urgent
      f24645a9
    • Steven Rostedt's avatar
      Merge branch 'tip/perf/urgent-3' of... · d244b6bd
      Steven Rostedt authored
      Merge branch 'tip/perf/urgent-3' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-2.6-trace into trace/tip/perf/urgent-4
      
      Conflicts:
      	kernel/trace/trace_events.c
      Signed-off-by: default avatarSteven Rostedt <rostedt@goodmis.org>
      d244b6bd
    • Arnaldo Carvalho de Melo's avatar
      perf annotate tui: Fix exit and RIGHT keys handling · e9184621
      Arnaldo Carvalho de Melo authored
      As part of ongoing effort to reduce the coupling with libnewt, browsers
      are being changed to return the exit key.
      
      The annotate browser is not returning it as expected by builtin-annotate
      when annotating multiple symbols (when 'perf annotate' is called without
      specifying a symbol name).
      
      Fix it by returning the exit key and also adding the RIGHT key as a exit
      key so that going to the next symbol in the TUI can work again.
      
      Cc: Frederic Weisbecker <fweisbec@gmail.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      LKML-Reference: <new-submission>
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      e9184621
    • Linus Torvalds's avatar
      Linux 2.6.36-rc1 · da5cabf8
      Linus Torvalds authored
      da5cabf8
    • Linus Torvalds's avatar
      Merge branch 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux-acpi-2.6 · 2245ba2a
      Linus Torvalds authored
      * 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux-acpi-2.6:
        gcc-4.6: ACPI: fix unused but set variables in ACPI
        ACPI thermal: make procfs I/F depend on CONFIG_ACPI_PROCFS
        ACPI video: make procfs I/F depend on CONFIG_ACPI_PROCFS
        ACPI processor: remove deprecated ACPI procfs I/F
        ACPI power_resource: remove unused procfs I/F
        ACPI: remove deprecated ACPI procfs I/F
        ACPI: introduce drivers/acpi/sysfs.c
        ACPI: introduce module parameter acpi.aml_debug_output
        ACPI: introduce drivers/acpi/debugfs.c
        ACPI, APEI, ERST debug support
        ACPI, APEI, Manage GHES as platform devices
        ACPI, APEI, Rename CPER and GHES severity constants
        ACPI, APEI, Fix a typo of error path of apei_resources_request
        ACPI / ACPICA: Fix reference counting problems with GPE handlers
        ACPI: Add the check of ADR flag in course of finding ACPI handle for PCI device
        ACPI / Sleep: Drop acpi_suspend_finish()
        ACPI / Sleep: Consolidate suspend and hibernation routines
        ACPI / Wakeup: Simplify enabling of wakeup devices
        ACPI / Sleep: Rework enabling wakeup devices
        ACPI / Sleep: Free NVS copy if suspending of devices fails
      
      Fixed up totally buggered "ACPI: fix unused but set variables in ACPI"
      patch that doesn't even compile in the merge.
      
      Thanks to Sedat Dilek <sedat.dilek@googlemail.com> for noticing the
      breakage before I even pulled.  And a big "Grrr.." at Len for not even
      bothering to compile the tree before asking me to pull.
      2245ba2a
    • Linus Torvalds's avatar
      Merge git://git.infradead.org/iommu-2.6 · e2e96c66
      Linus Torvalds authored
      * git://git.infradead.org/iommu-2.6:
        intel-iommu: Fix 32-bit build warning with __cmpxchg()
        intr-remap: allow disabling source id checking
      e2e96c66
    • Linus Torvalds's avatar
      Merge git://git.infradead.org/mtd-2.6 · 7355a5a6
      Linus Torvalds authored
      * git://git.infradead.org/mtd-2.6:
        mtd/nand_ids: Fix buswidth
        mtd/m25p80: fix test for end of loop
        mtd/m25p80: retlen is never NULL
        MIPS: Fix gen_nand probe structures contents
        gen_nand: Test if nr_chips field is valid
        BFIN: Fix gen_nand probe structures contents
        nand/denali: move all hardware initialization work to denali_hw_init
        nand/denali: Add a page check in denali_read_page & denali_read_page_raw
        nand/denali: use cpu_relax() while waiting for hardware interrupt
        nand/denali: change read_status function method
        nand/denali: Fixed check patch warnings
        ARM: Fix gen_nand probe structures contents
        mtd/nand_base: fix kernel-doc warnings & typos
        nand/denali: use dev_xx debug function to replace nand_dbg_print and some printk
        nand/denali: Fixed handle ECC error bugs
        nand/denali: use iowrite32() to replace denali_write32()
        nand/denali: Fixed probe function bugs
      7355a5a6
    • Linus Torvalds's avatar
      Merge git://git.kernel.org/pub/scm/linux/kernel/git/cmetcalf/linux-tile · 7a1b29a8
      Linus Torvalds authored
      * git://git.kernel.org/pub/scm/linux/kernel/git/cmetcalf/linux-tile:
        arch/tile: don't validate CROSS_COMPILE needlessly
        arch/tile: export only COMMAND_LINE_SIZE to userspace.
        arch/tile: rename ARCH_KMALLOC_MINALIGN to ARCH_DMA_MINALIGN
        arch/tile: Rename the hweight() implementations to __arch_hweight()
        arch/tile: extend syscall ABI to set r1 on return as well.
        arch/tile: Various cleanups.
        arch/tile: support backtracing on TILE-Gx
        arch/tile: Fix a couple of issues with the COMPAT code for TILE-Gx.
        arch/tile: Use separate, better minsec values for clocksource and sched_clock.
        arch/tile: correct a bug in freeing bootmem by VA for the optional second initrd.
        arch: tile: mm: pgtable.c: Removed duplicated #include
        arch: tile: kernel/proc.c Removed duplicated #include
        Add fanotify syscalls to <asm-generic/unistd.h>.
        arch/tile: support new kunmap_atomic() naming convention.
        tile: remove unused ISA_DMA_THRESHOLD define
      
      Conflicts in arch/tile/configs/tile_defconfig (pick the mainline version
      with the reduced defconfig).
      7a1b29a8
  9. 15 Aug, 2010 9 commits