Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933922Ab2JXMvT (ORCPT ); Wed, 24 Oct 2012 08:51:19 -0400 Received: from mga01.intel.com ([192.55.52.88]:2086 "EHLO mga01.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932517Ab2JXMvR (ORCPT ); Wed, 24 Oct 2012 08:51:17 -0400 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="4.80,639,1344236400"; d="scan'208";a="237564021" Date: Wed, 24 Oct 2012 05:41:14 -0700 From: Andi Kleen To: Stephane Eranian Cc: "Yan, Zheng" , LKML , Peter Zijlstra Subject: Re: [PATCH V2 6/7] perf, x86: Use LBR call stack to get user callchain Message-ID: <20121024124114.GV2095@tassilo.jf.intel.com> References: <1351058350-9159-1-git-send-email-zheng.z.yan@intel.com> <1351058350-9159-7-git-send-email-zheng.z.yan@intel.com> <5087CF96.7010406@intel.com> <5087D678.1080905@intel.com> <20121024123124.GU2095@tassilo.jf.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1045 Lines: 27 > But isn't the whole point of the patch to hide LBR cstack from users so they > won't know they're using it for user cstack? The point of the patch is to get user backtraces where you can't get them today. > > To disable it in sysfs, I need to know it's being used in the first place. You can always disable unconditionally it if you want to use LBR. > I think in x86_pmu_hw_config(), you could simply check the priv level > restrictions on the event. If exclude_user is set, then don't active LBR cstack > and that's it. That's what I was trying to get to... Ok that sounds reasonable. Yes it only makes sense for user sampling currently. However the restriction may be fixed at some point, then it could be also used for the kernel. -Andi -- ak@linux.intel.com -- Speaking for myself only -- 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/