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:45:27 +0300 Message-ID: <4DCA76D7.2010608@redhat.com> References: <1305038132-5080-1-git-send-email-joerg.roedel@amd.com> <1305038132-5080-2-git-send-email-joerg.roedel@amd.com> <4DCA76A5.7030000@redhat.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]:29827 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752451Ab1EKPgo (ORCPT ); Wed, 11 May 2011 11:36:44 -0400 In-Reply-To: <4DCA76A5.7030000@redhat.com> Sender: kvm-owner@vger.kernel.org List-ID: On 05/11/2011 02:44 PM, Avi Kivity wrote: > 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. > Well, actually, that depends on the meaning of exclude_hv. -- error compiling committee.c: too many arguments to function