• Nickhu's avatar
    nds32: Add perf call-graph support. · c8b34461
    Nickhu authored
    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: default avatarNickhu <nickhu@andestech.com>
    Acked-by: default avatarGreentime Hu <greentime@andestech.com>
    Signed-off-by: default avatarGreentime Hu <greentime@andestech.com>
    c8b34461
perf_event_cpu.c 36.7 KB