Received: by 2002:a05:6602:2086:0:0:0:0 with SMTP id a6csp4396363ioa; Wed, 27 Apr 2022 02:58:46 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxYnkBjEe1giO133GYDvhX9OqKo6zEDnFBuokUjXKaMuko3wAiOxEc+VoRmlgj+psNwGvot X-Received: by 2002:aa7:9522:0:b0:4e1:d277:ce8 with SMTP id c2-20020aa79522000000b004e1d2770ce8mr28940305pfp.16.1651053526293; Wed, 27 Apr 2022 02:58:46 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1651053526; cv=pass; d=google.com; s=arc-20160816; b=S6DJICrAI0ekc/O4F/Ow8P6fPR20aj+/Idfay/kDwOEbnP4NppR+GGsuXMPp09rCIP JTX6rLeZiyHMZNr1+uiTrF1qg7WDJKJDJ1qqKCut9zu7SEs2lz4gpA9G2xx/KH80N4sl 9khRXjG+SNH0LW3dmctmn7mg32vKiNvT9E8wzz68tsYNEHb0NNR/XlDEm8euPij9PY2R TGW8dozB0v0RU7n4yCuq+ReMLKX1ukkD3ASJO3IPdKXUHwTFS554DRoWIg8q10ly9pTs XKgWm/WBuNjRBsgU5kezAwLQuGX1tjzv5z4PaTa4WuHgs2z7sQrECjQ0wB3p5yfmCpQO +1CQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:content-transfer-encoding :in-reply-to:from:references:cc:to:content-language:subject :user-agent:date:message-id:dkim-signature; bh=X1J3W3wMYB2rvKkujRKoXf8jkLDH55OmBK2fzAeArl0=; b=y39JZ9Cd9qh0khbgWgKHDZ4zAYQBvvDWwJcuNvzly1vLhfzQhWtJXOvwe+9lsMAU/E qj/b0Qvo3RP2FAM2+OtTYqLEyeoALDqXy/WttT/DNhJ0q/g+mgt643S95FO9pJAl2hN3 MuPFq/u1DD6ECBSpwHCmYS1PwWrDVRw46GLtozBUVT3MrHsWcQGCzYcsoaZ/HhrKBNn4 pBYpqPN1qP7OHAPZpzxMgK+5jeLQaDv54Tm29mcgTJQXIY+qqbVrqtK/q5oDvF8qTVr0 TN2DjhZtEi0mMuqTGUuaZpETp3hKQxO+bzFZujwMD62jMtf4nGgzfyzlwafSGmzw9Iuw z7Xw== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amd.com header.s=selector1 header.b=IyWkDHQm; arc=pass (i=1 spf=pass spfdomain=amd.com dkim=pass dkdomain=amd.com dmarc=pass fromdomain=amd.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=amd.com Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id e17-20020a056a001a9100b0050d476df702si947926pfv.167.2022.04.27.02.58.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 27 Apr 2022 02:58:46 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@amd.com header.s=selector1 header.b=IyWkDHQm; arc=pass (i=1 spf=pass spfdomain=amd.com dkim=pass dkdomain=amd.com dmarc=pass fromdomain=amd.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=amd.com Received: from out1.vger.email (out1.vger.email [IPv6:2620:137:e000::1:20]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 3A3172C99E8; Wed, 27 Apr 2022 02:27:12 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230457AbiDZNiZ (ORCPT + 99 others); Tue, 26 Apr 2022 09:38:25 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55452 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1351028AbiDZNiX (ORCPT ); Tue, 26 Apr 2022 09:38:23 -0400 Received: from NAM10-MW2-obe.outbound.protection.outlook.com (mail-mw2nam10on2040.outbound.protection.outlook.com [40.107.94.40]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A4407245BC; Tue, 26 Apr 2022 06:35:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Vpxws5yPHhKtG+2xU8S4VemUvWGUy54yOwO/8aPTwPzDckKI0ctPAsaLBh63p5tZ1+v6+BnziuYAiHL9mSAdaFjOGj2fN3Iy84drqT3OcQlTouNxLkPMW/3OuOV084yLSIscl/9WGJh2hhBFbyeF75WAomXME/YOXFoneUY0uCecJWlEX21Mem32uM2QNpQB5PLSfJjVvRRdEI3p6LfhNBCUsNbMsRloiwNi9uPfwKis04TjKrROLPENxJIphkxXqlkWulgO1O7n5JJ0X0JbDbE14LMwLb4btYLW8ventVCQYGp9I+drbLG8yrjhntCYVEbDykjWdi1kVBE5z35ihQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=X1J3W3wMYB2rvKkujRKoXf8jkLDH55OmBK2fzAeArl0=; b=IgOZb1iiiE3Vk9y8bIScppO/gCij3SnNzt6qcrqCeNlRDmgdarqHBBOkzEx9zdKbBMAgGYLU7WPwq7j8YTWegD4hb2cQhTxRJK8JBK1Ez2Pvq0laQt5VYFDzVXI5SQhFsaRXqNaEiX/xKAhGtKBHs9htyUI9gfhuTTHgkU3u6fxqPDYonQf4hTddb9U2dy4IqeLvSI05dLzZazqS7UpfchPitOKCxfne9ytiVidtnhWHh09u+YXz3IoKjazyWqe1+uS+gEdMg2UPYO18135gUv4HNObpSUl7kLWCb7DtjOkbj60DpyX8aPAg60uzgNAfFDC3bgpMs6nGR/RmmG95qQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=amd.com; dmarc=pass action=none header.from=amd.com; dkim=pass header.d=amd.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amd.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=X1J3W3wMYB2rvKkujRKoXf8jkLDH55OmBK2fzAeArl0=; b=IyWkDHQmVgdiolXJUuB/6PPeKJcpDgcjtMO7r2fQsevcmX21FND8kmucIPftl+81a0TfejfqmDk2Xb9WIiUL5aFqhUTeHX+3wIH7Og4GdLQwp2IfwOl+MH3BxmkSfKOPomu3BsryNUqc49GWajMyIHiMAYmOPO3ms616MFFv1+Y= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=amd.com; Received: from MN2PR12MB3053.namprd12.prod.outlook.com (2603:10b6:208:c7::24) by DM5PR12MB2520.namprd12.prod.outlook.com (2603:10b6:4:b9::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5186.14; Tue, 26 Apr 2022 13:35:11 +0000 Received: from MN2PR12MB3053.namprd12.prod.outlook.com ([fe80::6807:1261:8f60:2449]) by MN2PR12MB3053.namprd12.prod.outlook.com ([fe80::6807:1261:8f60:2449%7]) with mapi id 15.20.5186.021; Tue, 26 Apr 2022 13:35:11 +0000 Message-ID: <66d766e6-2bd2-55a9-5d08-2335b44c0886@amd.com> Date: Tue, 26 Apr 2022 19:04:56 +0530 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 Thunderbird/91.4.1 Subject: Re: [PATCH 5/6] perf/tool/amd/ibs: Support new IBS bits in raw trace dump Content-Language: en-US To: Robert Richter Cc: peterz@infradead.org, mingo@redhat.com, mark.rutland@arm.com, namhyung@kernel.org, tglx@linutronix.de, bp@alien8.de, irogers@google.com, yao.jin@linux.intel.com, james.clark@arm.com, leo.yan@linaro.org, kan.liang@linux.intel.com, ak@linux.intel.com, eranian@google.com, like.xu.linux@gmail.com, x86@kernel.org, linux-perf-users@vger.kernel.org, linux-kernel@vger.kernel.org, sandipan.das@amd.com, ananth.narayan@amd.com, kim.phillips@amd.com, santosh.shukla@amd.com, Ravi Bangoria , acme@kernel.org, jolsa@kernel.org References: <20220425044323.2830-1-ravi.bangoria@amd.com> <20220425044323.2830-6-ravi.bangoria@amd.com> From: Ravi Bangoria In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-ClientProxiedBy: PN2PR01CA0088.INDPRD01.PROD.OUTLOOK.COM (2603:1096:c01:23::33) To MN2PR12MB3053.namprd12.prod.outlook.com (2603:10b6:208:c7::24) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: ddc80e17-14ce-49a2-3af6-08da278995f9 X-MS-TrafficTypeDiagnostic: DM5PR12MB2520:EE_ X-Microsoft-Antispam-PRVS: X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: QsKJKLiEsoZi+nb2sx/dLLsFkV0fDIqu1ym9a6QtExGbP42nxjUEL206Jf2Pd+ecRTYAhuz4u923Q1QNNVwjPLsnArnAz9zfGx2VCZMqThVpQLoUIgs6tt4FBdrzOoBxwCxY5X2W4i3qFcV0LRIGCONz24YMANikulIrEBc5MyTT/nzaLyu/zNgfR2HbjtKCzFR6bf9GxpXI4eh2QtR1qWHBVwnIx2qCrIhUDwj3g+2WqgNhKnAIDeCsiLkti7Xer8GPSkfNHB5+EYDcFN/rAboBNktd60CbX8BxgJdUBoBpqDfscTTIfl/W9bCzcSDEzTZZg1LtLwuZvMqo3Jy8pxVcSBOqlScggFlgVPAZozMMsvD95y99P+460MMsBZmzQKm7b38xbgg8HE34Yk46JJslVhb0nhHwGrz7hJ116oEFHWYLoLLplKQLsM1LDRP8m8Ck6f20Xe/eaFZfvUAGt/xPZoZ5t+jCXm8DhzLP/ETnqTdVGwH/0NTIiv6pfzXy6RTiFQyogxbLAgY4Rywfpjzg5HpCnvLsR9naltGVA7SQd6p9vKz1o7lu7qglVJv1sgjkRCsZmH2bxszm0gvrjmrjj2XLcFUeqO0HWMxbOQVCu7MJDKEW9w91kdlx2RwpiliyLqh8K8uHkO0TNdCEoENe9TxOdBJa9PpAczGSJElRIceOOqbC9PIlDIeQW/FQJAu4gks0jCErsIfgVLnpqHVfoUrvPGUywdn66GTO7dY= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:MN2PR12MB3053.namprd12.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230001)(4636009)(366004)(53546011)(26005)(186003)(37006003)(6636002)(6506007)(6512007)(36756003)(31686004)(6486002)(508600001)(2616005)(5660300002)(86362001)(31696002)(316002)(38100700002)(2906002)(7416002)(6666004)(66946007)(6862004)(8676002)(66476007)(4326008)(8936002)(44832011)(66556008)(45980500001)(43740500002);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?a1UwT2R5TFdzZzI5M1dMVDVlSkdqdTRmS1p3UzBDUlk2YllyZVlWU3FRcFVX?= =?utf-8?B?dzBKN0lnbVpDcUtTS3NOdysreEFwaE9Cc2ljVjAvTlhReEYzK21hRUxndWEr?= =?utf-8?B?SHhGbWRnOEh5ZUpPMUVFcXlxLzNvVURrUXR5dFhlb2JQbUdtZW51VExSdEJp?= =?utf-8?B?WWM2YVdwKysxOHlSWnRXSHVqUUtwUXpF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lFGU1NFbGdrejNkV3U2T1BhTnAyN2FISS92b2kvOExhOWJnbUZ2?= =?utf-8?B?WmdxdEpsZ2tlRmc4VXJ6ZjhXWklWL3F1TXJFMnU5WFZINUxoZ0tuNFc0T3RH?= =?utf-8?B?QzVtWmZ6eldIaWxnd3Nkc2hBV2pnaEg5Q1N2VUQ3a0h2Sjg1TEdqYTUvdURD?= =?utf-8?B?eHVFcW1lTlhKRmdweWF6ZlIyTmJ4anNBa0tDdEhFcEoyajVKOW9lKzdUUzAx?= =?utf-8?B?cGlNUlhkdWpnQTZqV1E2Y3lyZkNZUkdSWHROekF3V2dQSUZ0cjd6Z1dCbzd5?= =?utf-8?B?dnZ3SjBIcDlGY0xqME5ubk9Jc3lqSlVBT0hQVlZNa0hMbUE0ODh4UT09?= X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-Network-Message-Id: ddc80e17-14ce-49a2-3af6-08da278995f9 X-MS-Exchange-CrossTenant-AuthSource: MN2PR12MB3053.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 26 Apr 2022 13:35:11.1331 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: 9USBUKWvM78uXMQ52uwV780Yczf7wQgnkcZJRIhB2euBs4vYfBl2t5tSS/RGzytAEqdyJ5McvJl2IBUfs3IcyA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM5PR12MB2520 X-Spam-Status: No, score=-3.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,NICE_REPLY_A,RDNS_NONE,SPF_HELO_NONE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 26-Apr-22 4:57 PM, Robert Richter wrote: > On 25.04.22 10:13:22, Ravi Bangoria wrote: > >> @@ -71,11 +74,12 @@ union ibs_op_data { >> union ibs_op_data2 { >> __u64 val; >> struct { >> - __u64 data_src:3, /* 0-2: data source */ >> + __u64 data_src_lo:3, /* 0-2: data source low */ >> reserved0:1, /* 3: reserved */ >> rmt_node:1, /* 4: destination node */ >> cache_hit_st:1, /* 5: cache hit state */ >> - reserved1:57; /* 5-63: reserved */ >> + data_src_hi:2, /* 6-7: data source high */ >> + reserved1:56; /* 8-63: reserved */ > > Good catch, bit 63 was not defined before. Thanks! > >> }; >> }; > >> @@ -279,6 +328,9 @@ bool evlist__has_amd_ibs(struct evlist *evlist) >> pmu_mapping += strlen(pmu_mapping) + 1 /* '\0' */; >> } >> >> + if (perf_env__find_pmu_cap(env, 0, "ibs_op", "zen4_ibs_extensions")) >> + zen4_ibs_extensions = 1; >> + > > This caps check should be moved to ibs_op and ibs_fetch pmu specific > code. Use the env of the specific pmu respectively in the sample > decoding. IIRC, we don't populate perf_pmu at 'perf report' time as we might not be running 'perf report' on the same machine or even same arch. Thanks for the review, Ravi