Received: by 2002:a05:7412:2a8a:b0:fc:a2b0:25d7 with SMTP id u10csp608876rdh; Wed, 7 Feb 2024 14:37:18 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCUZZU1G9xV2IfSZmmqYTmGeKoUK9c+auypdSOszKGcBqt1P8/47Qsoj0kQ+rTEege9QYxdX90wEd1lDyEa7nNDOM8+Ik8j+nhGRsT3TcQ== X-Google-Smtp-Source: AGHT+IHk4YWgvrwGhqewhYFQVHiTCDNjsUxHm8+jRK1MNq5Xifol/InLtTxk8jbJ1oXX1nRMuu02 X-Received: by 2002:a9d:6b91:0:b0:6dd:9d3a:2421 with SMTP id b17-20020a9d6b91000000b006dd9d3a2421mr7203139otq.3.1707345438444; Wed, 07 Feb 2024 14:37:18 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707345438; cv=pass; d=google.com; s=arc-20160816; b=mjiG0fGxPsWjvVcZsiW+R7INSs5bq2XTkM5M9Ur+ZqZjAlED6CeTiGZPLJYH7l0+wY BwP8wULn6lTaIR4J6WInd5acTtH0JyKtU/hFQbm3GwQaM4hFJNLUrwI1Z0xsxwMb1m/Z 99ZTVHE0fkxaYYxa0lTp/0XqIDyVYgpoB2eHg9Wywber9DGlcVH+rh+YuxBB87Q8z2i0 /ikPypJ8f7H6uLolt3UYx/+gTGC/c3CLkSpiVKwKTgCJsTQPhS53uPvfqza3oEuCiILB jX0PgrZ6Z/IoAeRh59u+T/FhCslGgekBzRYBfCHy9ynw3cm7uil65fewHfCsD28P8309 dkZw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=to:from:subject:mime-version:list-unsubscribe:list-subscribe :list-id:precedence:message-id:date:dkim-signature; bh=se0rekKJl3bXKyYQ+330Vid9nql6VhcMY37MwG9XWnU=; fh=SB0GVE7wl+fQfd+BB1Xn6/VtLX57OUteutGCSqUcuYs=; b=WXc6EgooCm4FQw9DmcfmdjoF+IqaZpkZKLun27dqGb5jpX8Q0DXZNcZACvMjKtKSnq zM6z3lACvd1H6y+SEy5ua1yiTMjZfCdvDEt8KUqa46McuxTfE2njCfqh/ivk/6tgPtpM hBKZAm+aJ0URV4iD8JdilL3QizPhXok86aIiWN1cd7aCczmN1FeZTTuzYUlwt74SvoJ3 iABp91EyJ2c8QFmKN6gpkYFXPYDh92biemDc0KuoNy1/NKgq54r+Il0NQMq68SYUJIFK xxmYfnG5L+hjnnLZHjCb9cvjGBeWXWf0Uf8K8LB8+j5Iym5ZNR8c7+11/UNr58x6MZdY AdiQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@google.com header.s=20230601 header.b="lBn7k4/S"; arc=pass (i=1 spf=pass spfdomain=flex--irogers.bounces.google.com dkim=pass dkdomain=google.com dmarc=pass fromdomain=google.com); spf=pass (google.com: domain of linux-kernel+bounces-57259-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-57259-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com X-Forwarded-Encrypted: i=2; AJvYcCVwnl++s23h2jSGwV4964VFsyejwhF1317NHj5Eq9Lxn5feUEKwkWRSkt0jv9wcDH57+u3ShH7P0bfgzMibUJR43jxiMXuJnVddNksjOA== Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id l62-20020a638841000000b005d8c175f17fsi2534877pgd.405.2024.02.07.14.37.18 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 07 Feb 2024 14:37:18 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-57259-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=@google.com header.s=20230601 header.b="lBn7k4/S"; arc=pass (i=1 spf=pass spfdomain=flex--irogers.bounces.google.com dkim=pass dkdomain=google.com dmarc=pass fromdomain=google.com); spf=pass (google.com: domain of linux-kernel+bounces-57259-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-57259-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com 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 18596284BEB for ; Wed, 7 Feb 2024 22:37:18 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 2FD121CF9C; Wed, 7 Feb 2024 22:37:09 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="lBn7k4/S" Received: from mail-yb1-f202.google.com (mail-yb1-f202.google.com [209.85.219.202]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id CDBAA1CF9A for ; Wed, 7 Feb 2024 22:37:06 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.219.202 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707345428; cv=none; b=UTNbzeFWyoEf/U1/J/MeX1y0jUlOuCDSkz+4o/kfc873dQPwe87XCusMowy4ylS0oryruHxHleg5Fk6ElcZZD0aRscUrv2c2gqBdrQAfT34ikQOxKNpHLqcgE0sWHDcc6zDp6vDUrRM6f7MmTwrAlXyMD9TX/aJ1gud79Z/nShM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707345428; c=relaxed/simple; bh=uX8pdD7kgNmp3FcaYgB4JuQsO65wbuBOo0Jq84KiksI=; h=Date:Message-Id:Mime-Version:Subject:From:To:Content-Type; b=T8XZZpKi04IakyOIYCJgw9YBwdTBu4CcosvX3ao3gDrQdGbr5LGVwHId+uurBVn/mSR4a4WdGhf8lxQDCnaZVAyb2ilq8YzAwMfgIn6zc+2mPwiMMrgfrHnUMu+aNGKhGKkeUJjObT5pguJ2fZfXR4flwOyvDTCketpq2Y/0o1Y= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com; spf=pass smtp.mailfrom=flex--irogers.bounces.google.com; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b=lBn7k4/S; arc=none smtp.client-ip=209.85.219.202 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=flex--irogers.bounces.google.com Received: by mail-yb1-f202.google.com with SMTP id 3f1490d57ef6-dc6b5d1899eso467951276.0 for ; Wed, 07 Feb 2024 14:37:06 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1707345426; x=1707950226; darn=vger.kernel.org; h=to:from:subject:mime-version:message-id:date:from:to:cc:subject :date:message-id:reply-to; bh=se0rekKJl3bXKyYQ+330Vid9nql6VhcMY37MwG9XWnU=; b=lBn7k4/SEp7ZBAmR3gDoW01C2TIZzAWDqphEzjkDIw55Y4obQmHgzk6lwZMLhw+Eif Idz1CCUHX4lOqQznj+on+sbC5A1jyH7xvMIaTSuq8XuYk6htHv8RQsvdkH8njN/9rGdg ojQd6WY9S+Zq/GGTBKPbyfMsnALas0BRhZwFQjHUQ849OQiDLlxR9dcEWcNXK73o9Pax 5zjjmr0rSfuzXHZqP/WHO08LRZSi+KnvaEaA4i27jp4CdyeU9bELYkMZMmcsrpyuaAg1 ga06nAA/+FalYmG0LpS/TnyxoE7LiiHlhRyseP4mQo/5B3kpSuhfTdr8Khm2FdzlzK3z UsQQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1707345426; x=1707950226; h=to:from:subject:mime-version:message-id:date:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=se0rekKJl3bXKyYQ+330Vid9nql6VhcMY37MwG9XWnU=; b=kaLlt2JZLfajzhbAvzrEyaRCDM8Hrpq6DQw+fu7BDMAPjIrGW7hYPbm+Qn/no9uYFg CzeU4MGotYG0qUFMycaARDpGBp3DmE6BSLiXnAjBRr1f0WbDNiSiXTF54/9SJaslZ0bw 0H/cHyFxGYuXsutWrGuLfWa1qLjiOEpgkhDICmzyaUaTQXsRDJG6Ns6RzUCazGLu+xOO mVwkNRl3BmaqwzAj8K1DOrQAL/rrcV0kqXbikUGNYAuKpWDiWRMuKY0L5SIgtXzL4lZ8 pbZYiUvM0GMyPK3BCTqzTruLQBdefUf6yamfk5sqC6BLABM1kLV4BiTUI5peAraIy9Fy E5Ew== X-Forwarded-Encrypted: i=1; AJvYcCV/m0vT6i9p/JntolFE+4ZakbN8oA/h74DG9qlSD6fjyMUa6FgOXwX2RRDHQr63WhXaffoXyVVAKU1B0pLhr38+h2Elx9Aoz2ilc0JP X-Gm-Message-State: AOJu0YxNsqoSZFqXc5A4/wktnilGp5Fbyvcn/UcMomyDeGzJUMuBfu/O tAjRKxYEO+8PuaNEmEf5vsUsgg7hZPHgBTx6DY5hPXMSBA0b20TQc/uw+MDA1dIZFRLfeKwma4H ly+QhsQ== X-Received: from irogers.svl.corp.google.com ([2620:15c:2a3:200:b420:757c:5706:d53b]) (user=irogers job=sendgmr) by 2002:a05:6902:150b:b0:dbd:b4e8:1565 with SMTP id q11-20020a056902150b00b00dbdb4e81565mr214522ybu.4.1707345425771; Wed, 07 Feb 2024 14:37:05 -0800 (PST) Date: Wed, 7 Feb 2024 14:36:33 -0800 Message-Id: <20240207223639.3139601-1-irogers@google.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 X-Mailer: git-send-email 2.43.0.594.gd9cf4e227d-goog Subject: [PATCH v2 0/6] maps memory improvements and fixes From: Ian Rogers To: Peter Zijlstra , Ingo Molnar , Arnaldo Carvalho de Melo , Namhyung Kim , Mark Rutland , Alexander Shishkin , Jiri Olsa , Ian Rogers , Adrian Hunter , Song Liu , Miguel Ojeda , Liam Howlett , Colin Ian King , K Prateek Nayak , Artem Savkov , Changbin Du , Masami Hiramatsu , Athira Rajeev , Yang Jihong , Tiezhu Yang , James Clark , Leo Yan , linux-perf-users@vger.kernel.org, linux-kernel@vger.kernel.org, bpf@vger.kernel.org Content-Type: text/plain; charset="UTF-8" First 6 patches from: https://lore.kernel.org/lkml/20240202061532.1939474-1-irogers@google.com/ v2. Fix NO_LIBUNWIND=1 build issue. Ian Rogers (6): perf maps: Switch from rbtree to lazily sorted array for addresses perf maps: Get map before returning in maps__find perf maps: Get map before returning in maps__find_by_name perf maps: Get map before returning in maps__find_next_entry perf maps: Hide maps internals perf maps: Locking tidy up of nr_maps tools/perf/arch/x86/tests/dwarf-unwind.c | 1 + tools/perf/tests/maps.c | 3 + tools/perf/tests/thread-maps-share.c | 8 +- tools/perf/tests/vmlinux-kallsyms.c | 10 +- tools/perf/util/bpf-event.c | 1 + tools/perf/util/callchain.c | 2 +- tools/perf/util/event.c | 4 +- tools/perf/util/machine.c | 34 +- tools/perf/util/map.c | 1 + tools/perf/util/maps.c | 1296 ++++++++++++++-------- tools/perf/util/maps.h | 65 +- tools/perf/util/probe-event.c | 1 + tools/perf/util/symbol-elf.c | 4 +- tools/perf/util/symbol.c | 31 +- tools/perf/util/thread.c | 2 +- tools/perf/util/unwind-libdw.c | 2 +- tools/perf/util/unwind-libunwind-local.c | 2 +- tools/perf/util/unwind-libunwind.c | 7 +- 18 files changed, 900 insertions(+), 574 deletions(-) -- 2.43.0.594.gd9cf4e227d-goog