Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1759297Ab2JSP6N (ORCPT ); Fri, 19 Oct 2012 11:58:13 -0400 Received: from mail-lb0-f174.google.com ([209.85.217.174]:49464 "EHLO mail-lb0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752081Ab2JSP6L (ORCPT ); Fri, 19 Oct 2012 11:58:11 -0400 MIME-Version: 1.0 In-Reply-To: <20121019154958.GY2095@tassilo.jf.intel.com> References: <1350658326-14715-1-git-send-email-eranian@google.com> <1350658326-14715-3-git-send-email-eranian@google.com> <20121019154958.GY2095@tassilo.jf.intel.com> Date: Fri, 19 Oct 2012 17:58:09 +0200 Message-ID: Subject: Re: [PATCH 2/2] perf: SNB exclusive PMU access for INST_RETIRED:PREC_DIST From: Stephane Eranian To: Andi Kleen Cc: LKML , Peter Zijlstra , "mingo@elte.hu" , Arnaldo Carvalho de Melo , Jiri Olsa Content-Type: text/plain; charset=UTF-8 X-System-Of-Record: true Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 901 Lines: 23 On Fri, Oct 19, 2012 at 5:49 PM, Andi Kleen wrote: >> + /* >> + * for INST_RETIRED.PREC_DIST to work correctly with PEBS, it must >> + * be measured alone on SNB (exclusive PMU access) as per Intel SDM. >> + */ >> + if ((cfg & INTEL_ARCH_EVENT_MASK) == 0x01c0 && !event->attr.exclusive) { >> + pr_info("perf: INST_RETIRED.PREC_DIST only works in exclusive mode\n"); >> + return -EINVAL; >> + } > > > Strictly you have to check for precise too, right? > Yes, the restriction is enforced only when PEBS is active and this is what I do based on where pebs_aliases() is called. > -Andi -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/