|
|
Log in / Subscribe / Register

perf: riscv: Preliminary Perf Event Support on RISC-V

From:  Alan Kao <alankao-AT-andestech.com>
To:  Palmer Dabbelt <palmer-AT-sifive.com>, Albert Ou <albert-AT-sifive.com>, "Peter Zijlstra" <peterz-AT-infradead.org>, Ingo Molnar <mingo-AT-redhat.com>, "Arnaldo Carvalho de Melo" <acme-AT-kernel.org>, Alexander Shishkin <alexander.shishkin-AT-linux.intel.com>, Jiri Olsa <jolsa-AT-redhat.com>, "Namhyung Kim" <namhyung-AT-kernel.org>, Alex Solomatnikov <sols-AT-sifive.com>, Atish Patra <atish.patra-AT-wdc.com>, Jonathan Corbet <corbet-AT-lwn.net>, <linux-riscv-AT-lists.infradead.org>, <linux-doc-AT-vger.kernel.org>, <linux-kernel-AT-vger.kernel.org>
Subject:  [PATCH v5 0/2] perf: riscv: Preliminary Perf Event Support on RISC-V
Date:  Fri, 20 Apr 2018 07:27:48 +0800
Message-ID:  <1524180470-8622-1-git-send-email-alankao@andestech.com>
Cc:  Alan Kao <alankao-AT-andestech.com>, Greentime Hu <greentime-AT-andestech.com>, Nick Hu <nickhu-AT-andestech.com>
Archive-link:  Article

This implements the baseline PMU for RISC-V platforms.

To ease future PMU portings, a guide is also written, containing
perf concepts, arch porting practices and some hints.

Changes in v5:
 - Fix patch errors from checkpatch.pl.

Changes in v4:
 - Fix several compilation errors.  Sorry for that.
 - Raise a warning in the write_counter body.

Changes in v3:
 - Fix typos in the document.
 - Change the initialization routine from statically assigning PMU to
   device-tree-based methods, and set default to the PMU proposed in
   this patch.

Changes in v2:
 - Fix the bug reported by Alex, which was caused by not sufficient
   initialization.  Check https://lkml.org/lkml/2018/3/31/251 for the
   discussion.

Alan Kao (2):
  perf: riscv: preliminary RISC-V support
  perf: riscv: Add Document for Future Porting Guide

 Documentation/riscv/pmu.txt         | 249 ++++++++++++++
 arch/riscv/Kconfig                  |  13 +
 arch/riscv/include/asm/perf_event.h |  79 ++++-
 arch/riscv/kernel/Makefile          |   1 +
 arch/riscv/kernel/perf_event.c      | 485 ++++++++++++++++++++++++++++
 5 files changed, 823 insertions(+), 4 deletions(-)
 create mode 100644 Documentation/riscv/pmu.txt
 create mode 100644 arch/riscv/kernel/perf_event.c

-- 
2.17.0



Copyright © 2018, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds