Received: by 2002:a05:7412:1e0b:b0:fc:a2b0:25d7 with SMTP id kr11csp1157954rdb; Fri, 16 Feb 2024 07:06:05 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCWFWL1tiE3INT+C467Izqyf50lAd7HtluKy6AEradQO7MkxBIwciWfKWHNtmhZmKUzi+7AU//mgg2oRy6g71CgoOtr6+3m+TbawuPjkVA== X-Google-Smtp-Source: AGHT+IHVoe10McYz66CLYryWzQJS1BNeVWZiJ8R8kIv5wvyqsYceWTfMdjmQlxzRpgIc2wTIgBM0 X-Received: by 2002:a17:902:9347:b0:1db:95f0:4876 with SMTP id g7-20020a170902934700b001db95f04876mr3902999plp.68.1708095965196; Fri, 16 Feb 2024 07:06:05 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708095965; cv=pass; d=google.com; s=arc-20160816; b=BZ6nSquNanBBNrqowjPQgaMjtkhK0md5VRY2bSWccaz7BiVtX/P5xGvVCTh6ot1EsI y+fcyzpW1LLPItK6bRGpEEHbjvVu7pX2U4ByDBrMej5DS0AteU34mqkuS0LoSNOQ5v26 4idvD/uMqiuFidlYFsk1Bl9jrtz2hwE73/EPJ8o8uyE8V70Hj5D03u/E0HjxFG9JP5mV bhQRWu3BPiNsAbv7FGwShYWjtzgzO3TY1DrcpXyh5mJyrmC5m+SIEVnTuQfNXVcdqC5U /8LdAhbRfX1y7Sz1FZ+i8MWO0MG2bJKP/fZrVfm1gGN8S6V+9JNBAhz6Jxzfi9PW6m9x QaxQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:list-unsubscribe:list-subscribe:list-id:precedence :references:message-id:subject:cc:to:from:date:dkim-signature; bh=oQDsz+Tzt4imBq2jRPPIEGg4xwUNZLhbp9S80W67U3M=; fh=hp28wa5mwda8mL3AirDFQorIE9ARQzQrWsVK5TJd4ZU=; b=jyxQoCC/El9VkTeH4rPeYFD90yN8d6mzWMz+QYjwuy0hqyqd5NBI4ZWqFpwvTzaq1o A3w/+kJ4YuomZuXdPkHBUx2MlqGjfFiUcFoVgKdCw1oiKDtu+FsG1RJVV50Bc/jpXw0E Lkq30UMXE3tezYcJp7mM4Rb5/QDN8hpidGRFJuXRf4lA6tOiY0QfiZLe2sPbiBkoaoZ2 OzTjTXfWrxmhRgh1ec7UmJ2QFeQOYPTfkBoWVgBzNu6LS2wjBnfEV/tXin92h8HToCCS I98QAAlg65T2cGu9raK69JziWK4ii0rL+HcmMDMu5+p2qmVVhgZ9Zk19LZoh7gTlSVr4 I5fw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=ON17NlzR; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-68770-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-68770-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id m187-20020a6326c4000000b005dbe2220330si17340pgm.171.2024.02.16.07.06.04 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 16 Feb 2024 07:06:05 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-68770-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=ON17NlzR; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-68770-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-68770-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 sv.mirrors.kernel.org (Postfix) with ESMTPS id 472FA28AC96 for ; Fri, 16 Feb 2024 14:57:44 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id F37D012F37E; Fri, 16 Feb 2024 14:57:36 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="ON17NlzR" 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 215061292F4; Fri, 16 Feb 2024 14:57:35 +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=1708095456; cv=none; b=eQywxlq7oWvXVG4Vgswb2Nc4DBrXDcc2R1IS8ChARzfGnDVZY35FLGBm+FEgj4coYawRnBUHQmAEcKLiIM2gpV93S3Fl15tJjFrXTvAHPKAjtECGffvyeTJd26iYOa2D6kqT5Q8+GP9+tt5T4RlMkoEJUs0HZl0nd22d6QirsrU= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708095456; c=relaxed/simple; bh=bYPWSFzizc6hw98vYyVTqVDrmSgriMmL7bU5ekFvWl0=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=fe0h17EyiSYFJ7/kmQehEdF39iC2Apconl5r+XVWHGh/5hgK1KWLd1D5A22HTxpvuAQgt0fFtA4u2RAASq8e/uLzjOtYgvmBjFkC4RbYTCDDdHBSlZ//xK9i72YFM+Gf/vBytGbQ5ml7+QIYHMbkTc1O4N3jvRj0ToFlOiYud8Q= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=ON17NlzR; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 4D25FC433C7; Fri, 16 Feb 2024 14:57:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1708095455; bh=bYPWSFzizc6hw98vYyVTqVDrmSgriMmL7bU5ekFvWl0=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=ON17NlzRcf8XTrWnC+hTMNpCsGM1tAcbZi6+rqehI6NuTCTr+djCCRYLpsETn3VXC 2BKbQzWxuhdpbQALNtUf2xld8nq5g4tO+x57/h0vP8eAN7WbVZOfnng4CBYDmXpNEr rSoUbLY6R5zQWsdGtMv9prHBcyWVgUuPHBlZJutDnIsvIJyw8KA0OWEDTi4w4hx6Gm OObeLuQQJU3FkXXNybRgLECXc9lZiNHBcppbA9MTF06VOtFC2Qmirapn/zuRXeHBwo zYApWHFl6BxJuL9bH5jcESqg3saem/kiO1gM4FohvD+bW+3Mmd49HS6LqU2odBEIQ0 vMZtXxEyWKcNg== Date: Fri, 16 Feb 2024 11:57:32 -0300 From: Arnaldo Carvalho de Melo To: Ian Rogers Cc: Peter Zijlstra , Ingo Molnar , Namhyung Kim , Mark Rutland , Alexander Shishkin , Jiri Olsa , Adrian Hunter , Oliver Upton , Yang Jihong , linux-kernel@vger.kernel.org, linux-perf-users@vger.kernel.org, bpf@vger.kernel.org Subject: Re: [PATCH v1 2/6] perf trace: Ignore thread hashing in summary Message-ID: References: <20240214063708.972376-1-irogers@google.com> <20240214063708.972376-3-irogers@google.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: On Wed, Feb 14, 2024 at 01:36:46PM -0800, Ian Rogers wrote: > On Wed, Feb 14, 2024 at 1:15 PM Ian Rogers wrote: > > On Wed, Feb 14, 2024 at 10:27 AM Ian Rogers wrote: > > > On Wed, Feb 14, 2024 at 9:25 AM Arnaldo Carvalho de Melo > > > wrote: > > > > On Tue, Feb 13, 2024 at 10:37:04PM -0800, Ian Rogers wrote: > > > > > Commit 91e467bc568f ("perf machine: Use hashtable for machine > > > > > threads") made the iteration of thread tids unordered. The perf trace > > > > > --summary output sorts and prints each hash bucket, rather than all > > > > > threads globally. Change this behavior by turn all threads into a > > > > > list, sort the list by number of trace events then by tids, finally > > > > > print the list. This also allows the rbtree in threads to be not > > > > > accessed outside of machine. > > > > Can you please provide a refresh of the output that is changed by your patch? > > > > > > Hmm.. looks like perf trace record has broken and doesn't produce > > > output in newer perfs. It works on 6.5 and so a bisect is necessary. > > > > Bisect result: > > ``` > > 9925495d96efc14d885ba66c5696f664fe0e663c is the first bad commit > > commit 9925495d96efc14d885ba66c5696f664fe0e663c > > Author: Ian Rogers > > Date: Thu Sep 14 14:19:45 2023 -0700 > > > > perf build: Default BUILD_BPF_SKEL, warn/disable for missing deps > > ... > > https://lore.kernel.org/r/20230914211948.814999-3-irogers@google.com > > ``` > > > > Now to do the bisect with BUILD_BPF_SKEL=1 on each make. > > This looks better (how could I be at fault :-) ): > ``` > 1836480429d173c01664a633b61e525b13d41a2a is the first bad commit > commit 1836480429d173c01664a633b61e525b13d41a2a > Author: Arnaldo Carvalho de Melo > Date: Wed Aug 16 13:53:26 2023 -0300 > > perf bpf_skel augmented_raw_syscalls: Cap the socklen parameter > using &= sizeof(saddr) > ... > Cc: Adrian Hunter > Cc: Ian Rogers > Cc: Jiri Olsa > Cc: Namhyung Kim > Signed-off-by: Arnaldo Carvalho de Melo > ``` > No LKML link. So simple... ;-\ I've reproduced your steps and got to the same cset while testing on a recent distro kernel (6.6.13-200.fc39.x86_64), scratching my head now and trying to figure this out. Wonder if trying to run on an older kernel the problem would appear. Will try and add a perf test shell entry with a simple: root@number:~# perf trace record sleep 0.001 && perf script | head | wc -l [ perf record: Woken up 1 times to write data ] [ perf record: Captured and wrote 0.034 MB perf.data ] 0 root@number:~# Has to be 10 :-) Thanks, - Arnaldo