Re: [PATCH v2 3/4] vfio-ccw: Add a trace for asynchronous requests

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, 16 Oct 2019 07:36:09 -0400
Eric Farman <farman@xxxxxxxxxxxxx> wrote:

> On 10/16/19 6:15 AM, Cornelia Huck wrote:
> > On Wed, 16 Oct 2019 03:58:21 +0200
> > Eric Farman <farman@xxxxxxxxxxxxx> wrote:
> >   
> >> Since the asynchronous requests are typically associated with
> >> error recovery, let's add a simple trace when one of those is
> >> issued to a device.
> >>
> >> Signed-off-by: Eric Farman <farman@xxxxxxxxxxxxx>
> >> ---
> >>  drivers/s390/cio/vfio_ccw_fsm.c   |  4 ++++
> >>  drivers/s390/cio/vfio_ccw_trace.c |  1 +
> >>  drivers/s390/cio/vfio_ccw_trace.h | 30 ++++++++++++++++++++++++++++++
> >>  3 files changed, 35 insertions(+)  
> > 
> > (...)
> >   
> >> diff --git a/drivers/s390/cio/vfio_ccw_trace.h b/drivers/s390/cio/vfio_ccw_trace.h
> >> index 5005d57901b4..23b288eb53dc 100644
> >> --- a/drivers/s390/cio/vfio_ccw_trace.h
> >> +++ b/drivers/s390/cio/vfio_ccw_trace.h
> >> @@ -17,6 +17,36 @@
> >>  
> >>  #include <linux/tracepoint.h>
> >>  
> >> +TRACE_EVENT(vfio_ccw_fsm_async_request,
> >> +	TP_PROTO(struct subchannel_id schid,
> >> +		 int command,
> >> +		 int errno),
> >> +	TP_ARGS(schid, command, errno),
> >> +
> >> +	TP_STRUCT__entry(
> >> +		__field(u8, cssid)
> >> +		__field(u8, ssid)
> >> +		__field(u16, sch_no)
> >> +		__field(int, command)
> >> +		__field(int, errno)
> >> +	),
> >> +
> >> +	TP_fast_assign(
> >> +		__entry->cssid = schid.cssid;
> >> +		__entry->ssid = schid.ssid;
> >> +		__entry->sch_no = schid.sch_no;
> >> +		__entry->command = command;
> >> +		__entry->errno = errno;
> >> +	),
> >> +
> >> +	TP_printk("schid=%x.%x.%04x command=%d errno=%d",  
> > 
> > I'd probably rather print the command as a hex value.  
> 
> I'm fine with that too.  Want me to send an update?

I think that would be the easiest way.

> 
> >   
> >> +		  __entry->cssid,
> >> +		  __entry->ssid,
> >> +		  __entry->sch_no,
> >> +		  __entry->command,
> >> +		  __entry->errno)
> >> +);
> >> +
> >>  TRACE_EVENT(vfio_ccw_fsm_event,
> >>  	TP_PROTO(struct subchannel_id schid, int state, int event),
> >>  	TP_ARGS(schid, state, event),  
> >   




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Kernel Development]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite Info]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Linux Media]     [Device Mapper]

  Powered by Linux