From mboxrd@z Thu Jan 1 00:00:00 1970 From: Avi Kivity Subject: Re: [PATCH 1/3] perf, core: Introduce attrs to count in either host or guest mode Date: Wed, 11 May 2011 14:44:37 +0300 Message-ID: <4DCA76A5.7030000@redhat.com> References: <1305038132-5080-1-git-send-email-joerg.roedel@amd.com> <1305038132-5080-2-git-send-email-joerg.roedel@amd.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: Peter Zijlstra , Paul Mackerras , Ingo Molnar , Arnaldo Carvalho de Melo , linux-kernel@vger.kernel.org, kvm@vger.kernel.org To: Joerg Roedel Return-path: Received: from mx1.redhat.com ([209.132.183.28]:35488 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756207Ab1EKQR0 (ORCPT ); Wed, 11 May 2011 12:17:26 -0400 In-Reply-To: <1305038132-5080-2-git-send-email-joerg.roedel@amd.com> Sender: kvm-owner@vger.kernel.org List-ID: On 05/10/2011 05:35 PM, Joerg Roedel wrote: > The two new attributes exclude_guest and exclude_host can > bes used by user-space to tell the kernel to setup > performance counter to either only count while the CPU is in > guest or in host mode. > An additional check is also introduced to make sure > user-space does not try to exclude guest and host mode from > counting. > > @@ -217,7 +217,10 @@ struct perf_event_attr { > mmap_data : 1, /* non-exec mmap data */ > sample_id_all : 1, /* sample_type all events */ > > - __reserved_1 : 45; > + exclude_host : 1, /* don't count in host */ > + exclude_guest : 1, /* don't count in guest */ > + > + __reserved_1 : 43; > We have exclude_hv a few lines up, so only exclude_guest is needed. -- error compiling committee.c: too many arguments to function