Received: by 2002:ab2:1689:0:b0:1f7:5705:b850 with SMTP id d9csp142526lqa; Fri, 26 Apr 2024 18:09:35 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWQcN78PkDPn9JVnr8M8f1qK6Pcch95dtFRBmVdZSjciMHsd4Fva/kVGnFOdLR74YrZA8S8xImKMmjQRH8g1YevUbY7yovYvpKJdxm8VQ== X-Google-Smtp-Source: AGHT+IGpX2XOcsmFPONw3COnHHwfO4xdqFEGVKJi8Hx8FfZLnQbyYEJ8WXikdnV7mR9d22dJvNbR X-Received: by 2002:a05:6218:2885:b0:183:fb11:adeb with SMTP id vw5-20020a056218288500b00183fb11adebmr5830541rwc.21.1714180175068; Fri, 26 Apr 2024 18:09:35 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1714180175; cv=pass; d=google.com; s=arc-20160816; b=MyReAYEJorqlevT+qPD5mrmGOdhTcZPSHLEpmq6Rj9Y0G49b3PJjBcQ2CH5Ein3Qfr eGhi64zWD/sRaK3Vkt948stcowe6xi67ygObUhoXvOuX+wGa/ju+jWaPof2+t6hUW8S9 lT81/1cXt1L0FrI41Wve/pE7n9YRLCC6SplUFZTmkJw7dlWyMSr50A51oeROD48xvhyc 6wE2d6qFAts/qLZYymUJS6eLWTrWoZa94WaPHpHc2lXPF/qImEUjhZwq13Zi4/bgbJ+y QftsKSw/JaRkvXVqve8JSqh/bp4RW0L25MyXGe/nqIvmSqQvsiezvba+EdFEkV5QSv8A i0xw== 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=wdCHR0B25lBwD3q8fv8LImHVLg/7L44kFYy9dgjxHrA=; fh=49GrrO/H3LiGmymuFnNd59pBYHHWBS2xk/6Ejg0rn8E=; b=Wi8Obf1Godq3pjaYGbKFqNdoHkaQ68SOWPzXkmpSNk3tCI/vrvYGkwCS/l+dseVz45 VACwqE9ZwYk++PwlrhoJfqhvp6UaEkPZbDdcOTAOG67Awl1q5YcbkSnuD1cblcqAeW5Y Wwf77TiKkZ6XUU4HMBlkv5NYnC7f2P3ta9xK0eJhgs3RvdHqkLS8grIV0XAHzvJGVbBx S9oV3A1tQt+AFmYmOdwvv2qI4QwbP51qDI30TqFQj+dEfvGAF63U+qMPUmtZxXaxbO81 CAYkl2qnerd7NVBWs/2F0XIFyie8XY1epIhzpZ1PXHC/MKGF/TkRGVcSpsrq3K1G09Z4 KZYA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=UpZDc5iP; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-160837-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-160837-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. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id o5-20020a0562140e4500b006a0ae95064asi2726126qvc.378.2024.04.26.18.09.34 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 26 Apr 2024 18:09:35 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-160837-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=UpZDc5iP; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-160837-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-160837-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 C246A1C21C5B for ; Sat, 27 Apr 2024 01:09:34 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 3BC542E852; Sat, 27 Apr 2024 01:09:28 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="UpZDc5iP" 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 57B0525777; Sat, 27 Apr 2024 01:09:26 +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=1714180167; cv=none; b=R3iuUVhdQgyoTE+vGZGut1QPhdOlrBxHEqVN4qMFk+AGCTCr1p0SySDJTjoM/S0wlU9Qj8ruunpY0CD+aUCaj/lEIHnuOV8uHi1tQ1tzXTVOs2R0nHxbiEaG2ilRgj6eHIDkMEG7Nnkjs8yI8GpzQd/98LYz2iyMTnV1GlQ3A68= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714180167; c=relaxed/simple; bh=5FyjjO3qI7vbvED0B+ufM1OwjTuy4FUUKvu2jkUC8Mk=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=s9XRy/suoCMyvZf2dVsOjB4jDuDPSJxlsKMJZDJzr1C+3C+dHNgzB4G1fgSEh+08lJgDKMEZkhEyzhf2TjrVclhRC0iDnAXvNsrgnIoh5OFN3AML8NuR7/tTsKV1eRN8I4gyrvZHLu5YojVziTQmv+GspPOcgCbhrFeKQx9pOps= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=UpZDc5iP; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 574C8C113CD; Sat, 27 Apr 2024 01:09:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1714180166; bh=5FyjjO3qI7vbvED0B+ufM1OwjTuy4FUUKvu2jkUC8Mk=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=UpZDc5iPFzgWaK3TksswV2zJtpSYA08GGt+Noe7CDPoWDJjEgx/2TtebKgiJTGWWS QZ9YrdtdXwIhrVdL+Sqegl+T9vug5YMSYLyBMcvkGHy8909xIA6waJW7TjhVSYH5Qw jHCuf2jl5l7gRFlJjhE1Csur7ony81mnev1zV2DWZm2s2ow8jeqGcffC32ugmW7HOj ne30QdnrdWVkTEGD/59iXq5fwvE9i1ZsqwAvS7RNUKSxnsUCgOcoLyAfmg3vQ84Coi +YFoZu3kOsNoE8bHBM0nrM3mCu4ikN04DK/ySAjQhlybogh4jY6l4NXSV/vh9U1JVl 666sD/fMDvcQw== Date: Fri, 26 Apr 2024 22:09:23 -0300 From: Arnaldo Carvalho de Melo To: Namhyung Kim Cc: Ian Rogers , Kan Liang , Jiri Olsa , Adrian Hunter , Peter Zijlstra , Ingo Molnar , LKML , linux-perf-users@vger.kernel.org Subject: Re: [PATCH 2/2] perf annotate: Update dso binary type when try build-id Message-ID: References: <20240425005157.1104789-1-namhyung@kernel.org> <20240425005157.1104789-2-namhyung@kernel.org> 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=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: On Thu, Apr 25, 2024 at 11:49:49AM -0300, Arnaldo Carvalho de Melo wrote: > On Thu, Apr 25, 2024 at 11:12:40AM -0300, Arnaldo Carvalho de Melo wrote: > > On Wed, Apr 24, 2024 at 05:51:57PM -0700, Namhyung Kim wrote: > > > +++ b/tools/perf/util/disasm.c > > > @@ -1156,6 +1156,8 @@ static int dso__disassemble_filename(struct dso *dso, char *filename, size_t fil > > > mutex_unlock(&dso->lock); > > > + } else if (dso->binary_type == DSO_BINARY_TYPE__NOT_FOUND) { > > > + dso->binary_type = DSO_BINARY_TYPE__BUILD_ID_CACHE; > > > } > > > Fixed up to take into account a recent patch by Ian that turned that > > &dso->lock into dso__lock(dso): > > > +++ b/tools/perf/util/disasm.c > > @@ -1156,6 +1156,8 @@ static int dso__disassemble_filename(struct dso *dso, char *filename, size_t fil > > } > > } > > mutex_unlock(dso__lock(dso)); > > + } else if (dso->binary_type == DSO_BINARY_TYPE__NOT_FOUND) { > > + dso->binary_type = DSO_BINARY_TYPE__BUILD_ID_CACHE; > > } > > Nah, I forgot some more stuff, this is what I have now: Nah?, I had to remove all these: pick a58b4da77b40920f perf dsos: Switch backing storage to array from rbtree/list pick 7d91cefd1fb63068 perf dsos: Remove __dsos__addnew() pick 80c3ccf05199dbb6 perf dsos: Remove __dsos__findnew_link_by_longname_id() pick af3f8dea24f47802 perf dsos: Switch hand code to bsearch() pick 7537b92b48318834 perf dso: Add reference count checking and accessor functions pick 9bd7c6fe8de22b37 perf dso: Reference counting related fixes pick 4de57b46a0cb2027 perf dso: Use container_of() to avoid a pointer in 'struct dso_data' Due to a bisect that pointed "perf dsos: Switch backing storage to array from rbtree/list" as the one where: root@x1:~# perf test "kernel lock contention analysis test" 87: kernel lock contention analysis test : FAILED! - Arnaldo