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=-12.4 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,INCLUDES_CR_TRAILER,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS 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 79610C07E95 for ; Wed, 7 Jul 2021 14:41:36 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 5300561C6C for ; Wed, 7 Jul 2021 14:41:36 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232091AbhGGOoP (ORCPT ); Wed, 7 Jul 2021 10:44:15 -0400 Received: from mail.kernel.org ([198.145.29.99]:56310 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232052AbhGGOoO (ORCPT ); Wed, 7 Jul 2021 10:44:14 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id BBC3F61C37; Wed, 7 Jul 2021 14:41:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1625668893; bh=HQp6d+sJagEWzQXUtAZhynOsjRq/W3BSJzdzYV76BRk=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=u0uNP3u5ABj5FNTrVaBngry64NdwHGSA1bHzKWE9F2+3tggDXixTXpu8/a7fLxqNm PqfKstQAfhs1fyoiqqInoO8PXkbzjeFJ6gXJsi92Ie3Nz/Rr/z4m5pD5CrfOQPChjV aOeVidx1wyARLu80EBkizPXOkfofS8MGF9iipUdxztyIzRXv3Xfz6Dguc7kiSMzx56 487ahrDwQwraRFwTl0jy558MHbqCgnkCjlErqkUCp+nFEGfG1jrCBS6XdUwawE0vNU T4zdh+lVbNUJR1xa1bwGwNfr/HZuDERb7IKSVLuoyePPN9oz3l6O0ICb+a1aAAC4D1 MIAJNGsjU8dBw== Received: by quaco.ghostprotocols.net (Postfix, from userid 1000) id 3167B40B1A; Wed, 7 Jul 2021 11:41:31 -0300 (-03) Date: Wed, 7 Jul 2021 11:41:31 -0300 From: Arnaldo Carvalho de Melo To: Andi Kleen Cc: Adrian Hunter , Jiri Olsa , linux-kernel@vger.kernel.org Subject: Re: [PATCH] perf intel-pt: Add a config for max loops without consuming a packet Message-ID: References: <20210701175132.3977-1-adrian.hunter@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Url: http://acmel.wordpress.com Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Em Thu, Jul 01, 2021 at 10:54:53AM -0700, Andi Kleen escreveu: > > On 7/1/2021 10:51 AM, Adrian Hunter wrote: > > The Intel PT decoder limits the number of unconditional branches (e.g. > > jmps) decoded without consuming any trace packets. Generally, a loop > > needs a conditional branch which generates a TNT packet, whereas a > > "ret" instruction will generate a TIP or TNT packet. So exceeding > > the limit is assumed to be a never-ending loop, which can happen if > > there has been a decoding error putting the decoder at the wrong place in > > the code. > > > > Up until now, the limit of 10000 has been enough but some analytic > > purposes have been reported to exceed that. > > > > Increase the limit to 100000, and make it configurable via perf config > > intel-pt.max-loops. Also amend the "Never-ending loop" message to > > mention the configuration entry. > > > > Signed-off-by: Adrian Hunter > > > Thanks. That is useful. > > > Reviewed-by: Andi Kleen Thanks, applied. - Arnaldo