From 4a6a795144366840a183f18956a28eefbd5519cc Mon Sep 17 00:00:00 2001 From: guanglei Date: Tue, 12 Sep 2006 09:31:14 +0000 Subject: src/lket.5.in: document nfs trace hooks tapset/nfsd.stp, tapset/nfs_proc.stp, tapset/nfs.stp: Change NFS file identifier. Change NFS version data type from String to INT. Add version variable to nfs_open and nfs_release. LKET/iosyscall.stp: change log_iosyscall_sync() be sync with different timing methods. LKET/utils.stp: add reset_maxaction() since there are too many functions called inside "probe begin". LKET/nfsd.stp, LKET/nfs_proc.stp, LKET/nfs.stp: New trace hooks for NFS, including both NFS client and server side activities. LKET/register_event.stp: Add the register event calls for NFS trace hooks. --- tapset/LKET/iosyscall.stp | 29 ++++++++++++++++++++++++----- 1 file changed, 24 insertions(+), 5 deletions(-) (limited to 'tapset/LKET/iosyscall.stp') diff --git a/tapset/LKET/iosyscall.stp b/tapset/LKET/iosyscall.stp index 494acbaa..480c51a1 100755 --- a/tapset/LKET/iosyscall.stp +++ b/tapset/LKET/iosyscall.stp @@ -524,11 +524,30 @@ function log_iosyscall_sync(hookid:long) current->thread_info->cpu); #else - _stp_printf("%2b%2n%1b%1b%4b%4b%4b%4b%4b%1b", 0, - _GROUP_IOSYSCALL, THIS->hookid, - tv.tv_sec, tv.tv_usec, current->tgid, - current->parent->pid, current->pid, - current->thread_info->cpu); + + if(timing_method == TIMING_GETCYCLES) { + _stp_printf("%2b%2n%8b%8b", (_FMT_)0, + (_FMT_)get_cycles(), + (_FMT_)((int64_t)current->pid << 32 | + (int32_t)GroupID << 24 | (int32_t)hookID << 16 | + (int16_t)current->thread_info->cpu << 8)); + } + else if(timing_method == TIMING_GETTIMEOFDAY) { + struct timeval tv; + do_gettimeofday (&tv); + _stp_printf("%2b%2n%8b%8b", (_FMT_)0, + (_FMT_)(tv.tv_sec*1000000LL + tv.tv_usec), + (_FMT_)((int64_t)current->pid << 32 | + (int32_t)GroupID << 24 | (int32_t)hookID << 16 | + (int16_t)current->thread_info->cpu << 8)); + } + else { + _stp_printf("%2b%2n%8b%8b", (_FMT_)0, + (_FMT_)pfn_schedclock(), + (_FMT_)((int64_t)current->pid << 32 | + (int32_t)GroupID << 24 | (int32_t)hookID << 16 | + (int16_t)current->thread_info->cpu << 8)); + } #endif %} -- cgit