From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Ahern Subject: Re: [PATCH 3/3] KVM: perf: kvm events analysis tool Date: Mon, 20 Feb 2012 21:58:29 -0700 Message-ID: <4F432475.4090903@gmail.com> References: <4F338CAA.10807@linux.vnet.ibm.com> <4F338D56.6010505@linux.vnet.ibm.com> <4F42DB8D.7060900@gmail.com> <4F43150F.7010902@linux.vnet.ibm.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Cc: Arnaldo Carvalho de Melo , Avi Kivity , Marcelo Tosatti , Ingo Molnar , LKML , KVM To: Xiao Guangrong Return-path: In-Reply-To: <4F43150F.7010902@linux.vnet.ibm.com> Sender: linux-kernel-owner@vger.kernel.org List-Id: kvm.vger.kernel.org On 2/20/12 8:52 PM, Xiao Guangrong wrote: >>> + /* Both begin and end events did not get the key. */ >>> + if (!event&& key->key == INVALID_KEY) >>> + return; >>> + >> Should not be able to get here with event unset, so the next 2 lines should not be needed. ie., you only want to process events where the begin event was seen in which case event is defined. > > > In some case, the 'begin event' just records the start timestamp, the actually event > is recognised in the 'end event'. > > Take mmio-read for example, in the old kernel, we use kvm-exit as the 'begin event' > and kvm_mmio(KVM_TRACE_MMIO_READ...) is the 'end event'. ah, ok. Please add a comment about this path. David