From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-pj1-f72.google.com (mail-pj1-f72.google.com [209.85.216.72]) (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 696DB31F998 for ; Thu, 23 Jul 2026 04:59:55 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.216.72 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1784782799; cv=none; b=UC9RLpRdwL8htUvJuHQOYemlZ4heyWBOd8uk8VHep7d4ujoomhhGIK7UNOrZYnfeyle+TmocXbMK2f8jiHfF/O/1yRyBDq/kVNJTEGHbsprglHuWEqN0OSqGmDjbfczcLrRTqcePPwuBwHKUyXC2vNNyMU0/OW7ny1aYz8t2TaE= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1784782799; c=relaxed/simple; bh=4e5lJdshyVNLKjHpTciKZbgUhuEA4gmHv2L0MMDkQ6U=; h=Date:In-Reply-To:Mime-Version:References:Message-ID:Subject:From: To:Cc:Content-Type; b=ajIlbdVpBMHbLOG6hclACzfnQCF9Y4P3HxpkNq2jsDSWnGr7bMYsfTo93gEZ3fuFF4svGPh3ZknHLzJjVgvjoPmZeBncBY2Na3pOPNKHcfCzmHcikhMvZkU1W109FN9DjeNeX1AU2S4in2VE3q9ND5ePOVam8zxJ5ERJ/PtStN8= 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=H2EzmqdH; arc=none smtp.client-ip=209.85.216.72 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 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="H2EzmqdH" Received: by mail-pj1-f72.google.com with SMTP id 98e67ed59e1d1-38dde0df80bso560337a91.3 for ; Wed, 22 Jul 2026 21:59:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20251104; t=1784782794; x=1785387594; darn=vger.kernel.org; h=content-type:cc:to:from:subject:message-id:references:mime-version :in-reply-to:date:from:to:cc:subject:date:message-id:reply-to :content-type; bh=b/udcemSvZpoMA77w8mffwylF1dXnKAWFX5RvsMWK8I=; b=H2EzmqdHDn4UNG5wOGlXYNUMPWFIYkTxw4nRYXRUffk2nQBF+czUl/Ez/9ddMiBe/n 1CJ6GoD4/3N86e87OU1RCeysqrla1lMfQFxyrBkffNaw0J91tCO22D4rMQatLM4Lnuey vFxkSDv3QD4qqYkGckLDETjZUIt9ewA5mX637Y5Ptj+nofyDGDvR/5NFRKnHspnraHqZ lkvo4W7J5LaWkaeqvR13RAysh3L4LNTHmA4UvlR4QyUoo/OBDSE5eKNn5poDdKNden1c GmF24wB8TMNZJ2LYNyJ1AA/OTh/X+R490jHLZ71rDvsu4GOHKfeisdNcCMB+08KWHcGP juRw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1784782794; x=1785387594; h=content-type:cc:to:from:subject:message-id:references:mime-version :in-reply-to:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to:content-type; bh=b/udcemSvZpoMA77w8mffwylF1dXnKAWFX5RvsMWK8I=; b=ZMTMxe1WZtA9T7jhFQdh+YW8YipYTBO/+EiE7cJwJ4dcuU9DMncgX67C/aRpjTH6qN tZMD+6ZeGIzKE6STcfV23itssp3f7h/rZh+xkitOSzm/j6ltY3bO0G6jzlty7WYEPoOO sgKWXaKxY+sB426SC82hH8Roc4sdOgB5TxtFCPrzHRf+JKHTFLYE00X7pXEe1hLcN+Ex tqkGsACJx9M3gQjDhC+jzuS3WnJPPwec8CRv1JSFQbymcPA+eFTVt/XhYznhip4ZrxYL zN7p/eY9Z4oesrzML/xWi6hEJ+LeEBSSSUSQ6iRutR26/3JT2PNHIqyDR7mZyt+UyiMb G6XA== X-Forwarded-Encrypted: i=1; AHgh+RpQ1J2ULRNgfh9wcjqypxqmPxEdUzJljt/hloaIfEabRiDzNHuqHroQnWxuwYuPM7/lyuAwH6c0msX290g=@vger.kernel.org X-Gm-Message-State: AOJu0YzQaYIGrJiU6jsY1ZgQOqNN0St9r7Wwzuc7YxkggkxMhuHxKSsU ZjhPx8/oBvIcOThH0fnc93lRwdze17MzBtnC9R776BDfkA0Cb1B/SeAkOBvwvH4PBsJQZ7gzEHZ RXa89vey7Fw== X-Received: from dlbup12.prod.google.com ([2002:a05:7022:fd0c:b0:13b:340f:d011]) (user=irogers job=prod-delivery.src-stubby-dispatcher) by 2002:a17:90b:2f06:b0:38e:adf1:5b03 with SMTP id 98e67ed59e1d1-38ec6665307mr1653963a91.35.1784782794287; Wed, 22 Jul 2026 21:59:54 -0700 (PDT) Date: Wed, 22 Jul 2026 21:59:43 -0700 In-Reply-To: <20260716072351.560311-1-irogers@google.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 References: <20260716072351.560311-1-irogers@google.com> X-Mailer: git-send-email 2.55.0.229.g6434b31f56-goog Message-ID: <20260723045949.988740-1-irogers@google.com> Subject: [PATCH v7 0/6] perf ui hists / annotate: Remaining fixes for reference counting and annotation From: Ian Rogers To: irogers@google.com, acme@kernel.org, namhyung@kernel.org Cc: adrian.hunter@intel.com, dapeng1.mi@linux.intel.com, james.clark@linaro.org, jistone@redhat.com, jolsa@kernel.org, linux-kernel@vger.kernel.org, linux-perf-users@vger.kernel.org, mingo@redhat.com, peterz@infradead.org, tianyou.li@intel.com Content-Type: text/plain; charset="UTF-8" This series contains the remaining 6 unmerged patches from our UI, hists, and annotate fix series. Upstream maintainer Namhyung Kim applied patches 1-6 (except patch 4) from the v6 series into perf-tools-next. This v7 series includes: - Fix stack use-after-return for symbol_filter_str by duplicating with strdup() and freeing during evsel destruction in hists_evsel__exit(). - Guard against NULL hist_entry in add_script_opt() when trace is empty. - Populate map_symbol thread in report UI with proper reference counting (map_symbol__copy, thread__get) and memset zeroing in free_popup_actions(). - Fix dso_filter reference leak and exit zoom cleanup. - Robust cross-platform disassembly fallback when annotating without a thread. - Remove duplicated thread member from struct popup_action (placed at the end of the series per reviewer feedback). v7 Changes: - Rebased onto latest perf-tools-next (after patches 1-3, 5-6 were merged). - Move symbol_filter_str teardown to hists_evsel__exit() to allow filter persistence across TUI navigation while preventing memory leaks. - Add memset zeroing to free_popup_actions() to prevent cross-iteration stale action leakage. - Placed "Remove duplicated thread in popup_action" as the final patch in the series as requested. Ian Rogers (6): perf ui hists: Fix stack use-after-return in symbol_filter_str perf ui hists: Guard against NULL hist_entry in add_script_opt() perf ui hists: In report UI ensure thread is set with reference counting perf ui hists: Fix dso_filter reference leak and exit zoom cleanup perf annotate: Be robust to annotating without a thread perf ui hists: Remove duplicated thread in popup_action tools/perf/builtin-report.c | 7 +- tools/perf/ui/browsers/annotate.c | 2 +- tools/perf/ui/browsers/hists.c | 153 ++++++++++++++++++++---------- tools/perf/util/annotate.c | 51 +++++++--- tools/perf/util/annotate.h | 3 +- tools/perf/util/capstone.c | 42 ++++++-- tools/perf/util/hist.c | 1 + 7 files changed, 182 insertions(+), 77 deletions(-) -- 2.55.0.229.g6434b31f56-goog