This is the mail archive of the systemtap@sourceware.org mailing list for the systemtap project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: arm64 kprobes/systemtap support progress


On 11/05/2014 12:12 PM, William Cohen wrote:
> On 11/02/2014 04:02 PM, William Cohen wrote:
>> Hi All,
>>
>> Dave Long has been working on getting arm64 kprobes support merged into the upstream kernels.  The kprobes64 branch of the git tree at 
>> https://git.linaro.org/people/dave.long/linux.git
>>
> 
> A bit more poking around with the arm64 kprobe support and found that it does not work well with smp at the moment. There appears to be some issues in linux/arch/arm64/kernel/insn.c and getting the processors to patch in the kprobe breakpoint. After booting the machine in uniprocessor mode (kernel boot parameter maxcpus=1) the kprobes were much more stable. I was able to run the systemtap syscall tests with:
> 
> make installcheck RUNTESTFLAGS="--debug systemtap.syscall/*syscall.exp"
> 
> There were a lot of failures on arm64 due to a number of the syscalls being remapped.  An incomplete list of the syscall mappings:
> 
> open -> openat
> chmod -> fchmodat
> chown -> fchown
> lchown -> fchownat
> mkdir -> mkdirat
> rmdir -> unlinkat
> dup2 -> dup3
> inotify_init -> inotify_init1
> link -> linkat
> readlink -> readlinkat
> symlink -> symlinkat
> 
> 
> Thus, get the following mediocre results from the syscall tests:
> 
> 
> 		=== systemtap Summary ===
> 
> # of expected passes		110
> # of unexpected failures	70
> # of untested testcases		2
> # of unsupported tests		4
> 
> 
> I am getting more adventurous and trying to run more of the systemtap testsuite to see what other things are not right on arm64.
> 
> -Will
> 


Hi All,

There have been some additional fixes for the arm64 kprobes support in the kernel.  The cause of the smp hanging in the instruction patch code has been identified and a patch has been accepted upstream to fix this.  In most cases kprobes on arm64 uses single stepping to execute out of line code, but there are some instructions that need to be simulated.  As more of the systemtap tests are run some errors have been found and fixed in the kprobes instruction simulation code.  Dave Long is reviewing the instruction simulation code to eliminate other remaining errors in the instruction simulation code. Right now the following systemtap example in the testsuite appears to trigger one of those simulator errors:

stap -w functioncallcount.stp "*@mm/*.c" -c "sleep 1"

Dave Smith patched the testsuite/systemtap.syscall tests to allow the syscall tests to recognize openat syscalls for the open syscall which improves the syscall testresults to:
		=== systemtap Summary ===

# of expected passes		132
# of unexpected failures	50
# of untested testcases		2
# of unsupported tests		4



-Will


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]