This is a basic -fstack-protector support without per-task canary
switching. The protector will report something like when stack
corruption is detected:
stack-protector: Kernel stack is corrupted in: sys_kill+0x23c/0x23c
Tested with a local array overflow in kill system call.
Signed-off-by: Mao
This patch adds support for DWARF register mappings and libdw registers
initialization, which is used by perf callchain analyzing when
--call-graph=dwarf is given.
Signed-off-by: Mao Han
Cc: Paul Walmsley
Cc: Greentime Hu
Cc: Palmer Dabbelt
Cc: linux-riscv
Cc: Christoph Hellwig
Cc: Guo Ren
This patch implements the perf registers sampling and validation API
for riscv arch. The valid registers and their register ID are defined in
perf_regs.h. Perf tool can backtrace in userspace with unwind library
and the registers/user stack dump support.
Signed-off-by: Mao Han
Cc: Paul Walmsley
fix inconsistent comment
- force to build kernel with -fno-omit-frame-pointer if perf
event is enabled
Changes since v1:
- simplify implementation and code convention
Signed-off-by: Mao Han
Cc: Paul Walmsley
Cc: Greentime Hu
Cc: Palmer Dabbelt
Cc: linux-riscv
Cc: Christoph Hellwig
On Wed, Sep 04, 2019 at 02:24:57PM -0700, Paul Walmsley wrote:
> Hello Mao Han,
>
> On Thu, 29 Aug 2019, Mao Han wrote:
>
> > This patch add support for DWARF register mappings and libdw registers
> > initialization, which is used by perf callchain analyzing when
> &g
On Wed, Sep 04, 2019 at 12:54:41PM -0700, Paul Walmsley wrote:
> Hello Mao Han,
>
> On Thu, 29 Aug 2019, Mao Han wrote:
>
> > This patch add support for perf callchain sampling on riscv platform.
> > The return address of leaf function is retrieved from pt_regs as
&g
This patch implements the perf registers sampling and validation API
for riscv arch. The valid registers and their register ID are defined in
perf_regs.h. Perf tool can backtrace in userspace with unwind library
and the registers/user stack dump support.
Signed-off-by: Mao Han
Cc: Paul Walmsley
This patch add support for DWARF register mappings and libdw registers
initialization, which is used by perf callchain analyzing when
--call-graph=dwarf is given.
Signed-off-by: Mao Han
Cc: Paul Walmsley
Cc: Greentime Hu
Cc: Palmer Dabbelt
Cc: linux-riscv
Cc: Christoph Hellwig
Cc: Guo Ren
This patch add support for perf callchain sampling on riscv platform.
The return address of leaf function is retrieved from pt_regs as
it is not saved in the outmost frame.
Signed-off-by: Mao Han
Cc: Paul Walmsley
Cc: Greentime Hu
Cc: Palmer Dabbelt
Cc: linux-riscv
Cc: Christoph Hellwig
Cc
with -fno-omit-frame-pointer if perf
event is enabled
Changes since v1:
- simplify implementation and code convention
Cc: Paul Walmsley
Cc: Greentime Hu
Cc: Palmer Dabbelt
Cc: linux-riscv
Cc: Christoph Hellwig
Cc: Guo Ren
Mao Han (3):
riscv: Add perf callchain support
riscv: Add
Mao Han (3):
riscv: Add perf callchain support
riscv: Add support for perf registers sampling
riscv: Add support for libdw
arch/riscv/Kconfig| 2 +
arch/riscv/Makefile | 3 +
arch/riscv/include/uapi/asm/perf_regs.h | 42
This patch implements the perf registers sampling and validation API
for riscv arch. The valid registers and their register ID are defined in
perf_regs.h. Perf tool can backtrace in userspace with unwind library
and the registers/user stack dump support.
Signed-off-by: Mao Han
Cc: Paul Walmsley
This patch add support for DWARF register mappings and libdw registers
initialization, which is used by perf callchain analyzing when
--call-graph=dwarf is given.
Signed-off-by: Mao Han
Cc: Paul Walmsley
Cc: Greentime Hu
Cc: Palmer Dabbelt
Cc: linux-riscv
Cc: Christoph Hellwig
Cc: Guo Ren
This patch add support for perf callchain sampling on riscv platform.
The return address of leaf function is retrieved from pt_regs as
it is not saved in the outmost frame.
Signed-off-by: Mao Han
Cc: Paul Walmsley
Cc: Greentime Hu
Cc: Palmer Dabbelt
Cc: linux-riscv
Cc: Christoph Hellwig
Cc
Hi Greentime,
On Wed, Aug 21, 2019 at 05:16:13PM +0800, Greentime Hu wrote:
> Hi Mao,
>
> Mao Han 於 2019年8月20日 週二 下午4:57寫道:
> >
> > This patch add support for perf callchain sampling on riscv platform.
> > The return address of leaf function is retrieved from pt_reg
This patch add support for perf callchain sampling on riscv platform.
The return address of leaf function is retrieved from pt_regs as
it is not saved in the outmost frame.
Signed-off-by: Mao Han
Cc: Paul Walmsley
Cc: Greentime Hu
Cc: Palmer Dabbelt
Cc: linux-riscv
Cc: Christoph Hellwig
Cc
This patch implements the perf registers sampling and validation API
for riscv arch. The valid registers and their register ID are defined in
perf_regs.h. Perf tool can backtrace in userspace with unwind library
and the registers/user stack dump support.
Signed-off-by: Mao Han
Cc: Paul Walmsley
This patch add support for DWARF register mappings and libdw registers
initialization, which is used by perf callchain analyzing when
--call-graph=dwarf is given.
Signed-off-by: Mao Han
Cc: Paul Walmsley
Cc: Greentime Hu
Cc: Palmer Dabbelt
Cc: linux-riscv
Cc: Christoph Hellwig
Cc: Guo Ren
inconsistent comment
- force to build kernel with -fno-omit-frame-pointer if perf
event is enabled
Changes since v1:
- simplify implementation and code convention
Cc: Paul Walmsley
Cc: Greentime Hu
Cc: Palmer Dabbelt
Cc: linux-riscv
Cc: Christoph Hellwig
Cc: Guo Ren
Mao Han (3
On Mon, Aug 19, 2019 at 04:18:01PM +0800, Mao Han wrote:
> Hi Paul,
> On Fri, Aug 16, 2019 at 10:14:01AM -0700, Paul Walmsley wrote:
> > Hello Mao Han,
> >
> > On Fri, 17 May 2019, Mao Han wrote:
> >
> > > This patch set add perf callchain(FP/DWARF) supp
Hi Paul,
On Fri, Aug 16, 2019 at 10:14:01AM -0700, Paul Walmsley wrote:
> Hello Mao Han,
>
> On Fri, 17 May 2019, Mao Han wrote:
>
> > This patch set add perf callchain(FP/DWARF) support for RISC-V.
> > It comes from the csky version callchain support with some
>
not supported. When vdso.so is linked without
build id, the section size of PT_NOTE will be zero, buf size will
realloc to zero and cause memory corruption.
Signed-off-by: Mao Han
Cc: Paul Walmsley
Cc: Palmer Dabbelt
Cc: Albert Ou
---
arch/riscv/kernel/vdso/Makefile | 2 +-
1 file changed, 1
Commit-ID: aa23aa55166c2865ac430168c4b9d405cf8c6980
Gitweb: https://git.kernel.org/tip/aa23aa55166c2865ac430168c4b9d405cf8c6980
Author: Mao Han
AuthorDate: Wed, 26 Jun 2019 14:52:19 +0800
Committer: Arnaldo Carvalho de Melo
CommitDate: Mon, 1 Jul 2019 22:50:41 -0300
perf annotate: Add
← rts
Signed-off-by: Mao Han
Cc: Guo Ren
Cc: Peter Zijlstra
Cc: Ingo Molnar
Cc: Arnaldo Carvalho de Melo
Cc: Alexander Shishkin
Cc: Jiri Olsa
Cc: Namhyung Kim
---
tools/perf/arch/csky/annotate/instructions.c | 48
tools/perf/util/annotate.c
This patch add interrupt request and handler for csky pmu.
perf can record on hardware event with this patch applied.
Signed-off-by: Mao Han
Cc: Guo Ren
---
arch/csky/kernel/perf_event.c | 273 +++---
1 file changed, 258 insertions(+), 15 deletions(-)
diff
. --all-kernel/--all-user is
useless without this patch applied.
Signed-off-by: Mao Han
Cc: Guo Ren
Cc: linux-c...@vger.kernel.org
---
arch/csky/kernel/perf_event.c | 26 ++
1 file changed, 14 insertions(+), 12 deletions(-)
diff --git a/arch/csky/kernel/perf_event.c b
property from dts.
Signed-off-by: Mao Han
Cc: Guo Ren
---
arch/csky/kernel/perf_event.c | 15 ++-
1 file changed, 14 insertions(+), 1 deletion(-)
diff --git a/arch/csky/kernel/perf_event.c b/arch/csky/kernel/perf_event.c
index 2282554..a15b397 100644
--- a/arch/csky/kernel
This patch change the csky pmu initialization from arch init to
device init. The pmu can be configued with information from
device tree(pmu device name, irq number and etc.).
Signed-off-by: Mao Han
Cc: Guo Ren
---
arch/csky/kernel/perf_event.c | 50
This patch adds the documentation to describe that how to add pmu node in
dts.
Signed-off-by: Mao Han
Cc: Rob Herring
Cc: Guo Ren
---
Documentation/devicetree/bindings/csky/pmu.txt | 38 ++
1 file changed, 38 insertions(+)
create mode 100644 Documentation/devicetree
From: Guo Ren
CK810 pmu only support event with index 0-8 and 0xd; CK860 only
support event 1~4, 0xa~0x1b. So do not register unsupport event
to hardware cache event, which may leader to unknown behavior.
Signed-off-by: Guo Ren
Signed-off-by: Mao Han
Cc: Guo Ren
Cc: linux-c
-user)
Guo Ren (1):
csky: Fixup some error count in 810 & 860.
Mao Han (5):
csky: Init pmu as a device
csky: Add count-width property for csky pmu
csky: Add pmu interrupt support
dt-bindings: csky: Add csky PMU bindings
csky: Fix perf record in kernel/user space
Documenta
From: Guo Ren
CK810 pmu only support event with index 0-8 and 0xd; CK860 only
support event 1~4, 0xa~0x1b. So do not register unsupport event
to hardware cache event, which may leader to unknown behavior.
Signed-off-by: Guo Ren
Signed-off-by: Mao Han
Cc: Guo Ren
Cc: linux-c
. --all-kernel/--all-user is
useless without this patch applied.
Signed-off-by: Mao Han
Cc: Guo Ren
Cc: linux-c...@vger.kernel.org
---
arch/csky/kernel/perf_event.c | 6 ++
1 file changed, 6 insertions(+)
diff --git a/arch/csky/kernel/perf_event.c b/arch/csky/kernel/perf_event.c
index
property from dts.
Signed-off-by: Mao Han
Cc: Guo Ren
---
arch/csky/kernel/perf_event.c | 14 +-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/arch/csky/kernel/perf_event.c b/arch/csky/kernel/perf_event.c
index c022acc..36f7f20 100644
--- a/arch/csky/kernel/perf_event.c
This patch adds the documentation to describe that how to add pmu node in
dts.
Signed-off-by: Mao Han
Cc: Rob Herring
Cc: Guo Ren
---
Documentation/devicetree/bindings/csky/pmu.txt | 38 ++
1 file changed, 38 insertions(+)
create mode 100644 Documentation/devicetree
This patch add interrupt request and handler for csky pmu.
perf can record on hardware event with this patch applied.
Signed-off-by: Mao Han
Cc: Guo Ren
---
arch/csky/kernel/perf_event.c | 292 +++---
1 file changed, 276 insertions(+), 16 deletions(-)
diff
& 860.
Mao Han (5):
csky: Init pmu as a device
csky: Add count-width property for csky pmu
csky: Add pmu interrupt support
dt-bindings: csky: Add csky PMU bindings
csky: Fix perf record in kernel/user space
Documentation/devicetree/bindings/csky/pmu.txt | 38 +++
arch/csky/ke
This patch change the csky pmu initialization from arch init to
device init. The pmu can be configued with information from
device tree(pmu device name, irq number and etc.).
Signed-off-by: Mao Han
Cc: Guo Ren
---
arch/csky/kernel/perf_event.c | 58
PING?
On Fri, May 17, 2019 at 04:43:01PM +0800, Mao Han wrote:
> This patch set add perf callchain(FP/DWARF) support for RISC-V.
> It comes from the csky version callchain support with some
> slight modifications. The patchset base on Linux 5.1.
>
> CC: Palmer Dabbelt
> CC:
property from dts.
Signed-off-by: Mao Han
CC: Guo Ren
CC: linux-c...@vger.kernel.org
---
arch/csky/kernel/perf_event.c | 16 +++-
1 file changed, 15 insertions(+), 1 deletion(-)
diff --git a/arch/csky/kernel/perf_event.c b/arch/csky/kernel/perf_event.c
index c022acc..f1b3cdf 100644
--- a
This patch adds the documentation to describe that how to add pmu node in
dts.
Signed-off-by: Mao Han
CC: Rob Herring
CC: Guo Ren
CC: linux-c...@vger.kernel.org
---
Documentation/devicetree/bindings/csky/pmu.txt | 38 ++
1 file changed, 38 insertions(+)
create mode
This patch change the csky pmu initialization from arch init to
device init. The pmu can be configued with information from
device tree(pmu device name, irq number and etc.).
Signed-off-by: Mao Han
CC: Guo Ren
CC: linux-c...@vger.kernel.org
---
arch/csky/kernel/perf_event.c | 58
. --all-kernel/--all-user is
useless without this patch applied.
Signed-off-by: Mao Han
CC: Guo Ren
CC: linux-c...@vger.kernel.org
---
arch/csky/kernel/perf_event.c | 6 ++
1 file changed, 6 insertions(+)
diff --git a/arch/csky/kernel/perf_event.c b/arch/csky/kernel/perf_event.c
index
enable on smp)
Changes since v1:
- do not update hpcr when event type is invalid(fix option
--all-kernel/--all-user)
Guo Ren (1):
csky: Fixup some error count in 810 & 860.
Mao Han (5):
csky: Init pmu as a device
csky: Add reg-io-width property for csky pmu
csky: Add pmu inter
From: Guo Ren
ck810 pmu only support event with index 0-8 and 0xd; ck860 only
support event 1~4, 0xa~0x1b. So do not register unsupport event
to hardware cache event, which may leader to unknown behavior.
Signed-off-by: Guo Ren
Signed-off-by: Mao Han
CC: Guo Ren
CC: linux-c
This patch add interrupt request and handler for csky pmu.
perf can record on hardware event with this patch applied.
Signed-off-by: Mao Han
CC: Guo Ren
CC: linux-c...@vger.kernel.org
---
arch/csky/kernel/perf_event.c | 293 +++---
1 file changed, 277
This patch change the csky pmu initialization from arch init to
device init. The pmu can be configued with information from
device tree(pmu device name, irq number and etc.).
Signed-off-by: Mao Han
CC: Guo Ren
CC: linux-c...@vger.kernel.org
---
arch/csky/kernel/perf_event.c | 58
property from dts.
Signed-off-by: Mao Han
CC: Guo Ren
CC: linux-c...@vger.kernel.org
---
arch/csky/kernel/perf_event.c | 16 +++-
1 file changed, 15 insertions(+), 1 deletion(-)
diff --git a/arch/csky/kernel/perf_event.c b/arch/csky/kernel/perf_event.c
index c022acc..f1b3cdf 100644
--- a
This patch adds the documentation to describe that how to add pmu node in
dts.
Signed-off-by: Mao Han
CC: Rob Herring
CC: Guo Ren
CC: linux-c...@vger.kernel.org
---
Documentation/devicetree/bindings/csky/pmu.txt | 38 ++
1 file changed, 38 insertions(+)
create mode
This patch add interrupt request and handler for csky pmu.
perf can record on hardware event with this patch applied.
Signed-off-by: Mao Han
CC: Guo Ren
CC: linux-c...@vger.kernel.org
---
arch/csky/kernel/perf_event.c | 283 +++---
1 file changed, 265
CC: Guo Ren
CC: linux-c...@vger.kernel.org
Guo Ren (1):
csky: Fixup some error count in 810 & 860.
Mao Han (4):
csky: Init pmu as a device
csky: Add reg-io-width property for csky pmu
csky: Add pmu interrupt support
dt-bindings: csky: Add csky PMU bindings
Documentation/device
From: Guo Ren
ck810 pmu only support event with index 0-8 and 0xd; ck860 only
support event 1~4, 0xa~0x1b. So do not register unsupport event
to hardware cache event, which may leader to unknown behavior.
Signed-off-by: Guo Ren
Signed-off-by: Mao Han
CC: Guo Ren
CC: linux-c
property from dts.
Signed-off-by: Mao Han
CC: Guo Ren
CC: linux-c...@vger.kernel.org
---
arch/csky/kernel/perf_event.c | 16 +++-
1 file changed, 15 insertions(+), 1 deletion(-)
diff --git a/arch/csky/kernel/perf_event.c b/arch/csky/kernel/perf_event.c
index c022acc..f1b3cdf 100644
--- a
This patch change the csky pmu initialization from arch init to
device init. The pmu can be configued with information from
device tree(pmu device name, irq number and etc.).
Signed-off-by: Mao Han
CC: Guo Ren
CC: linux-c...@vger.kernel.org
---
arch/csky/kernel/perf_event.c | 58
This patch set add hardware sampling support for csky-pmu, and
also add some properties to pmu node definition. perf can record
on hardware event with this patch applied.
Guo Ren (1):
csky: Fixup some error count in 810 & 860.
Mao Han (4):
csky: Init pmu as a device
csky: Add reg-io-w
From: Guo Ren
ck810 pmu only support event with index 0-8 and 0xd; ck860 only
support event 1~4, 0xa~0x1b. So do not register unsupport event
to hardware cache event, which may leader to unknown behavior.
Signed-off-by: Guo Ren
Signed-off-by: Mao Han
CC: Guo Ren
CC: linux-c
This patch adds the documentation to describe that how to add pmu node in
dts.
Signed-off-by: Mao Han
CC: Rob Herring
CC: Guo Ren
CC: linux-c...@vger.kernel.org
---
Documentation/devicetree/bindings/csky/pmu.txt | 38 ++
1 file changed, 38 insertions(+)
create mode
This patch add interrupt request and handler for csky pmu.
perf can record on hardware event with this patch applied.
Signed-off-by: Mao Han
CC: Guo Ren
CC: linux-c...@vger.kernel.org
---
arch/csky/kernel/perf_event.c | 277 +++---
1 file changed, 259
Commit-ID: b399ec215b8488468b947c34dfc097003408fe34
Gitweb: https://git.kernel.org/tip/b399ec215b8488468b947c34dfc097003408fe34
Author: Mao Han
AuthorDate: Sun, 21 Apr 2019 23:33:14 +0800
Committer: Arnaldo Carvalho de Melo
CommitDate: Wed, 15 May 2019 16:36:46 -0300
csky: Add support
This patch add support for DWARF register mappings and libdw registers
initialization, which is used by perf callchain analyzing when
--call-graph=dwarf is given.
Signed-off-by: Mao Han
CC: Palmer Dabbelt
CC: linux-riscv
CC: Christoph Hellwig
CC: Guo Ren
---
tools/arch/riscv/include/uapi
This patch implements the perf registers sampling and validation API
for riscv arch. The valid registers and their register ID are defined in
perf_regs.h. Perf tool can backtrace in userspace with unwind library
and the registers/user stack dump support.
Signed-off-by: Mao Han
CC: Palmer Dabbelt
This patch add support for perf callchain sampling on riscv platform.
The return address of leaf function is retrieved from pt_regs as
it is not saved in the outmost frame.
Signed-off-by: Mao Han
CC: Palmer Dabbelt
CC: linux-riscv
CC: Christoph Hellwig
CC: Guo Ren
---
arch/riscv/Makefile
- force to build kernel with -fno-omit-frame-pointer if perf
event is enabled
Changes since v1:
- simplify implementation and code convention
Mao Han (3):
riscv: Add perf callchain support
riscv: Add support for perf registers sampling
riscv: Add support for libdw
arch/riscv
ord mode in record_callchain_opt.
Some generic modification seems required to change this, default to
use dwarf if riscv and show corresponding message in --help.
Thanks,
Mao Han
report --call-graph
> >+ *
> >+ * On RISC-V platform, the program being sampled and the C library
> >+ * need to be compiled with * -mbacktrace, otherwise the user
>
> What is "-mbacktrace"? I don't remember that ever being a RISC-V GCC option,
> and my compiler doesn't undersand it. It understands "-fbacktrace" but that
> doesn't produce a frame pointer.
>
It's a csky specific option, I forget to modify the comment.
So it should be -fno-omit-frame-pointer here.
Thanks,
Mao Han
nto this
file, gpr is normally enough for backtrace and context restoration. I'm not
quite understand the problem of extensible. All modification to this file
should be synchronzied as the perf tool is released with the kernel.
Thanks,
Mao Han
ned-off-by: Mao Han
---
arch/csky/mm/fault.c | 12 ++--
1 file changed, 10 insertions(+), 2 deletions(-)
diff --git a/arch/csky/mm/fault.c b/arch/csky/mm/fault.c
index e1725f8..d07141d 100644
--- a/arch/csky/mm/fault.c
+++ b/arch/csky/mm/fault.c
@@ -17,6 +17,7 @@
#include
#include
Commit-ID: 3a5b64f05d7fe36dea0dde26423e3044fbacd482
Gitweb: https://git.kernel.org/tip/3a5b64f05d7fe36dea0dde26423e3044fbacd482
Author: Mao Han
AuthorDate: Wed, 10 Apr 2019 16:16:43 +0800
Committer: Arnaldo Carvalho de Melo
CommitDate: Tue, 16 Apr 2019 11:27:53 -0300
perf evsel: Use
This patch add support for DWARF register mappings and libdw registers
initialization, which is used by perf callchain analyzing when
--call-graph=dwarf is given.
Signed-off-by: Mao Han
CC: Palmer Dabbelt
CC: linux-riscv
CC: Christoph Hellwig
CC: Guo Ren
---
tools/arch/riscv/include/uapi/asm
This patch add support for perf callchain sampling on riscv platform.
The return address of leaf function is retrieved from pt_regs as
it is not saved in the outmost frame.
Signed-off-by: Mao Han
CC: Palmer Dabbelt
CC: linux-riscv
CC: Christoph Hellwig
CC: Guo Ren
---
arch/riscv/kernel
This patch implements the perf registers sampling and validation API
for riscv arch. The valid registers and their register ID are defined in
perf_regs.h. Perf tool can backtrace in userspace with unwind library
and the registers/user stack dump support.
Signed-off-by: Mao Han
CC: Palmer Dabbelt
Changes since v1:
- simplify implementation and code convention
Mao Han (3):
riscv: Add perf callchain support
riscv: Add support for perf registers sampling
riscv: Add support for libdw
arch/riscv/Kconfig| 2 +
arch/riscv/include/uapi/asm/perf_regs.h
Changes since v2:
- use same registers name as struct pt_regs
- code convention
Changes since v1:
- seperate the callchain support using frame pointer
Mao Han (2):
csky: Add support for perf registers sampling
csky: Add support for libdw
arch/csky/Kconfig
This patch implements the perf registers sampling and validation API
for csky arch. The valid registers and their register ID are defined in
perf_regs.h. Perf tool can backtrace in userspace with unwind library
and the registers/user stack dump support.
CC: Guo Ren
Signed-off-by: Mao Han
19-q2/msg7.html
CC: Guo Ren
Signed-off-by: Mao Han
---
tools/arch/csky/include/uapi/asm/perf_regs.h | 51 ++
tools/perf/Makefile.config | 6 +-
tools/perf/arch/csky/Build | 1 +
tools/perf/arch/csky/Makefile| 3 +
tools
Commit-ID: 21e6dfe04861c2c1b529f2759850bc62a80ca050
Gitweb: https://git.kernel.org/tip/21e6dfe04861c2c1b529f2759850bc62a80ca050
Author: Mao Han
AuthorDate: Wed, 10 Apr 2019 16:16:43 +0800
Committer: Arnaldo Carvalho de Melo
CommitDate: Wed, 10 Apr 2019 10:25:28 -0300
perf evsel: Use
> + fp = user_backtrace(entry, fp, regs->ra);
> > + while ((entry->nr < entry->max_stack) &&
> > + fp && !((unsigned long)fp & 0x3))
> > + fp = user_backtrace(entry, fp, 0);
>
> Please don't indent the condition continuation and the loop body
> by the same amount.
Like this?
while ((entry->nr < entry->max_stack) &&
fp && !((unsigned long)fp & 0x3))
fp = user_backtrace(entry, fp, 0);
Thanks,
Mao Han
This patch implements the perf registers sampling and validation API
for riscv arch. The valid registers and their register ID are defined in
perf_regs.h. Perf tool can backtrace in userspace with unwind library
and the registers/user stack dump support.
Signed-off-by: Mao Han
CC: Palmer
This patch add support for perf callchain sampling on riscv platform.
The return address of leaf function is retrieved from pt_regs as
it is not saved in the outmost frame.
Signed-off-by: Mao Han
CC: Palmer Dabbelt
---
arch/riscv/kernel/Makefile | 3 +-
arch/riscv/kernel
This patch add support for DWARF register mappings and libdw registers
initialization, which is used by perf callchain analyzing when
--call-graph=dwarf is given.
Signed-off-by: Mao Han
CC: Palmer Dabbelt
---
tools/arch/riscv/include/uapi/asm/perf_regs.h | 42
tools/perf
Hi,
This patch set add perf callchain(FP/DWARF) support for RISC-V.
It comes from the csky version callchain support with some
slight modifications. The patchset base on Linux 5.1-rc4:
15ade5d2e7775667cf191cf2f94327a4889f8b9d
CC: Palmer Dabbelt
CC: Guo Ren
Mao Han (3):
riscv: Add perf
This patch implements the perf registers sampling and validation API
for csky arch. The valid registers and their register ID are defined in
perf_regs.h. Perf tool can backtrace in userspace with unwind library
and the registers/user stack dump support.
CC: Guo Ren
Signed-off-by: Mao Han
from Arnaldo
replace other hweight_long with hweight64
Changes since v2:
- use same registers name as struct pt_regs
- code convention
Changes since v1:
- seperate the callchain support using frame pointer
Mao Han (3):
perf evsel: Use hweight64() instead of
hweight_long
-off-by: Mao Han
---
tools/arch/csky/include/uapi/asm/perf_regs.h | 51 ++
tools/perf/Makefile.config | 6 +-
tools/perf/arch/csky/Build | 1 +
tools/perf/arch/csky/Makefile| 3 +
tools/perf/arch/csky/include/perf_regs.h | 100
overflow check fail.
Signed-off-by: Mao Han
Cc: Adrian Hunter
Cc: Alexander Shishkin
Cc: Jiri Olsa
Cc: Namhyung Kim
Cc: Peter Zijlstra
Cc: Stephane Eranian
Fixes: 6a21c0b5c2ab ("perf tools: Add core support for sampling intr machine
state regs")
Fixes: d03f2170546d ("per
sider doing it next time.
>
> - Arnaldo
>
Thanks for help improving the patch and the suggestion.
Tested with the new patch on C-SKY, seems work fine.
Mao Han
overflow check fail.
CC: Peter Zijlstra
CC: Ingo Molnar
CC: Arnaldo Carvalho de Melo
CC: Alexander Shishkin
CC: Jiri Olsa
CC: Namhyung Kim
Signed-off-by: Mao Han
---
tools/perf/util/evsel.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/perf/util/evsel.c b/tools/perf
-off-by: Mao Han
---
tools/arch/csky/include/uapi/asm/perf_regs.h | 51 ++
tools/perf/Makefile.config | 6 +-
tools/perf/arch/csky/Build | 1 +
tools/perf/arch/csky/Makefile| 3 +
tools/perf/arch/csky/include/perf_regs.h | 100
name as struct pt_regs
- code convention
Changes since v1:
- seperate the callchain support using frame pointer
Mao Han (3):
perf: use hweight64 instead of hweight_long
csky: Add support for perf registers sampling
csky: add support for libdw
arch/csky/Kconfig
This patch implements the perf registers sampling and validation API
for csky arch. The valid registers and their register ID are defined in
perf_regs.h. Perf tool can backtrace in userspace with unwind library
and the registers/user stack dump support.
CC: Guo Ren
Signed-off-by: Mao Han
CC: Namhyung Kim
CC: Guo Ren
Mao Han (2):
csky: Add support for perf registers sampling
csky: add support for libdw
arch/csky/Kconfig| 2 +
arch/csky/include/uapi/asm/perf_regs.h | 48 ++
arch/csky/kernel/Makefile| 1
Ren
Signed-off-by: Mao Han
---
tools/arch/csky/include/uapi/asm/perf_regs.h | 48 ++
tools/perf/Makefile.config | 6 +-
tools/perf/arch/csky/Build | 1 +
tools/perf/arch/csky/Makefile| 3 +
tools/perf/arch/csky/include/perf_regs.h
This patch implements the perf registers sampling and validation API
for csky arch. The valid registers and their register ID are defined in
perf_regs.h. Perf tool can backtrace in userspace with unwind library
and the registers/user stack dump support.
CC: Guo Ren
Signed-off-by: Mao Han
overflow check fail.
CC: Peter Zijlstra
CC: Ingo Molnar
CC: Arnaldo Carvalho de Melo
CC: Alexander Shishkin
CC: Jiri Olsa
CC: Namhyung Kim
CC: Guo Ren
Signed-off-by: Mao Han
---
tools/perf/util/evsel.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/perf/util/evsel.c b
Hi,
This patch set add perf callchain support for C-SKY. Including perf callchain
support using frame pointer, perf registers definition, registers initiation
for libdw unwinding and some build infrastructure.
Regards,
Mao Han
>From c538e33c6705c9284264a5035185edb55ace1786 Mon Sep 17 00:00
This patch add support for perf callchain sampling on csky platform.
As fp is used to unwind the stack, the program being sampled and the
C library need to be compiled with -mbacktrace for user callchains,
kernel callchains require CONFIG_STACKTRACE = y.
Signed-off-by: Mao Han
---
arch/csky
96 matches
Mail list logo