From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-10.4 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,NICE_REPLY_A, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id E849BC433DB for ; Thu, 4 Feb 2021 15:29:16 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id A963664F45 for ; Thu, 4 Feb 2021 15:29:16 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237320AbhBDP25 (ORCPT ); Thu, 4 Feb 2021 10:28:57 -0500 Received: from mga01.intel.com ([192.55.52.88]:24041 "EHLO mga01.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237317AbhBDP0w (ORCPT ); Thu, 4 Feb 2021 10:26:52 -0500 IronPort-SDR: 1LlXnT1jrvWEBpEt8HxvonWCAmKknLkNJl6e+Fc7Hr/C857Uj8IrLIbe5Z1WKpiJxiNe37SZ3U YvmLYPStUvBw== X-IronPort-AV: E=McAfee;i="6000,8403,9884"; a="200251273" X-IronPort-AV: E=Sophos;i="5.79,401,1602572400"; d="scan'208";a="200251273" Received: from fmsmga007.fm.intel.com ([10.253.24.52]) by fmsmga101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 04 Feb 2021 07:24:55 -0800 IronPort-SDR: Z8sdaE1QS709wO454yZZVYcAe6h5P1bSghd+mysQDaQCEsDnnBICWneShtHNItKIuuhQhDrrK2 NPfI5XzkbzKw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.79,401,1602572400"; d="scan'208";a="356560440" Received: from linux.intel.com ([10.54.29.200]) by fmsmga007.fm.intel.com with ESMTP; 04 Feb 2021 07:24:55 -0800 Received: from [10.251.24.66] (kliang2-MOBL.ccr.corp.intel.com [10.251.24.66]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by linux.intel.com (Postfix) with ESMTPS id 2C3B258087A; Thu, 4 Feb 2021 07:24:54 -0800 (PST) Subject: Re: [PATCH V3 1/5] perf/core: Add PERF_SAMPLE_WEIGHT_STRUCT To: Namhyung Kim Cc: Peter Zijlstra , Arnaldo Carvalho de Melo , Ingo Molnar , linux-kernel , Stephane Eranian , Jiri Olsa , Andi Kleen , Yao Jin , Michael Ellerman , maddy@linux.vnet.ibm.com References: <1611873611-156687-1-git-send-email-kan.liang@linux.intel.com> <1611873611-156687-2-git-send-email-kan.liang@linux.intel.com> From: "Liang, Kan" Message-ID: <4723a1de-9caa-e192-7b0d-8aced00b8f50@linux.intel.com> Date: Thu, 4 Feb 2021 10:24:53 -0500 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.7.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2/4/2021 9:00 AM, Namhyung Kim wrote: > Hi Kan, > > On Sat, Jan 30, 2021 at 2:25 AM Liang, Kan wrote: > [SNIP] >> diff --git a/include/uapi/linux/perf_event.h >> b/include/uapi/linux/perf_event.h >> index b15e344..c50718a 100644 >> --- a/include/uapi/linux/perf_event.h >> +++ b/include/uapi/linux/perf_event.h >> @@ -145,12 +145,14 @@ enum perf_event_sample_format { >> PERF_SAMPLE_CGROUP = 1U << 21, >> PERF_SAMPLE_DATA_PAGE_SIZE = 1U << 22, >> PERF_SAMPLE_CODE_PAGE_SIZE = 1U << 23, >> + PERF_SAMPLE_WEIGHT_STRUCT = 1U << 24, >> >> - PERF_SAMPLE_MAX = 1U << 24, /* non-ABI */ >> + PERF_SAMPLE_MAX = 1U << 25, /* non-ABI */ >> >> __PERF_SAMPLE_CALLCHAIN_EARLY = 1ULL << 63, /* non-ABI; internal use */ >> }; >> >> +#define PERF_SAMPLE_WEIGHT_TYPE (PERF_SAMPLE_WEIGHT | >> PERF_SAMPLE_WEIGHT_STRUCT) > > I'm not sure you want to expose it in the uapi header as it's not > intended to be used IMHO. > I'm not sure I understood, but it's indeed used in the tool patch set. https://lore.kernel.org/lkml/1612296553-21962-6-git-send-email-kan.liang@linux.intel.com/ Thanks, Kan