linux-sg2042/arch/csky
Guo Ren 28bb030f93 csky/ftrace: Add dynamic function tracer (include graph tracer)
Support dynamic ftrace including dynamic graph tracer. Gcc-csky with -pg
will produce call site in every function prologue and we can use these
call site to hook trace function.

gcc with -pg origin call site:
	push	lr
	jbsr	_mcount
	nop32
	nop32

If the (callee - caller)'s offset is in range of bsr instruction, we'll
modify code with:
	push	lr
	bsr	_mcount
	nop32
	nop32
Else if the (callee - caller)'s offset is out of bsr instrunction, we'll
modify code with:
	push	lr
	movih	r26, ...
	ori	r26, ...
	jsr	r26

(r26 is reserved for jsr link reg in csky abiv2 spec.)

Signed-off-by: Guo Ren <ren_guo@c-sky.com>
2019-04-22 13:44:57 +08:00
..
abiv1 arch/csky patches for 4.21-rc1 2019-01-05 09:50:07 -08:00
abiv2 csky/ftrace: Add dynamic function tracer (include graph tracer) 2019-04-22 13:44:57 +08:00
boot csky: use common dtb build rules 2018-11-01 10:52:27 +08:00
configs
include csky/ftrace: Add dynamic function tracer (include graph tracer) 2019-04-22 13:44:57 +08:00
kernel csky/ftrace: Add dynamic function tracer (include graph tracer) 2019-04-22 13:44:57 +08:00
lib Remove 'type' argument from access_ok() function 2019-01-03 18:57:57 -08:00
mm treewide: add checks for the return value of memblock_alloc*() 2019-03-12 10:04:02 -07:00
Kconfig csky/ftrace: Add dynamic function tracer (include graph tracer) 2019-04-22 13:44:57 +08:00
Kconfig.debug csky: remove builtin-dtb Kbuild 2018-11-01 10:52:26 +08:00
Makefile csky: Fixup vdsp&fpu issues in kernel 2019-04-22 13:44:57 +08:00