csky: basic ftrace supported

When gcc with -pg, it'll add _mcount stub in every function. We need
implement the _mcount in kernel and ftrace depends on stackstrace.

To do: call-graph, dynamic ftrace

Signed-off-by: Guo Ren <ren_guo@c-sky.com>
This commit is contained in:
Guo Ren
2018-12-09 14:29:59 +08:00
parent 17a68777bc
commit 230c77a5e9
6 changed files with 64 additions and 0 deletions

View File

@@ -0,0 +1,9 @@
/* SPDX-License-Identifier: GPL-2.0 */
// Copyright (C) 2018 Hangzhou C-SKY Microsystems co.,ltd.
#ifndef __ASM_CSKY_FTRACE_H
#define __ASM_CSKY_FTRACE_H
extern void _mcount(unsigned long from_pc);
#endif /* __ASM_CSKY_FTRACE_H */