Received: by 2002:ac2:464d:0:0:0:0:0 with SMTP id s13csp2002609lfo; Sat, 28 May 2022 13:27:53 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzLJUVdaX+jq+62Xdcu1kO534W6Lth3eVGLXId2HkbgFzGpSo78LTbr2BDQhxh4W0nAyDCT X-Received: by 2002:a63:7c3:0:b0:3f6:5589:8ef0 with SMTP id 186-20020a6307c3000000b003f655898ef0mr39971415pgh.582.1653769673635; Sat, 28 May 2022 13:27:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1653769673; cv=none; d=google.com; s=arc-20160816; b=nn2ixS0tg3xEnJ5jjeFCQJt1Ybxpgf3uHiVZQLgueXeCWUifbs6HDC9zamjuv+mV75 6CVfboZnk2S8rLFE7t2vVh8gFtHzMsVSY4j4z5BeX0kParN4bil7cNf8rrnxvoZI8JeD t6qSPO6gmuqD7fc5F57peIB6HuGeQ8gqYZejwEoqg0mJJes74aL20bP5pI3cZfdGZq4j y/OCWEDWnIEH1/Y+gugMu5u0W/i96cCDY8LtgzYKexGWlGGTPQZ5Wit9TfUX6FMD3wyL 5P/iTsEFVjpcMVxjN/vXoPzS5mlsZyBmiEd/Vn/DFfJZtS/NqtIaSH1xa/yF59xC/ZPc pTCw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=59XIcUjGwbLq+K6MNIJJTnkKq5qHqOLgyE2R4H1Cs/k=; b=oqHQXqKkZTqs1XImCDI3XClhZ8oCV2mER2czgMuHfMvcZ4mJ9MYdOqS4X+YhvzBFH0 neq2w8Q6YKWsmFCnA11Js6Lg4tXeCJZRr7qareezfNeS26EHGDAqBjNCF6eCG5fdiD8R EPUR23KgR4LJDX5kZKP7z25wV6Lgvy+3Nbe6lX7burYD+2JQFpiVeL/dwGgYgZ3wtNE2 bElcBVr+L7UMEVwWqsHRioF1CGbjnu5+KJfFUVihFWuMh+Z7nPVVa55J3UkQcT4x9nO8 gpjqmnEsIbLrSTZI5Ww8Gd0n1j7clzbnl2DC4PXSIE2KaWGH4/VV6fUsvtTRVL72X5wn PZiA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=sRAE54i4; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id f7-20020a17090ace0700b001d8f3569fb9si6508155pju.165.2022.05.28.13.27.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 28 May 2022 13:27:53 -0700 (PDT) Received-SPF: softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=sRAE54i4; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 0DB5418FF26; Sat, 28 May 2022 12:34:41 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1345681AbiEZPZm (ORCPT + 99 others); Thu, 26 May 2022 11:25:42 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37756 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230033AbiEZPZk (ORCPT ); Thu, 26 May 2022 11:25:40 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7AA29BA9B9; Thu, 26 May 2022 08:25:39 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 9F03261C41; Thu, 26 May 2022 15:25:38 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 9323BC385A9; Thu, 26 May 2022 15:25:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1653578737; bh=Ku4hdE4QnTkWrQu5yxYySdeI4ksk3o3IHLc7K1VuUA4=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=sRAE54i401ZllZra/r8Zgo2GnB4Xst/GpO+HfIvYSf0CN+kzlUuuV3GGY8NO2kUbe SWpn4lZoXAO0EKJe137ViutbMO4PjkbqtoqQcnU03XsZxN4tgBkkuOCMpQqvGPTxpW s3NMPF9L1fFvAEMhAM9S8BU9PHskO6geqAn44bMwn2+9KgERXUH8ac+o+BrVVyLAxa OlvZolMTP/JJKHgPUZLIoouVmsENjU63URW5g8RoGaWkEI8BBqRFPBdRKOw3YCiHfs 5N8dxEeTJlss0eTSXkQ8DWZJZ5K4x/Z9r8mQXgOd+tY/PLM/CREuI43gUr1t3RqxLs WJStMBQUSvQhw== Received: by quaco.ghostprotocols.net (Postfix, from userid 1000) id 56F644036D; Thu, 26 May 2022 12:25:35 -0300 (-03) Date: Thu, 26 May 2022 12:25:35 -0300 From: Arnaldo Carvalho de Melo To: Ian Rogers Cc: zhengjun.xing@linux.intel.com, peterz@infradead.org, mingo@redhat.com, alexander.shishkin@intel.com, jolsa@redhat.com, linux-kernel@vger.kernel.org, linux-perf-users@vger.kernel.org, adrian.hunter@intel.com, ak@linux.intel.com, kan.liang@linux.intel.com Subject: Re: [PATCH] perf jevents: Fix event syntax error caused by ExtSel Message-ID: References: <20220525140410.1706851-1-zhengjun.xing@linux.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: X-Url: http://acmel.wordpress.com X-Spam-Status: No, score=-3.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI, RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE 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 Em Wed, May 25, 2022 at 07:27:08AM -0700, Ian Rogers escreveu: > On Wed, May 25, 2022 at 7:04 AM wrote: > > > > From: Zhengjun Xing > > > > In the origin code, when "ExtSel" is 1, the eventcode will change to > > "eventcode |= 1 << 21”. For event “UNC_Q_RxL_CREDITS_CONSUMED_VN0.DRS", > > its "ExtSel" is "1", its eventcode will change from 0x1E to 0x20001E, > > but in fact the eventcode should <=0x1FF, so this will cause the parse > > fail: > > > > # perf stat -e "UNC_Q_RxL_CREDITS_CONSUMED_VN0.DRS" -a sleep 0.1 > > event syntax error: '.._RxL_CREDITS_CONSUMED_VN0.DRS' > > \___ value too big for format, maximum is 511 > > > > On the perf kernel side, the kernel assumes the valid bits are continuous. > > It will adjust the 0x100 (bit 8 for perf tool) to bit 21 in HW. > > > > DEFINE_UNCORE_FORMAT_ATTR(event_ext, event, "config:0-7,21"); > > > > So the perf tool follows the kernel side and just set bit8 other than bit21. > > > > Fixes: fedb2b518239 ("perf jevents: Add support for parsing uncore json files") > > Signed-off-by: Zhengjun Xing > > Reviewed-by: Kan Liang > > Acked-by: Ian Rogers Thanks, applied. - Arnaldo