diff options
author | Stefan Metzmacher <metze@samba.org> | 2014-11-15 23:58:15 +0100 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 2014-11-19 23:13:10 +0100 |
commit | 553b83c4d53a273a127e628d72c4edfc2950513d (patch) | |
tree | 6635b975ec7e116602c4f5d7a27d8b1a4eaeffea /source3/modules/vfs_default.c | |
parent | 185c6feab743ce661fe7230ce76beca47cf1d0b1 (diff) | |
download | samba-553b83c4d53a273a127e628d72c4edfc2950513d.tar.gz samba-553b83c4d53a273a127e628d72c4edfc2950513d.tar.xz samba-553b83c4d53a273a127e628d72c4edfc2950513d.zip |
s3:smbprofile: profile async pread/pwrite/fsync syscalls
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Wed Nov 19 23:13:10 CET 2014 on sn-devel-104
Diffstat (limited to 'source3/modules/vfs_default.c')
-rw-r--r-- | source3/modules/vfs_default.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/source3/modules/vfs_default.c b/source3/modules/vfs_default.c index 5fb3b1c1e1..2ac7100cd7 100644 --- a/source3/modules/vfs_default.c +++ b/source3/modules/vfs_default.c @@ -687,6 +687,8 @@ struct vfswrap_asys_state { struct tevent_req *req; ssize_t ret; int err; + SMBPROFILE_BASIC_ASYNC_STATE(profile_basic); + SMBPROFILE_BYTES_ASYNC_STATE(profile_bytes); }; static int vfswrap_asys_state_destructor(struct vfswrap_asys_state *s) @@ -717,6 +719,8 @@ static struct tevent_req *vfswrap_pread_send(struct vfs_handle_struct *handle, state->asys_ctx = handle->conn->sconn->asys_ctx; state->req = req; + SMBPROFILE_BYTES_ASYNC_START(syscall_asys_pread, profile_p, + state->profile_bytes, n); ret = asys_pread(state->asys_ctx, fsp->fh->fd, data, n, offset, req); if (ret != 0) { tevent_req_error(req, ret); @@ -749,6 +753,8 @@ static struct tevent_req *vfswrap_pwrite_send(struct vfs_handle_struct *handle, state->asys_ctx = handle->conn->sconn->asys_ctx; state->req = req; + SMBPROFILE_BYTES_ASYNC_START(syscall_asys_pwrite, profile_p, + state->profile_bytes, n); ret = asys_pwrite(state->asys_ctx, fsp->fh->fd, data, n, offset, req); if (ret != 0) { tevent_req_error(req, ret); @@ -779,6 +785,8 @@ static struct tevent_req *vfswrap_fsync_send(struct vfs_handle_struct *handle, state->asys_ctx = handle->conn->sconn->asys_ctx; state->req = req; + SMBPROFILE_BASIC_ASYNC_START(syscall_asys_fsync, profile_p, + state->profile_basic); ret = asys_fsync(state->asys_ctx, fsp->fh->fd, req); if (ret != 0) { tevent_req_error(req, ret); @@ -822,6 +830,8 @@ static void vfswrap_asys_finished(struct tevent_context *ev, talloc_set_destructor(state, NULL); + SMBPROFILE_BASIC_ASYNC_END(state->profile_basic); + SMBPROFILE_BYTES_ASYNC_END(state->profile_bytes); state->ret = result->ret; state->err = result->err; tevent_req_defer_callback(req, ev); |