Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752624AbdHINSV (ORCPT ); Wed, 9 Aug 2017 09:18:21 -0400 Received: from ozlabs.org ([103.22.144.67]:55049 "EHLO ozlabs.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752170AbdHINSS (ORCPT ); Wed, 9 Aug 2017 09:18:18 -0400 From: Michael Ellerman To: Laurent Dufour , paulmck@linux.vnet.ibm.com, peterz@infradead.org, akpm@linux-foundation.org, kirill@shutemov.name, ak@linux.intel.com, mhocko@kernel.org, dave@stgolabs.net, jack@suse.cz, Matthew Wilcox , benh@kernel.crashing.org, paulus@samba.org, Thomas Gleixner , Ingo Molnar , hpa@zytor.com, Will Deacon Cc: linux-kernel@vger.kernel.org, linux-mm@kvack.org, haren@linux.vnet.ibm.com, khandual@linux.vnet.ibm.com, npiggin@gmail.com, bsingharora@gmail.com, Tim Chen , linuxppc-dev@lists.ozlabs.org, x86@kernel.org Subject: Re: [PATCH 13/16] perf: Add a speculative page fault sw events In-Reply-To: <1502202949-8138-14-git-send-email-ldufour@linux.vnet.ibm.com> References: <1502202949-8138-1-git-send-email-ldufour@linux.vnet.ibm.com> <1502202949-8138-14-git-send-email-ldufour@linux.vnet.ibm.com> User-Agent: Notmuch/0.21 (https://notmuchmail.org) Date: Wed, 09 Aug 2017 23:18:15 +1000 Message-ID: <87lgmsnalk.fsf@concordia.ellerman.id.au> MIME-Version: 1.0 Content-Type: text/plain Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 860 Lines: 28 Laurent Dufour writes: > Add new software events to count succeeded and failed speculative page > faults. > > Signed-off-by: Laurent Dufour > --- > include/uapi/linux/perf_event.h | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/include/uapi/linux/perf_event.h b/include/uapi/linux/perf_event.h > index b1c0b187acfe..fbfb03dff334 100644 > --- a/include/uapi/linux/perf_event.h > +++ b/include/uapi/linux/perf_event.h > @@ -111,6 +111,8 @@ enum perf_sw_ids { > PERF_COUNT_SW_EMULATION_FAULTS = 8, > PERF_COUNT_SW_DUMMY = 9, > PERF_COUNT_SW_BPF_OUTPUT = 10, > + PERF_COUNT_SW_SPF_DONE = 11, > + PERF_COUNT_SW_SPF_FAILED = 12, Can't you calculate: PERF_COUNT_SW_SPF_FAILED = PERF_COUNT_SW_PAGE_FAULTS - PERF_COUNT_SW_SPF_DONE ie. do you need a separate event for it? cheers