Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753270Ab3H1Nxv (ORCPT ); Wed, 28 Aug 2013 09:53:51 -0400 Received: from mail-oa0-f48.google.com ([209.85.219.48]:59859 "EHLO mail-oa0-f48.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752499Ab3H1Nxu (ORCPT ); Wed, 28 Aug 2013 09:53:50 -0400 MIME-Version: 1.0 In-Reply-To: References: <20130826131121.GA26224@quad> <521BD4F8.5050504@gmail.com> <20130828132703.GD3825@infradead.org> Date: Wed, 28 Aug 2013 15:53:50 +0200 Message-ID: Subject: Re: [PATCH] perf mem: add priv level filtering support From: Stephane Eranian To: Arnaldo Carvalho de Melo Cc: David Ahern , LKML , Peter Zijlstra , "mingo@elte.hu" , Sukadev Bhattiprolu , Jiri Olsa , "ak@linux.intel.com" Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2442 Lines: 67 Arnaldo, So I just checked perf top and those 2 options are doing user level filtering of the samples. This is different from what I want which is hardware level filtering if avail. On Wed, Aug 28, 2013 at 3:38 PM, Stephane Eranian wrote: > On Wed, Aug 28, 2013 at 3:27 PM, Arnaldo Carvalho de Melo > wrote: >> Em Mon, Aug 26, 2013 at 04:21:44PM -0600, David Ahern escreveu: >>> On 8/26/13 7:11 AM, Stephane Eranian wrote: >> >>> >This patch adds the -u -and -k options to perf to allow >>> >filtering of load/store sampling based on priv levels. >>> >This may not be supported by all HW platforms. >> >> >>> >+++ b/tools/perf/Documentation/perf-mem.txt >>> >+-k:: >>> >+ Only sample loads/stores at the user level (default: user + kernel) >>> >+-u:: >>> >+ Only sample loads/stores at the kernel level (default: user + kernel) >> >>> Are the descriptions backwards? In the commit message yuo have -u >>> means user level and -k means kernel level; the help message here >>> seems backwards. >> >> Looks like it is reversed, yes. >> >>> >+ OPT_BOOLEAN('u', "user-level", &mem.user, "include user-level accesses"), >>> >+ OPT_BOOLEAN('k', "kernel-level", &mem.kernel, "include kernel-level accesses"), >> >> And its not clear to say that using -u will _exclude_ kernel samples, >> just that it includes user samples, perf top has: >> >> -K, --hide_kernel_symbols hide kernel symbols >> -U, --hide_user_symbols hide user symbols >> >> So perhaps we should change both to (and add this to 'report' as well): >> >> -U, --hide_kernel_symbols hide kernel symbols >> -K, --hide_user_symbols hide user symbols >> > > Well, I don't know what perf top does here but I don't want to hide > the samples. I simply don't want to collect them (do not appear > in the perf.data file). If that's what is happening in perf top, then > I'll be glad to use the same options. > > >> To state that: >> >> perf top -K >> and >> perf top --hide_user_symbols >> >> Are equivalent and asks for 'kernel only' samples, like it seems its the >> intent (filtering) of Stephane here, and seems to clarify things? >> >> - Arnaldo -- 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/