public inbox for linux-perf-users@vger.kernel.org
 help / color / mirror / Atom feed
From: Ian Rogers <irogers@google.com>
To: irogers@google.com, acme@kernel.org, adrian.hunter@intel.com,
	 james.clark@linaro.org, jolsa@kernel.org, mingo@redhat.com,
	 namhyung@kernel.org, peterz@infradead.org
Cc: alexander.shishkin@linux.intel.com, alexei.starovoitov@gmail.com,
	 andrii@kernel.org, ast@kernel.org, bpf@vger.kernel.org,
	daniel@iogearbox.net,  eddyz87@gmail.com, haoluo@google.com,
	john.fastabend@gmail.com,  kpsingh@kernel.org,
	linux-kernel@vger.kernel.org,  linux-perf-users@vger.kernel.org,
	martin.lau@linux.dev, memxor@gmail.com,  sdf@fomichev.me,
	song@kernel.org, yonghong.song@linux.dev
Subject: [PATCH v2 1/4] perf build: Don't check difference of perf and libbpf hashmap
Date: Sat, 21 Mar 2026 17:58:20 -0700	[thread overview]
Message-ID: <20260322005823.981079-2-irogers@google.com> (raw)
In-Reply-To: <20260322005823.981079-1-irogers@google.com>

The hashmap code as-is violates the C specification meaning
-fno-strict-aliasing is required or fixes sent in:
https://lore.kernel.org/lkml/20260321024446.692008-1-irogers@google.com/

We're looking to not build perf with -fno-strict-aliasing:
https://lore.kernel.org/lkml/20260320224248.536449-1-irogers@google.com/

There is also the continual problem with hashmap using errptrs rather
than errno introducing subtle bugs as shown in commits,
  d05073adda0f perf trace: Avoid an ERR_PTR in syscall_stats
  96f202eab813 perf trace: Fix IS_ERR() vs NULL check bug
  9f3c16a430e8 perf expr: Fix return value of ids__new()
but there are additional fixes on the mailing list.
https://lore.kernel.org/lkml/20250805063209.3678359-1-linmq006@gmail.com/

Let's allow the perf version of hashmap diverge from libbpf's so that
we can fix its issues.

Signed-off-by: Ian Rogers <irogers@google.com>
---
 tools/perf/check-headers.sh | 4 ----
 1 file changed, 4 deletions(-)

diff --git a/tools/perf/check-headers.sh b/tools/perf/check-headers.sh
index da3aca87457f..36b91cf1ccce 100755
--- a/tools/perf/check-headers.sh
+++ b/tools/perf/check-headers.sh
@@ -215,10 +215,6 @@ do
   beauty_check "$i" -B
 done
 
-# check duplicated library files
-check_2 tools/perf/util/hashmap.h tools/lib/bpf/hashmap.h
-check_2 tools/perf/util/hashmap.c tools/lib/bpf/hashmap.c
-
 # Files with larger differences
 
 check_ignore_some_hunks lib/list_sort.c
-- 
2.53.0.959.g497ff81fa9-goog


  reply	other threads:[~2026-03-22  0:58 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-03-21  2:44 [PATCH v1 1/2] libbpf: Fix strict aliasing violations in hashmap Ian Rogers
2026-03-21  2:44 ` [PATCH v1 2/2] perf tools: " Ian Rogers
2026-03-21 12:37 ` [PATCH v1 1/2] libbpf: " sun jian
2026-03-21 15:40 ` Yonghong Song
2026-03-21 17:36   ` Kumar Kartikeya Dwivedi
2026-03-21 19:49     ` Alexei Starovoitov
2026-03-21 23:04       ` Ian Rogers
2026-03-21 23:08         ` Alexei Starovoitov
2026-03-21 23:10           ` Ian Rogers
2026-03-22  0:58             ` [PATCH v2 0/4] perf hashmap: Separate perf's hashmap code from libbpf Ian Rogers
2026-03-22  0:58               ` Ian Rogers [this message]
2026-03-22  0:58               ` [PATCH v2 2/4] perf hashmap: Rename hashmap to perf_hashmap to avoid libbpf conflict Ian Rogers
2026-03-22  0:58               ` [PATCH v2 3/4] perf hashmap: Fix strict aliasing violations in hashmap Ian Rogers
2026-03-22  0:58               ` [PATCH v2 4/4] perf hashmap: Remove errptr usage from hashmap Ian Rogers

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20260322005823.981079-2-irogers@google.com \
    --to=irogers@google.com \
    --cc=acme@kernel.org \
    --cc=adrian.hunter@intel.com \
    --cc=alexander.shishkin@linux.intel.com \
    --cc=alexei.starovoitov@gmail.com \
    --cc=andrii@kernel.org \
    --cc=ast@kernel.org \
    --cc=bpf@vger.kernel.org \
    --cc=daniel@iogearbox.net \
    --cc=eddyz87@gmail.com \
    --cc=haoluo@google.com \
    --cc=james.clark@linaro.org \
    --cc=john.fastabend@gmail.com \
    --cc=jolsa@kernel.org \
    --cc=kpsingh@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-perf-users@vger.kernel.org \
    --cc=martin.lau@linux.dev \
    --cc=memxor@gmail.com \
    --cc=mingo@redhat.com \
    --cc=namhyung@kernel.org \
    --cc=peterz@infradead.org \
    --cc=sdf@fomichev.me \
    --cc=song@kernel.org \
    --cc=yonghong.song@linux.dev \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox