Received: by 10.223.176.5 with SMTP id f5csp1352357wra; Wed, 31 Jan 2018 05:16:41 -0800 (PST) X-Google-Smtp-Source: AH8x227GCqEXLQiwS7hYRBsAQE35SNNZ6gM1AU53bvBSsXORJ3fpuCMC+ZqXFnjAPxJeyH2BEN+c X-Received: by 10.98.223.29 with SMTP id u29mr33639316pfg.166.1517404601128; Wed, 31 Jan 2018 05:16:41 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1517404601; cv=none; d=google.com; s=arc-20160816; b=Mcm7loQHLQA+bHblTGFxxV1KuUCxZhrPINnylWnxHkKN9GhfpoRjkjtrlUoAtxgTDB /i6T6Cf+vFqLAYDgPospyBx0qNheXteRFQklggSzUpvTvvWUgcK9K6ERfMrvT/IiPGjw YpMosN7Yf0EooUhzmX4sm2sQcC+lLMm1Vk5xpFoX1rXFlr4bS/qDMIf01TXshQzbnFHi tqnIuzD8ytB5RO/qmj44Esq6URCj2LhRfDIYj2oGczCLTMl+YWmpa7qLuDNFOIl2X+9L Az4oGhmpfG/6s/Y5RzaiLaeSd7nI3RS9yBOE4YMyM/u+Tri1Q18H7JfwXeg9m0RIGVwF MiiQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:arc-authentication-results; bh=Hw28TwfUbloTbiDwPDMgrxtzytX+BG9fYbEo5o/yYsc=; b=l8UE/OgSxTFwsdMbj2ylaIbMo+cDRGltvSxn64+E0Dxr9omV4GBkxCq26LkbtVIoS8 EmUinaOBMAvbcZv6BTm4mMap5tUk2PH638ZDSp+jWtsPXM7zvFa8KtVy29nbwPUYu+QS TVweOerM4IUdeDv/+L3AoJu679k8ZyMVIw6c4XVh+CgIxSVKgkxIl3RRKAHK1iLn6AmF gyY8DOEYXxAG2Lj2bN9ZJP6KejTY26PyQ3QXmeXCCZj7z7mh2f3PMw7LVuY8u8K9X1Oz S4X+8VRbSHovlmKiVyX773LnUQhDadsts/QWLdKhC8YDxlZRGSFBhBe/SJPmBSaWu81/ IqeA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id h7si3514226pgv.172.2018.01.31.05.16.26; Wed, 31 Jan 2018 05:16:41 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752532AbeAaNPK (ORCPT + 99 others); Wed, 31 Jan 2018 08:15:10 -0500 Received: from mx1.redhat.com ([209.132.183.28]:53276 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751587AbeAaNPJ (ORCPT ); Wed, 31 Jan 2018 08:15:09 -0500 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 155457487B; Wed, 31 Jan 2018 13:15:09 +0000 (UTC) Received: from krava (unknown [10.43.17.43]) by smtp.corp.redhat.com (Postfix) with SMTP id 679FB5C266; Wed, 31 Jan 2018 13:15:06 +0000 (UTC) Date: Wed, 31 Jan 2018 14:15:05 +0100 From: Jiri Olsa To: Andi Kleen Cc: Stephane Eranian , "Liang, Kan" , Peter Zijlstra , Ingo Molnar , LKML , Arnaldo Carvalho de Melo , Thomas Gleixner Subject: Re: [PATCH V3 0/5] bugs fix for large PEBS mmap read and rdpmc read Message-ID: <20180131131505.GB31614@krava> References: <20180130133917.GC29098@krava> <6d708c09-52a7-a906-b651-b133a7b4f189@linux.intel.com> <20180130150454.GE29098@krava> <35090c62-466a-aec8-b1a3-69def959c1c6@linux.intel.com> <24210bcb-0e4b-58fe-bcda-da30019f6e7e@linux.intel.com> <20180130185212.GA16806@krava> <20180131035941.GW26209@tassilo.jf.intel.com> <20180131091539.GA3313@krava> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180131091539.GA3313@krava> User-Agent: Mutt/1.9.1 (2017-09-22) X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.26]); Wed, 31 Jan 2018 13:15:09 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Jan 31, 2018 at 10:15:39AM +0100, Jiri Olsa wrote: > On Tue, Jan 30, 2018 at 07:59:41PM -0800, Andi Kleen wrote: > > > Still, the part I am missing here, is why asking for > > > PERF_SAMPLE_PERIOD voids large PEBS. > > > > I think it was disabled together with frequency mode > > (which we could support too, but it's a bit more work) > > > > But yes PERIOD could probably be allowed. > > looks like it's just a matter of adding PERF_SAMPLE_PERIOD > into PEBS_FREERUNNING_FLAGS, we already populate period > in setup_pebs_sample_data > > jirka > > > --- > diff --git a/arch/x86/events/perf_event.h b/arch/x86/events/perf_event.h > index 8e4ea143ed96..78f91ec1056e 100644 > --- a/arch/x86/events/perf_event.h > +++ b/arch/x86/events/perf_event.h > @@ -93,7 +93,8 @@ struct amd_nb { > PERF_SAMPLE_ID | PERF_SAMPLE_CPU | PERF_SAMPLE_STREAM_ID | \ > PERF_SAMPLE_DATA_SRC | PERF_SAMPLE_IDENTIFIER | \ > PERF_SAMPLE_TRANSACTION | PERF_SAMPLE_PHYS_ADDR | \ > - PERF_SAMPLE_REGS_INTR | PERF_SAMPLE_REGS_USER) > + PERF_SAMPLE_REGS_INTR | PERF_SAMPLE_REGS_USER | \ > + PERF_SAMPLE_PERIOD) seems to work, getting large PEBS event for following command line: perf record -e cycles:P -c 100 --no-timestamp -C 0 --period jirka