tests: Fixes test-io-channel-file by mask only owner file state mask bits
[qemu/ar7.git] / include / user / syscall-trace.h
blob42e3b48b032f4dfc0d9c3ae66885289ef0824e62
1 /*
2 * Common System Call Tracing Wrappers for *-user
4 * Copyright (c) 2019 Linaro
5 * Written by Alex Bennée <alex.bennee@linaro.org>
7 * SPDX-License-Identifier: GPL-2.0-or-later
8 */
10 #ifndef _SYSCALL_TRACE_H_
11 #define _SYSCALL_TRACE_H_
13 #include "trace/trace-root.h"
16 * These helpers just provide a common place for the various
17 * subsystems that want to track syscalls to put their hooks in. We
18 * could potentially unify the -strace code here as well.
21 static inline void record_syscall_start(void *cpu, int num,
22 abi_long arg1, abi_long arg2,
23 abi_long arg3, abi_long arg4,
24 abi_long arg5, abi_long arg6,
25 abi_long arg7, abi_long arg8)
27 trace_guest_user_syscall(cpu, num,
28 arg1, arg2, arg3, arg4,
29 arg5, arg6, arg7, arg8);
30 qemu_plugin_vcpu_syscall(cpu, num,
31 arg1, arg2, arg3, arg4,
32 arg5, arg6, arg7, arg8);
35 static inline void record_syscall_return(void *cpu, int num, abi_long ret)
37 trace_guest_user_syscall_ret(cpu, num, ret);
38 qemu_plugin_vcpu_syscall_ret(cpu, num, ret);
42 #endif /* _SYSCALL_TRACE_H_ */