mirror of
https://github.com/xemu-project/xemu.git
synced 2024-12-04 09:53:32 +00:00
243af0225a
Meson doesn't enjoy the same flexibility we have with Make in choosing the include path. In particular the tracing headers are using $(build_root)/$(<D). In order to keep the include directives unchanged, the simplest solution is to generate headers with patterns like "trace/trace-audio.h" and place forwarding headers in the source tree such that for example "audio/trace.h" includes "trace/trace-audio.h". This patch is too ugly to be applied to the Makefiles now. It's only a way to separate the changes to the tracing header files from the Meson rewrite of the tracing logic. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
43 lines
1.3 KiB
C
43 lines
1.3 KiB
C
/*
|
|
* Common System Call Tracing Wrappers for *-user
|
|
*
|
|
* Copyright (c) 2019 Linaro
|
|
* Written by Alex Bennée <alex.bennee@linaro.org>
|
|
*
|
|
* SPDX-License-Identifier: GPL-2.0-or-later
|
|
*/
|
|
|
|
#ifndef _SYSCALL_TRACE_H_
|
|
#define _SYSCALL_TRACE_H_
|
|
|
|
#include "trace/trace-root.h"
|
|
|
|
/*
|
|
* These helpers just provide a common place for the various
|
|
* subsystems that want to track syscalls to put their hooks in. We
|
|
* could potentially unify the -strace code here as well.
|
|
*/
|
|
|
|
static inline void record_syscall_start(void *cpu, int num,
|
|
abi_long arg1, abi_long arg2,
|
|
abi_long arg3, abi_long arg4,
|
|
abi_long arg5, abi_long arg6,
|
|
abi_long arg7, abi_long arg8)
|
|
{
|
|
trace_guest_user_syscall(cpu, num,
|
|
arg1, arg2, arg3, arg4,
|
|
arg5, arg6, arg7, arg8);
|
|
qemu_plugin_vcpu_syscall(cpu, num,
|
|
arg1, arg2, arg3, arg4,
|
|
arg5, arg6, arg7, arg8);
|
|
}
|
|
|
|
static inline void record_syscall_return(void *cpu, int num, abi_long ret)
|
|
{
|
|
trace_guest_user_syscall_ret(cpu, num, ret);
|
|
qemu_plugin_vcpu_syscall_ret(cpu, num, ret);
|
|
}
|
|
|
|
|
|
#endif /* _SYSCALL_TRACE_H_ */
|