Received: by 2002:a05:6a10:f3d0:0:0:0:0 with SMTP id a16csp861609pxv; Thu, 1 Jul 2021 10:55:36 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwPhZEcbAGgFxP7GfDXsFqJrq5dUcgoWq+jAIs//PBXpARgA8J9CIL0Cz9yuKWz7QKCp73C X-Received: by 2002:a05:6e02:1c86:: with SMTP id w6mr441898ill.92.1625162136066; Thu, 01 Jul 2021 10:55:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1625162136; cv=none; d=google.com; s=arc-20160816; b=pusLziwUdv+7QuNbfffDcvng4PnMrjECTSeTh1e0sosjiNssRePhnMWHMDNDu/rLmO MsfzL8KLuigJJhZPJPWi8nf6Jq5pshL43dKrG0TKAMh7TeRk5k6rcI1kSA4TFHw8Sy4Y 6E8chbuIbniVW7MPiXlwdhRXHAIq5TPvCtILwVHIZd73cIPfSiF4uvuvbzRBtOxext73 ytnUajzq955+Ek5Sv+h7GGODvXOiGdMfBJQdRghxQTyQj903Mc6YrS/lGhPY+zsYh+7n lgDyOVtSa2rAVdN9fkXNw9fH40zKA+mfPgiTZN/BXlGAbINmzGyASNo2FZooY6lBe5ds lJhg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-language:content-transfer-encoding :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject; bh=j1QWvPWEO+qpSfozF6zRLrfrdm96h+D8bpLHYKPXS60=; b=i9uvnuY1F0abNFwces+jVb96f0EdppeNNWC5FeKHO/yhxdb7DbNe86QNQvnZsLjbou 1Re7M36gCZKfyFvut2LUvmejRlm5txCxurLaGdlDntxihZoPPC9Ta5zCnOAcIm49l3rE iJbpnBXAvflWfZ2UKFiu8Xz58ZK/0vmgJHhOYPO4wxVqdGwfOCgi4ldNQRd0U/u57/Di eEjeJbVn/BDeEe3WbN/dcFRBr4obxzGya3k2BKQPTsg5xUGSkwozwOuIf8QwduWrfypc /9ss2fBMbEbneP2DT4ZBzOgI293bG8ENYia9IVlKClAiMabZkjypTUgDwcjckPFiztqQ 3U6g== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id m22si632246jat.35.2021.07.01.10.55.22; Thu, 01 Jul 2021 10:55:36 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229967AbhGAR50 (ORCPT + 99 others); Thu, 1 Jul 2021 13:57:26 -0400 Received: from mga04.intel.com ([192.55.52.120]:41366 "EHLO mga04.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229844AbhGAR5Z (ORCPT ); Thu, 1 Jul 2021 13:57:25 -0400 X-IronPort-AV: E=McAfee;i="6200,9189,10032"; a="206763213" X-IronPort-AV: E=Sophos;i="5.83,315,1616482800"; d="scan'208";a="206763213" Received: from orsmga004.jf.intel.com ([10.7.209.38]) by fmsmga104.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 01 Jul 2021 10:54:54 -0700 X-IronPort-AV: E=Sophos;i="5.83,315,1616482800"; d="scan'208";a="558736562" Received: from akleen-mobl1.amr.corp.intel.com (HELO [10.209.122.16]) ([10.209.122.16]) by orsmga004-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 01 Jul 2021 10:54:54 -0700 Subject: Re: [PATCH] perf intel-pt: Add a config for max loops without consuming a packet To: Adrian Hunter , Arnaldo Carvalho de Melo Cc: Jiri Olsa , linux-kernel@vger.kernel.org References: <20210701175132.3977-1-adrian.hunter@intel.com> From: Andi Kleen Message-ID: Date: Thu, 1 Jul 2021 10:54:53 -0700 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.11.0 MIME-Version: 1.0 In-Reply-To: <20210701175132.3977-1-adrian.hunter@intel.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Content-Language: en-US Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 -Andi