1. 25 10月, 2011 2 次提交
  2. 01 7月, 2011 1 次提交
    • P
      perf, arch: Add generic NODE cache events · 89d6c0b5
      Peter Zijlstra 提交于
      Add a NODE level to the generic cache events which is used to measure
      local vs remote memory accesses. Like all other cache events, an
      ACCESS is HIT+MISS, if there is no way to distinguish between reads
      and writes do reads only etc..
      
      The below needs filling out for !x86 (which I filled out with
      unsupported events).
      
      I'm fairly sure ARM can leave it like that since it doesn't strike me as
      an architecture that even has NUMA support. SH might have something since
      it does appear to have some NUMA bits.
      
      Sparc64, PowerPC and MIPS certainly want a good look there since they
      clearly are NUMA capable.
      Signed-off-by: NPeter Zijlstra <a.p.zijlstra@chello.nl>
      Cc: David Miller <davem@davemloft.net>
      Cc: Anton Blanchard <anton@samba.org>
      Cc: David Daney <ddaney@caviumnetworks.com>
      Cc: Deng-Cheng Zhu <dengcheng.zhu@gmail.com>
      Cc: Paul Mundt <lethal@linux-sh.org>
      Cc: Will Deacon <will.deacon@arm.com>
      Cc: Robert Richter <robert.richter@amd.com>
      Cc: Stephane Eranian <eranian@google.com>
      Link: http://lkml.kernel.org/r/1303508226.4865.8.camel@laptopSigned-off-by: NIngo Molnar <mingo@elte.hu>
      89d6c0b5
  3. 31 3月, 2011 1 次提交
  4. 15 3月, 2011 2 次提交
    • D
      MIPS, Perf-events: Work with the new PMU interface · 404ff638
      Deng-Cheng Zhu 提交于
      This is the MIPS part of the following commits by Peter Zijlstra:
      
      - a4eaf7f1
          perf: Rework the PMU methods
      
          Replace pmu::{enable,disable,start,stop,unthrottle} with
          pmu::{add,del,start,stop}, all of which take a flags argument.
      
          The new interface extends the capability to stop a counter while
          keeping it scheduled on the PMU. We replace the throttled state with
          the generic stopped state.
      
          This also allows us to efficiently stop/start counters over certain
          code paths (like IRQ handlers).
      
          It also allows scheduling a counter without it starting, allowing for
          a generic frozen state (useful for rotating stopped counters).
      
          The stopped state is implemented in two different ways, depending on
          how the architecture implemented the throttled state:
      
           1) We disable the counter:
              a) the pmu has per-counter enable bits, we flip that
              b) we program a NOP event, preserving the counter state
      
           2) We store the counter state and ignore all read/overflow events
      
      For MIPSXX, the stopped state is implemented in the way of 1.b as above.
      
      - 33696fc0
          perf: Per PMU disable
      
          Changes perf_disable() into perf_pmu_disable().
      
      - 24cd7f54
          perf: Reduce perf_disable() usage
      
          Since the current perf_disable() usage is only an optimization,
          remove it for now. This eases the removal of the __weak
          hw_perf_enable() interface.
      
      - b0a873eb
          perf: Register PMU implementations
      
          Simple registration interface for struct pmu, this provides the
          infrastructure for removing all the weak functions.
      
      - 51b0fe39
          perf: Deconstify struct pmu
      
          sed -ie 's/const struct pmu\>/struct pmu/g' `git grep -l "const struct pmu\>"`
      Reported-by: NWu Zhangjin <wuzhangjin@gmail.com>
      Acked-by: NDavid Daney <ddaney@caviumnetworks.com>
      Signed-off-by: NDeng-Cheng Zhu <dengcheng.zhu@gmail.com>
      To: a.p.zijlstra@chello.nl
      To: fweisbec@gmail.com
      To: will.deacon@arm.com
      Cc: linux-mips@linux-mips.org
      Cc: linux-kernel@vger.kernel.org
      Cc: wuzhangjin@gmail.com
      Cc: paulus@samba.org
      Cc: mingo@elte.hu
      Cc: acme@redhat.com
      Cc: dengcheng.zhu@gmail.com
      Cc: matt@console-pimps.org
      Cc: sshtylyov@mvista.com
      Cc: ddaney@caviumnetworks.com
      Patchwork: http://patchwork.linux-mips.org/patch/2012/Signed-off-by: NRalf Baechle <ralf@linux-mips.org>
      404ff638
    • D
      MIPS, Perf-events: Work with irq_work · 91f01737
      Deng-Cheng Zhu 提交于
      This is the MIPS part of the following commit by Peter Zijlstra:
      
      - e360adbe
          irq_work: Add generic hardirq context callbacks
      
          Provide a mechanism that allows running code in IRQ context. It is
          most useful for NMI code that needs to interact with the rest of the
          system -- like wakeup a task to drain buffers.
      
          Perf currently has such a mechanism, so extract that and provide it as
          a generic feature, independent of perf so that others may also
          benefit.
      
          The IRQ context callback is generated through self-IPIs where
          possible, or on architectures like powerpc the decrementer (the
          built-in timer facility) is set to generate an interrupt immediately.
      
          Architectures that don't have anything like this get to do with a
          callback from the timer tick. These architectures can call
          irq_work_run() at the tail of any IRQ handlers that might enqueue such
          work (like the perf IRQ handler) to avoid undue latencies in
          processing the work.
      
      For MIPSXX, we need to call irq_work_run() at the tail of the perf IRQ
      handler as described above.
      Reported-by: NWu Zhangjin <wuzhangjin@gmail.com>
      Acked-by: NPeter Zijlstra <a.p.zijlstra@chello.nl>
      Acked-by: NDavid Daney <ddaney@caviumnetworks.com>
      Signed-off-by: NDeng-Cheng Zhu <dengcheng.zhu@gmail.com>
      To: fweisbec@gmail.com
      To: will.deacon@arm.com
      Cc: linux-mips@linux-mips.org
      Cc: linux-kernel@vger.kernel.org
      Cc: paulus@samba.org
      Cc: mingo@elte.hu
      Cc: acme@redhat.com
      Cc: matt@console-pimps.org
      Cc: sshtylyov@mvista.com,
      Patchwork: http://patchwork.linux-mips.org/patch/2011/Signed-off-by: NRalf Baechle <ralf@linux-mips.org>
      91f01737
  5. 26 11月, 2010 1 次提交
  6. 30 10月, 2010 1 次提交
    • D
      MIPS: Add support for hardware performance events (mipsxx) · 3a9ab99e
      Deng-Cheng Zhu 提交于
      This patch adds the mipsxx Perf-events support based on the skeleton.
      Generic hardware events and cache events are now fully implemented for
      the 24K/34K/74K/1004K cores. To support other cores in mipsxx (such as
      R10000/SB1), the generic hardware event tables and cache event tables
      need to be filled out. To support other CPUs which have different PMU
      than mipsxx, such as RM9000 and LOONGSON2, the additional files
      perf_event_$cpu.c need to be created.
      
      Raw event is an important part of Perf-events. It helps the user collect
      performance data for events that are not listed as the generic hardware
      events and cache events but ARE supported by the CPU's PMU.
      
      This patch also adds this feature for mipsxx 24K/34K/74K/1004K. For how to
      use it, please refer to processor core software user's manual and the
      comments for mipsxx_pmu_map_raw_event() for more details.
      
      Please note that this is a "precise" implementation, which means the
      kernel will check whether the requested raw events are supported by this
      CPU and which hardware counters can be assigned for them.
      
      To test the functionality of Perf-event, you may want to compile the tool
      "perf" for your MIPS platform. You can refer to the following URL:
      http://www.linux-mips.org/archives/linux-mips/2010-10/msg00126.html
      
      You also need to customize the CFLAGS and LDFLAGS in tools/perf/Makefile
      for your libs, includes, etc.
      
      In case you encounter the boot failure in SMVP kernel on multi-threading
      CPUs, you may take a look at:
      http://www.linux-mips.org/git?p=linux-mti.git;a=commitdiff;h=5460815027d802697b879644c74f0e8365254020Signed-off-by: NDeng-Cheng Zhu <dengcheng.zhu@gmail.com>
      To: linux-mips@linux-mips.org
      Cc: a.p.zijlstra@chello.nl
      Cc: paulus@samba.org
      Cc: mingo@elte.hu
      Cc: acme@redhat.com
      Cc: jamie.iles@picochip.com
      Cc: ddaney@caviumnetworks.com
      Cc: matt@console-pimps.org
      Patchwork: https://patchwork.linux-mips.org/patch/1689/Signed-off-by: NRalf Baechle <ralf@linux-mips.org>
      
       create mode 100644 arch/mips/kernel/perf_event_mipsxx.c
      3a9ab99e