From mboxrd@z Thu Jan 1 00:00:00 1970 From: Avi Kivity Subject: Re: [PATCHv2] trace "exit to userspace" event Date: Sun, 24 Oct 2010 19:27:21 +0200 Message-ID: <4CC46C79.3070701@redhat.com> References: <20101024144908.GF2343@redhat.com> <4CC4666A.2030604@redhat.com> <20101024172414.GA27391@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: mtosatti@redhat.com, kvm@vger.kernel.org To: Gleb Natapov Return-path: Received: from mx1.redhat.com ([209.132.183.28]:42424 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932203Ab0JXR1Y (ORCPT ); Sun, 24 Oct 2010 13:27:24 -0400 Received: from int-mx02.intmail.prod.int.phx2.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id o9OHROGe002492 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Sun, 24 Oct 2010 13:27:24 -0400 In-Reply-To: <20101024172414.GA27391@redhat.com> Sender: kvm-owner@vger.kernel.org List-ID: 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