Received: by 2002:ab2:6203:0:b0:1f5:f2ab:c469 with SMTP id o3csp2665429lqt; Mon, 22 Apr 2024 19:07:02 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUiCN0OQBkx16oRW9HvSzALB4E248gz/5ydmrqvtGwZVBLk0BWA000SwjOiJufsOAX7PiJcUIfdCuDGtJB8x66JJxKBI08x+KLXd4hd0w== X-Google-Smtp-Source: AGHT+IFv6N5vKwmG+bKO850MU4tgAedoIrVcq00HKAl29AvZhhglnJP+tj9WRWjrnLDd51OT6LxM X-Received: by 2002:a05:620a:2148:b0:78e:c0de:575f with SMTP id m8-20020a05620a214800b0078ec0de575fmr15160253qkm.23.1713838022431; Mon, 22 Apr 2024 19:07:02 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1713838022; cv=pass; d=google.com; s=arc-20160816; b=SmSbXU8t6ZQh411FxHEVpxsPwfdLD5+GDqR/FlGpX62k8QWtSpSK3QjUF9UcwK7oeY YmwwhFmMvT+ZsPJ7MYQweanykT+J+sJqeNPGk8wk/MBQDH3oDd7RjehK7XT5mBW6pmAf zcivf2E3LSI8WhmTtNmzpUuDtvI8cnCTiotHa2pKArWorRUnT8msSXgtVEWq4/rV0nt7 VS4qzuyX7mJUc/VsTD4TfrdZBLgtGNBIZfE2d4UEdRDizxyaMgZVA5EX9yfw46mtvnQ/ /u+XBVOg08I8hZzROqO7jUdV2gCL7Da84HusKAxfN9fIKTAK5buN8Fs8MYOocdMdVQ2+ Y4JA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:date:subject:cc:to :from:dkim-signature; bh=Nz8WYTwLYzTzLZQQzJUP4zZA2OL+XiLuasZgK8qytqs=; fh=fHhbvXgCev/wpffLVpfaAi8pPyv7hrTyhVPgsZ7HNrs=; b=zp2hMUs2P3m8JAUbTNR3cKPzK9a9pTXCHZsNqoGpmQ0FKT7EECQMM2WKk1cz1O/Cbj fUaXMLn17cItfQYyNuyPAEshxviprwNsbEmqRrIZwULe55Jy4PCyjyJj298C1sADpUHv R9wPx/N0Lc40XM/413I5RdyJCuzhB92AyGd8m7oCnW8ueNLMKL2a36xGnaig+nCT5EFM 6cYTH0C+IrEBXgraQqAyxBxgvnJc7zQwniW7dLKz3+d0G4AvuR28DDltu+vqYODPPsYA F2G7/CZfxDHV5eHBRUiB1dtSe0JeMuBhgl1b5RWwGJwWWDMxTuYXi8fF0XK9me6lOl1R KQrg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=KlIRpWs8; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-154411-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-154411-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id xx20-20020a05620a5d9400b0078eec5fc864si11757558qkn.58.2024.04.22.19.07.02 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 22 Apr 2024 19:07:02 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-154411-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=KlIRpWs8; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-154411-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-154411-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 04C371C214A7 for ; Tue, 23 Apr 2024 02:06:54 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id E7F9D175BE; Tue, 23 Apr 2024 02:06:45 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="KlIRpWs8" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 11DB718032; Tue, 23 Apr 2024 02:06:44 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713838005; cv=none; b=EcpFhBTBRqywlTRJwDd8yufQPQGWxXRG9owZNX5jmKcT0V7wI+XmF2R+vCDsQBDhlB2Xm6IL0mL8t+6BWX1XU6w+Tczi1BZz3bk7P+mDrKFm5CXcpn6M5U9JgWEtTPwqnFD2PRI1wDhsFcY6GAgBp+/1ZoLu8Gqw+bsmDRp2I4A= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713838005; c=relaxed/simple; bh=ogXRlyQDF48jL0NCQeA7zQfgTa3D/mdWfZ5ATMLTBV8=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=B1XrwHKT9VE7mzmggSIGAGLG50FKs3Hxbl9Q5d9XXQUAzFfgw1cn6tePjG2rQOkYV6ch1a71WSpLIZR50x5VBz+yxtgLaOaLhqx+DVPyPrSuSCAuYKG2zWfG6uAmZyuJ2ROPY0BaSPhaQUOpxBF9Jc1l+qbq+85FATvihtRrjwg= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=KlIRpWs8; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 5B436C113CC; Tue, 23 Apr 2024 02:06:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1713838004; bh=ogXRlyQDF48jL0NCQeA7zQfgTa3D/mdWfZ5ATMLTBV8=; h=From:To:Cc:Subject:Date:From; b=KlIRpWs8HMZS1zu3PjcrT0eMLFS54U3HXCKasC8tEnk/ifQWO/WMGkCYnf+XyyL7R xALt7J9HQxbco4yBtwciRG13nKFTTtPps5ga4LUaanYdcv30YnmtVS7SBjk01eLuYY KShj4vtgGUHwkvszqRqcuQ6Y88y0I1v+EJsYj0Elg+fjHpa/ffEegmunv+Pb4YXmX+ 1X0oEi2sbVc8yjILA9zD+lvHZtA2A8LPHh5wPwI+RRFH6CvUvrBuqaNjXWMGxngLbh TxOcz4+4QTes6FTkJWRQ9FVuyi1euvFQpQGNmGZcYSV7mrT0RIIK6uUkz2OjjJoM6T AnkYwakdvlkfA== From: Namhyung Kim To: Arnaldo Carvalho de Melo , Ian Rogers , Kan Liang Cc: Jiri Olsa , Adrian Hunter , Peter Zijlstra , Ingo Molnar , LKML , linux-perf-users@vger.kernel.org Subject: [PATCH] perf annotate: Fix data type profiling on stdio Date: Mon, 22 Apr 2024 19:06:43 -0700 Message-ID: <20240423020643.740029-1-namhyung@kernel.org> X-Mailer: git-send-email 2.44.0.769.g3c40516874-goog Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit The loop in hists__find_annotations() never set the 'nd' pointer to NULL and it makes stdio output repeating the last element forever. I think it doesn't set to NULL for TUI to prevent it from exiting unexpectedly. But it should just set on stdio mode. Fixes: d001c7a7f473 ("perf annotate-data: Add hist_entry__annotate_data_tui()") Signed-off-by: Namhyung Kim --- tools/perf/builtin-annotate.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/perf/builtin-annotate.c b/tools/perf/builtin-annotate.c index 6f7104f06c42..83812b9d5363 100644 --- a/tools/perf/builtin-annotate.c +++ b/tools/perf/builtin-annotate.c @@ -491,7 +491,7 @@ static void hists__find_annotations(struct hists *hists, return; } - if (next != NULL) + if (use_browser == 0 || next != NULL) nd = next; continue; -- 2.44.0.769.g3c40516874-goog