From nobody Fri Jan 31 00:19:24 2025 Received: from mail-wm1-f74.google.com (mail-wm1-f74.google.com [209.85.128.74]) (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 E32571FE44D for ; Mon, 27 Jan 2025 09:59:22 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.74 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1737971964; cv=none; b=ks+7AaAYbSGKHVIBIH5l+AKykRBVeDo3xHiUj+k6j2hpeTpojv63EqSzNdGZlB6Kcgi4EJlmViDwvzTtRKKgpYnhnY72faGmP6ofryfqLbcgKmJ3b7VoF3vRwKA/LwREjNNZfNJgmQ8tAqGHLxmqCJiG/kQsIWxG6bkwr1LqY4Q= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1737971964; c=relaxed/simple; bh=CMm71ocJ13ENhSwg83YLPq3qIcUDzcZT3Q0wIiZ2TJ0=; h=Date:In-Reply-To:Mime-Version:References:Message-ID:Subject:From: To:Cc:Content-Type; b=GwpEFuPV/nAUa+ZG+f/UYOS5nyZqqA4dTzDZOlHFI/ji235bQQnCFUkonPXWQtewrYxkDfgS9AQUlDc6cOvejNP+Ar3qeHhy3R4q83KNvVpaIOO+yrJSI9pezHq0rbyHa7S46yJJZq6tr9RKvxPc8bHjV/Undu++5sc9toua0S4= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com; spf=pass smtp.mailfrom=flex--dvyukov.bounces.google.com; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b=K9zhUMk6; arc=none smtp.client-ip=209.85.128.74 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--dvyukov.bounces.google.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="K9zhUMk6" Received: by mail-wm1-f74.google.com with SMTP id 5b1f17b1804b1-43625ceae52so22834155e9.0 for ; Mon, 27 Jan 2025 01:59:22 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1737971961; x=1738576761; darn=vger.kernel.org; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:from:to:cc:subject:date:message-id:reply-to; bh=qZi36qj3Dk8D5X5YEhL/AUUUkfpPn0nYoCcDBPXmPQQ=; b=K9zhUMk6SiTXozuOaGkTN8lcTcLaOsVy0H5wEcOYYlZcGDg/wNw3KVpgNhzSio+0ed AJOV5PMN3VRQWqqKxPftKiXQDyV8MFHfodx/KgRRnK5Fp68UOYkFfABTidRIIO1J/7hZ QVCTLP/7duJ3Ci1QClaqUVrVJejyB1JSKXpSP8bTpFI+n/AJVvlfjtUKc/CLiobNdKtQ inRiynfNaRBGm3w5Fom74f+bftQeIr2/klndA6+am1eNj2E2v/YGXfAFpnD9jXl1EK2U 58Fh8hWNjFJq7GeF6t0ZiUMQKkk9QGOm+bnNGCb5dJrH2VCb+uHsi9v1RQGjE58ZSwHC H3Iw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1737971961; x=1738576761; h=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; bh=qZi36qj3Dk8D5X5YEhL/AUUUkfpPn0nYoCcDBPXmPQQ=; b=v2bqyVJwYQJzHafM+QQ3jArfpUUrLWB8joYGhVYaAbkuPub3wmoC/ZSP4c+SHGCjj5 Rflvq3BwziGU4YhtEB+hi/zs+G5v5ZTVMoBZkh8V9zAAt5fpy/VwwsMwquPH4Ul72GOa co4tcNFHi362z5z2z/nffBE+wl/4eLmIXcJOpzvV0zFt81OlFFjqiZpp+7rj5AZCwHSC zFugOvUUVsvRQBJj0POH+F6j8OH2jY2kVUm0QaSxeqwB+Rw6dzQHCas45EsiQMJY88Ag YgtuFrlvHSp3ETTk/B0EckSoM8s3pAwPx4W8amBkbdsSckdsJPrnMlK2eQOyIo18jMp+ /kPg== X-Forwarded-Encrypted: i=1; AJvYcCUNeXjAyz+rL17jRAlPWpd4BGeaZIrN8KbGpayil6ciFOTN5XLoO3nAgZ5pRB0Q4+MrhgWeP4FJUI7f41Y=@vger.kernel.org X-Gm-Message-State: AOJu0Yx9BLfElJn+57t7MGBw0sQRKOAN08Yq0killSCAT3ce+k5tefph DMV2tWdu0WuoLQmgqsaG5HdywQ6uthibVfF1wzAdjAS2N1VN1QqnGRSwc8pMr8UXwJ4qH3YpqcS STw2Hhg== X-Google-Smtp-Source: AGHT+IHmH3Gqb/Z2o7jzI0F2xckNIS1ZWcj3WZmmtB5FP/KGhgCpjXrsbfIsdGeJn+tXm3YFAkftIGHWW/sG X-Received: from wmga3.prod.google.com ([2002:a05:600c:2d43:b0:434:9da4:2fa5]) (user=dvyukov job=prod-delivery.src-stubby-dispatcher) by 2002:a05:600c:5112:b0:434:a5bc:70fc with SMTP id 5b1f17b1804b1-438913cfa0emr355327075e9.8.1737971961472; Mon, 27 Jan 2025 01:59:21 -0800 (PST) Date: Mon, 27 Jan 2025 10:58:50 +0100 In-Reply-To: Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 References: X-Mailer: git-send-email 2.48.1.262.g85cc9f2d1e-goog Message-ID: Subject: [PATCH v3 3/7] perf report: Switch filtered from u8 to u16 From: Dmitry Vyukov To: namhyung@kernel.org, irogers@google.com Cc: linux-perf-users@vger.kernel.org, linux-kernel@vger.kernel.org, Dmitry Vyukov , Arnaldo Carvalho de Melo Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" We already have all u8 bits taken, adding one more filter leads to unpleasa= nt failure mode, where code compiles w/o warnings, but the last filters silent= ly don't work. Add a typedef and switch to u16. Signed-off-by: Dmitry Vyukov Cc: Namhyung Kim Cc: Arnaldo Carvalho de Melo Cc: Ian Rogers Cc: linux-perf-users@vger.kernel.org Cc: linux-kernel@vger.kernel.org --- tools/perf/util/addr_location.h | 3 ++- tools/perf/util/hist.c | 2 +- tools/perf/util/hist.h | 4 +++- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/tools/perf/util/addr_location.h b/tools/perf/util/addr_locatio= n.h index 36aaa45445f24..f83d74e370b2f 100644 --- a/tools/perf/util/addr_location.h +++ b/tools/perf/util/addr_location.h @@ -3,6 +3,7 @@ #define __PERF_ADDR_LOCATION 1 =20 #include +#include "hist.h" =20 struct thread; struct maps; @@ -17,7 +18,7 @@ struct addr_location { const char *srcline; u64 addr; char level; - u8 filtered; + filter_mask_t filtered; u8 cpumode; s32 cpu; s32 socket; diff --git a/tools/perf/util/hist.c b/tools/perf/util/hist.c index cafd693568189..6b8f8da8d3b66 100644 --- a/tools/perf/util/hist.c +++ b/tools/perf/util/hist.c @@ -585,7 +585,7 @@ static struct hist_entry *hist_entry__new(struct hist_e= ntry *template, return he; } =20 -static u8 symbol__parent_filter(const struct symbol *parent) +static filter_mask_t symbol__parent_filter(const struct symbol *parent) { if (symbol_conf.exclude_other && parent =3D=3D NULL) return 1 << HIST_FILTER__PARENT; diff --git a/tools/perf/util/hist.h b/tools/perf/util/hist.h index a6e662d77dc24..4035106a74087 100644 --- a/tools/perf/util/hist.h +++ b/tools/perf/util/hist.h @@ -33,6 +33,8 @@ enum hist_filter { HIST_FILTER__C2C, }; =20 +typedef u16 filter_mask_t; + enum hist_column { HISTC_SYMBOL, HISTC_TIME, @@ -244,7 +246,7 @@ struct hist_entry { bool leaf; =20 char level; - u8 filtered; + filter_mask_t filtered; =20 u16 callchain_size; union { --=20 2.48.1.262.g85cc9f2d1e-goog