Linux NFS development
 help / color / mirror / Atom feed
From: Steven Rostedt <rostedt@goodmis.org>
To: Chuck Lever <chuck.lever@oracle.com>
Cc: Linux NFS Mailing List <linux-nfs@vger.kernel.org>
Subject: Re: odd TRACE_DEFINE_ENUM behavior
Date: Thu, 4 Jan 2018 14:36:42 -0500	[thread overview]
Message-ID: <20180104143642.0b0ddea3@gandalf.local.home> (raw)
In-Reply-To: <F27A4342-42D6-49C7-94A9-E8F9B496E284@oracle.com>

On Thu, 4 Jan 2018 14:10:21 -0500
Chuck Lever <chuck.lever@oracle.com> wrote:

> >> #define nfs_show_stable(stable) \
> >> 	__print_symbolic(stable, \
> >> 			{ NFS_UNSTABLE, " (UNSTABLE)" }, \
> >> 			{ NFS_DATA_SYNC, " (DATA_SYNC)" }, \
> >> 			{ NFS_FILE_SYNC, " (FILE_SYNC)" })
> >> 
> >> When the field contains 0 it displays "(UNSTABLE)", and when the field
> >> contains a non-zero value the displayed symbol is blank.  
> > nfs_initiate_write,
> > Can you show my what is in

Are you sure that it isn't another number there?

> > 
> > /sys/kernel/debug/tracing/events/nfs/nfs_initiate_write/format  
> 
> This is with current v4.15-rc6 code base:
> 
> name: nfs_initiate_write
> ID: 1818
> format:
> 	field:unsigned short common_type;	offset:0;	size:2;	signed:0;
> 	field:unsigned char common_flags;	offset:2;	size:1;	signed:0;
> 	field:unsigned char common_preempt_count;	offset:3;	size:1;	signed:0;
> 	field:int common_pid;	offset:4;	size:4;	signed:1;
> 
> 	field:loff_t offset;	offset:8;	size:8;	signed:1;
> 	field:unsigned long count;	offset:16;	size:8;	signed:0;
> 	field:enum nfs3_stable_how stable;	offset:24;	size:4;	signed:1;
> 	field:dev_t dev;	offset:28;	size:4;	signed:0;
> 	field:u32 fhandle;	offset:32;	size:4;	signed:0;
> 	field:u64 fileid;	offset:40;	size:8;	signed:0;
> 
> print fmt: "fileid=%02x:%02x:%llu fhandle=0x%08x offset=%lld count=%lu stable=%d%s", ((unsigned int) ((REC->dev) >> 20)), ((unsigned int) ((REC->dev) & ((1U << 20) - 1))), (unsigned long long)REC->fileid, REC->fhandle, REC->offset, REC->count, REC->stable, __print_symbolic(REC->stable, { 0, " (UNSTABLE)" }, { 1, " (DATA_SYNC)" }, { 2, " (FILE_SYNC)" })

This looks like it should work fine.

Can you try this:

	trace-cmd record -e nfs_initiate_write

do stuff to trigger the event, then hit Ctrl^C

See if "trace-cmd report" shows it. If not do:

	trace-cmd report -R

Which will suppress the translation of the output and show you the raw
values. That way, you will see what is in the stable field.

-- Steve


  reply	other threads:[~2018-01-04 19:36 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-01-04 16:13 odd TRACE_DEFINE_ENUM behavior Chuck Lever
2018-01-04 18:08 ` Steven Rostedt
2018-01-04 19:10   ` Chuck Lever
2018-01-04 19:36     ` Steven Rostedt [this message]
2018-01-04 19:39       ` Chuck Lever
2018-01-04 20:05         ` Chuck Lever
2018-01-09 22:35       ` Chuck Lever
2018-01-17 21:13         ` Chuck Lever
2018-01-18  3:01           ` Steven Rostedt
2018-01-18 19:29             ` Chuck Lever

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180104143642.0b0ddea3@gandalf.local.home \
    --to=rostedt@goodmis.org \
    --cc=chuck.lever@oracle.com \
    --cc=linux-nfs@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox