]> git.proxmox.com Git - mirror_ubuntu-disco-kernel.git/commit
nds32: Add perf call-graph support.
authorNickhu <nickhu@andestech.com>
Thu, 25 Oct 2018 02:24:16 +0000 (10:24 +0800)
committerGreentime Hu <greentime@andestech.com>
Tue, 6 Nov 2018 10:01:40 +0000 (18:01 +0800)
commitc8b34461705e16b94d34c96c7784009b28b3da03
treec95f1dee343ccb975391b01c1b7fce8bb3c9e573
parentebd09753b5707cc083c52e1d0ec7f45dccdb73bf
nds32: Add perf call-graph support.

The perf call-graph option can trace the callchain
between functions. This commit add the perf callchain
for nds32. There are kerenl callchain and user callchain.
The kerenl callchain can trace the function in kernel
space. There are two type for user callchain. One for the
'optimize for size' config is set, and another one for the
config is not set. The difference between two types is that
the index of frame-pointer in user stack is not the same.

For example:
With optimize for size:
User Stack:
---------
|   lp |
---------
| gp |
---------
| fp |

Without optimize for size:
User Stack:
1. non-leaf function:
---------
| lp |
---------
| fp |

2. leaf function:
---------
| fp |

Signed-off-by: Nickhu <nickhu@andestech.com>
Acked-by: Greentime Hu <greentime@andestech.com>
Signed-off-by: Greentime Hu <greentime@andestech.com>
arch/nds32/kernel/perf_event_cpu.c