[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [UNIKRAFT PATCH 3/3] lib/vfscore: Add preadv tracepoints
Signed-off-by: Alexander Jung <alexander.jung@xxxxxxxxx> --- lib/vfscore/main.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/lib/vfscore/main.c b/lib/vfscore/main.c index 0cbcd21..13697b8 100644 --- a/lib/vfscore/main.c +++ b/lib/vfscore/main.c @@ -355,12 +355,18 @@ UK_SYSCALL_DEFINE(ssize_t, write, int, fd, const void *, buf, size_t, count) return pwrite(fd, buf, count, -1); } +UK_TRACEPOINT(trace_vfs_preadv, "%d %p 0x%x 0x%x", int, const struct iovec*, + int, off_t); +UK_TRACEPOINT(trace_vfs_preadv_ret, "0x%x", ssize_t); +UK_TRACEPOINT(trace_vfs_preadv_err, "%d", int); + ssize_t preadv(int fd, const struct iovec *iov, int iovcnt, off_t offset) { struct vfscore_file *fp; size_t bytes; int error; + trace_vfs_preadv(fd, iov, iovcnt, offset); error = fget(fd, &fp); if (error) goto out_errno; @@ -383,6 +389,7 @@ ssize_t preadv(int fd, const struct iovec *iov, int iovcnt, off_t offset) goto out_errno_fdrop; fdrop(fp); + trace_vfs_preadv_ret(bytes); return bytes; out_errno_fdrop: @@ -390,6 +397,7 @@ out_errno_fdrop: out_errno: errno = error; + trace_vfs_preadv_err(error); return -1; } -- 2.11.0
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |