Re: [PATCHv2] trace "exit to userspace" event

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

 



 On 10/24/2010 07:24 PM, Gleb Natapov wrote:
On Sun, Oct 24, 2010 at 07:01:30PM +0200, Avi Kivity wrote:
>   On 10/24/2010 04:49 PM, Gleb Natapov wrote:
>  >Add tracepoint for userspace exit.
>  >
>  >
>  >+
>  >+TRACE_EVENT(kvm_userspace_exit,
>  >+	    TP_PROTO(__u32 reason, int errno),
>  >+	    TP_ARGS(reason, errno),
>  >+
>  >+	TP_STRUCT__entry(
>  >+		__field(	__u32,		reason		)
>  >+		__field(	int,		errno		)
>  >+	),
>  >+
>  >+	TP_fast_assign(
>  >+		__entry->reason		= reason;
>  >+		__entry->errno		= errno;
>
>  Shouldn't this be -errno?
>
I check for __entry->errno<  0 below to see if exit was due to an error.


Then check for > 0. If a variable is named errno, it should work as an input to strerror() (or a __print_symbolic for errno).

--
error compiling committee.c: too many arguments to function

--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux