Received: by 2002:a05:7412:bbc7:b0:fc:a2b0:25d7 with SMTP id kh7csp2795743rdb; Mon, 5 Feb 2024 19:33:41 -0800 (PST) X-Google-Smtp-Source: AGHT+IFLans6z1m5aHqHB9F9ltQ5H1vjWeVu88iq4L7GQKQ5lHzIKl0CT3rbzcE9BuES8fjJr+A4 X-Received: by 2002:a17:903:186:b0:1d9:8ac8:d79d with SMTP id z6-20020a170903018600b001d98ac8d79dmr594013plg.19.1707190421157; Mon, 05 Feb 2024 19:33:41 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707190421; cv=pass; d=google.com; s=arc-20160816; b=v9zV7B1tv+J/3qMS/W+KP3O8Gf33AajbMUAq7cdQ1sJPIZrM465O4KD/jAC3re8Waw Fv+LxG8Kg/Xe+xSlYSVzARy7Kt6HFoLkKp1s5/RY3uyBXDwAfYkVOKH0psMsASlsSjGZ 5XcR+ZNdU8KQ66lG1MRXh6wE2JCHldCoYqDMyN3sYUC7P1VmB/pFUkgn2zC1wIJA0gXs efKazO/lw7tdbjPYtsaRkum3hxjAYyhuZp+CzTZh6utvqAZgmfc6LdJfFQzyLu7/AsQR 2vgEwS99XvuGXG1vkcyklLsO6/E1BDujqpJf1Lx4Qa73XXYALOzMwsix+iZq8YCCtN95 ya3Q== 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=JuTvsdW4nPk5F0JAYEhrkK8gf2WJ2UoBgHHj4XMAB70=; fh=4U/VnwMg/qjLfa7TseATdvjsMGqe6CKd78MT+c6mSms=; b=JeDBNrrmnyzlsRubmgc57qJ8+Md54Tem8k948miTN1Dv1SGEMzrWc0QgRVWA4JpkUC JHpvCVt47Ukx5RFMMt6QHnWllbpdMABT6S53n2xFgUqhVjsgT0AbFiHX5I3lmlID7x/M us8Edan1x67GariiHj9zDHfv/JH8QcViidbk1yCaEMVb17Eg3frvdc+umZKSjB3lDsx9 Sqw5rTQqvQWPPlGlsenl6MmxUR7+/I2x9lzaAgmaKvteXFFLevsORG3SyDoLj5tBhxCp +e+Pf0PJ5Hukb3jKxCVaG/UP9asBRm4f9iawruqEb3A4/nyZQ8vktJqGzY4kF6VgZMfr J3XA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@google.com header.s=20230601 header.b=hGJOeYPg; 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-54258-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-54258-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com X-Forwarded-Encrypted: i=1; AJvYcCWyPEzy1y0CuF80RApDm4bjwckhknO5mAIewhezmks3G4613XJ2GJXh4qSwKwcUpDumBneqceX080QKJUoYPH0Nwk/MVkMGIz/JIgTzWw== Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id jb2-20020a170903258200b001d9a51954b1si899972plb.527.2024.02.05.19.33.40 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 05 Feb 2024 19:33:41 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-54258-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) client-ip=147.75.48.161; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20230601 header.b=hGJOeYPg; 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-54258-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-54258-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 sy.mirrors.kernel.org (Postfix) with ESMTPS id 229FFB22AD0 for ; Tue, 6 Feb 2024 03:33:37 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 1EDE8745D2; Tue, 6 Feb 2024 03:33:27 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="hGJOeYPg" Received: from mail-yw1-f202.google.com (mail-yw1-f202.google.com [209.85.128.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 C5A71745C3 for ; Tue, 6 Feb 2024 03:33:24 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.202 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707190406; cv=none; b=Czh2cBsZbo9ILFFPyYsn5To8Z3uDyMh7xKnr3/v/MDUhLp/lp7cxwq7ssxgJHCNsgSZyuU7TosGrf1ncoBbJjd7gft+AuRNW4a6Lq25pqyHjHAu/UeZ3Cly2OqNdBK0KrV0qyIBFTJvY22zgMR/QRcjb2iFc+OukTRkjoZIHw1g= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707190406; c=relaxed/simple; bh=37JfY9goEyfL1tils/65Mm1whb5ed6z34kDU6IWdu7c=; h=Date:Message-Id:Mime-Version:Subject:From:To:Content-Type; b=YC0GFrcY/taUylSDMrYmKiuXFkWAap4+XhiD69U1oChOcjg+8+7q0JR+1ERaBlZadevWIWQsr5F/0EI6zFzgXuyrO14CcYFWWOZHUufudF0lSAcmlJhav4Lmn2cRTVY1LkyRX0E0nagOxvnpSBrom1VbqhVo4Rx7c+2zJSB1zqs= 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=hGJOeYPg; arc=none smtp.client-ip=209.85.128.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-yw1-f202.google.com with SMTP id 00721157ae682-6047fed0132so54377b3.1 for ; Mon, 05 Feb 2024 19:33:24 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1707190404; x=1707795204; darn=vger.kernel.org; h=to:from:subject:mime-version:message-id:date:from:to:cc:subject :date:message-id:reply-to; bh=JuTvsdW4nPk5F0JAYEhrkK8gf2WJ2UoBgHHj4XMAB70=; b=hGJOeYPgTCyBI/7HrtPjmLniUplSTtlj9eWkegtnOjNlPn29YBrnwyiQ+5t9mxHfkL nmd63aS18V5hB3uGCE4VtS29IFMgcyVvVS6Ygme389FAli+PtUiWmKRyCRnQcMT05zlY NzT5k7MognKEE/uw0meK6jv4nPlzkHsGm5DYLOjY8GBFWK6LLC72vYcrK9RpgNPEWg5L UOswa2uBDs97pmUjsVqtAMjnwKi+8PPFtEbX8sv1e3nPkEDYj8NhB+JOLwLmeMct+LSg 8XXeztLF6daJ55ex7I8PePBgpHVdpfmtCqu6OTBJSmlWrGL8bIBgKdiNzdWCDSTkYXxe FVNg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1707190404; x=1707795204; h=to:from:subject:mime-version:message-id:date:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=JuTvsdW4nPk5F0JAYEhrkK8gf2WJ2UoBgHHj4XMAB70=; b=Me55O7PyiF+1yu2qw+q4onCj0JFCDR8Q5+Y0ha1GXm1ZlLAVPoEuBF1+yTLXo8EC71 oGjP9iqRmYYitkFslJzpbucCBTxrqoxtD1WALw6CFcm4r5tIqYQSz4pcYmm9TN1GtuPF UnwAaDK4ndQpNmh8Un1cH2X8FkbDLNCwlBKH23CVO93PjAeSYJmJG8blyDeKzpnC0Rl9 VvaLTPpOHXrkM/CnIfNK8w5uQyUuYyM3SRhqzcO7Cw8RduJQz/GTVB24hEdf3z9zWIFE 4XQU6to2JTjZc+MRdXLuHmT5T65AGOdd82rKTsn4EhkE1ilgRRmeaQ55DfO6iaGHy1i3 IIfA== X-Gm-Message-State: AOJu0Yxdg9NVKLvDW4N+jX3MkHFYeJySQQy9kuKK5rJ7hhlq72r4ynNM 5jn0mGuBlqwMguwPUpnRn8mY1teHjZsPSrFbuD8TzdjSdVteAE6X3zFLlSKApViHfltwEVBbbzr Ig+w+7A== X-Received: from irogers.svl.corp.google.com ([2620:15c:2a3:200:326b:71bb:e465:6f39]) (user=irogers job=sendgmr) by 2002:a05:690c:10c:b0:5e8:bea4:4d3b with SMTP id bd12-20020a05690c010c00b005e8bea44d3bmr75549ywb.6.1707190403843; Mon, 05 Feb 2024 19:33:23 -0800 (PST) Date: Mon, 5 Feb 2024 19:33:14 -0800 Message-Id: <20240206033320.2657716-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 v1 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 , liuwenyu , 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/ 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-libunwind-local.c | 2 +- tools/perf/util/unwind-libunwind.c | 7 +- 17 files changed, 899 insertions(+), 573 deletions(-) -- 2.43.0.594.gd9cf4e227d-goog