From nobody Wed Dec 17 19:39:34 2025 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 7CB361C54B9; Fri, 6 Dec 2024 20:48:42 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1733518122; cv=none; b=LFTg4owXMaNy3iF/cpVIMoHKAxoGFyQYTqiSU01+g2JnxMZDT3e06PXIHO58xmXtv3TXHfZckgX64lRXmJd9dT2G24hT/VfEXYviv8BP9wtp8IAYktICbxYDaQbGQGsAwzlJdk9GtB3pt0HN4IFQq18asx9GGv73MdKNH8sF+ow= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1733518122; c=relaxed/simple; bh=f9P/jPt2Xk7eLs1J+wW+EbnV/Hcd/t5P7gPqvx1H6XY=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=hYCpPNRbVx4OMRjvUcu17Zn6kxC1nJDnGaeVbNu9WeMa57sfliWlF64Uh4Q+ChnIJzUZ2R4BzSo/aACLJ3GSuKoXPmGj3wUwT+fD2aROsCkDxAd0/lyOW95Ns2iuEnteJhP1V9DASc0EQf0+SVe+ErAZlzhdVa2AdOU0adjZ3fk= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=EiSiMadz; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="EiSiMadz" Received: by smtp.kernel.org (Postfix) with ESMTPSA id D5B2AC4CED2; Fri, 6 Dec 2024 20:48:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1733518122; bh=f9P/jPt2Xk7eLs1J+wW+EbnV/Hcd/t5P7gPqvx1H6XY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=EiSiMadzG9sWqB5uPVdsD6fLnDDCA15PEsm5uhrZy1A3qAbrICMZ01aMswaW1lLY+ Hgltz610111+BwmpnovyOSVQU8J+bp5xHFdql4fuVfbrWxp4hkrwTQhvEzasu/ojqD pXmE1PgNi+Hw3tDmpR9abHCOlAwKtJ8dQRGNU1GWo24nDzdSQwv4j0c1q9L7nGO9ZT fFjHsroG/Zg8WTSd8MVjFWHwLQstkplUvWyDNi010n4rHKSNisqbbAry3flvUEMy/W MfuOZNzxtiV2Pb9xk9hcs4oLb02iVCrVqTGZnXyvhQg/KMaxjOsZHIwYNdbWZ/cxzE 1wazldEoHMKVg== From: Arnaldo Carvalho de Melo To: Stephane Eranian , Yonatan Goldschmidt Cc: Francesco Nigro , Ilan Green , Namhyung Kim , Ingo Molnar , Thomas Gleixner , James Clark , Jiri Olsa , Ian Rogers , Adrian Hunter , Kan Liang , Clark Williams , linux-kernel@vger.kernel.org, linux-perf-users@vger.kernel.org, Arnaldo Carvalho de Melo Subject: [PATCH 1/5] perf config: Fix trival typo 'an' -> 'can' Date: Fri, 6 Dec 2024 17:48:24 -0300 Message-ID: <20241206204828.507527-2-acme@kernel.org> X-Mailer: git-send-email 2.47.0 In-Reply-To: <20241206204828.507527-1-acme@kernel.org> References: <20241206204828.507527-1-acme@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" From: Arnaldo Carvalho de Melo Just a trivial typo, should be 'can', did a spell check on the rest of the file just in case, nothing more stood out. Signed-off-by: Arnaldo Carvalho de Melo --- tools/perf/Documentation/perf-config.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/perf/Documentation/perf-config.txt b/tools/perf/Document= ation/perf-config.txt index 1f668d4724e3749a..36ebebc875ea2d09 100644 --- a/tools/perf/Documentation/perf-config.txt +++ b/tools/perf/Documentation/perf-config.txt @@ -40,7 +40,7 @@ The '$HOME/.perfconfig' file is used to store a per-user = configuration. The file '$(sysconfdir)/perfconfig' can be used to store a system-wide default configuration. =20 -One an disable reading config files by setting the PERF_CONFIG environment +One can disable reading config files by setting the PERF_CONFIG environment variable to /dev/null, or provide an alternate config file by setting that variable. =20 --=20 2.47.0 From nobody Wed Dec 17 19:39:34 2025 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 4699B20458A; Fri, 6 Dec 2024 20:48:46 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1733518127; cv=none; b=S78lpb8awiE7AWNM/Sl+VxnLUiUqLhKkbxINe0etmuPpuBuCnnThjb8EWquuEyngO850HyNKZbdUCnqdGVyhlBVBmY5+qyqtPAPsjcps6VCbFWGsVK7bIiuGs23J6UV55yrDWvvxj/4Q/LlfaRemQYTsFoVPIyGjou2rv7iInj4= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1733518127; c=relaxed/simple; bh=BQGszL1O9E0CccpW+L2lcg/6KXwBvmkBtbzNTLssjUs=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=FVJuxTcqy6roxMOCsg61fIW6GYpZTA4uYdS18Rug2bRoGwnErjLjgm0yKBCmzDYz+ThbapxNKOZUnccwWlgN5GM1SoZ++GY1Kjs+uZKE9KAyJITpK6zAEpFTmaBh4SNjYqgAUBMFswcRYs5RmTeKggoC85BcQRTfp8fug3FJJ2A= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=h6jOQVG/; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="h6jOQVG/" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 98CCBC4CED1; Fri, 6 Dec 2024 20:48:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1733518126; bh=BQGszL1O9E0CccpW+L2lcg/6KXwBvmkBtbzNTLssjUs=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=h6jOQVG/CeWcfcR0LgFChl5GmoRNXgVlV9hjf+4Ih5RXxVASK7yl9d24VMfdIaXtj qZL4tDDhWcT+apaZzKN8UR2ECnAOGeTy/DYfj1KMgq3KSSyUSKvUFww3NZdBHgVwx2 OVqqOWUwOXYLLx2mheb/73lMSFUacl82rf79V1r/FxTl4H0qJfujJYmaPwPvB2Ail5 prBrJAkQvUezOxeL3/7rPrtdt6bnRkTmzpPYQWwwhu8J/w+UGNFHjMEOEooaouYo// nMbXoXyZ9DKe25azEpDcFUijGk4zYKTEvk2Kdti78TYUPZe4yIdjzbwL0gYc3Te3Mu XbK3gwsUNpcTg== From: Arnaldo Carvalho de Melo To: Stephane Eranian , Yonatan Goldschmidt Cc: Francesco Nigro , Ilan Green , Namhyung Kim , Ingo Molnar , Thomas Gleixner , James Clark , Jiri Olsa , Ian Rogers , Adrian Hunter , Kan Liang , Clark Williams , linux-kernel@vger.kernel.org, linux-perf-users@vger.kernel.org, Arnaldo Carvalho de Melo Subject: [PATCH 2/5] perf jitdump: Accept jitdump mmaps emitted from inside containers Date: Fri, 6 Dec 2024 17:48:25 -0300 Message-ID: <20241206204828.507527-3-acme@kernel.org> X-Mailer: git-send-email 2.47.0 In-Reply-To: <20241206204828.507527-1-acme@kernel.org> References: <20241206204828.507527-1-acme@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable From: Arnaldo Carvalho de Melo When the java agent is running inside a container it will emit mmaps with the format: =E2=AC=A2 [acme@toolbox a]$ perf report -D | grep PERF_RECORD_MMAP | grep= \.dump 0 0x15c400 [0x90]: PERF_RECORD_MMAP2 3308868/3308868: [0x7fb8de6cb000(0x1= 000) @ 0 08:14 3222905945 0]: r-xp /tmp/.debug/jit/java-jit-20241126.XXTxEI= On/jit-1.dump =E2=AC=A2 [acme@toolbox a]$ Since perf is running from outside the container it sees the pid 3308868 in PERF_RECORD_MMAP2, while the agent saw the pid of the profiled app inside the container, 1. The previous validation was: if (pid && pid2 !=3D nsinfo__nstgid(nsi)) pid2 at this point is '1' (/jit-1.dump), so it considers this as a malformed jitdump mmap and refuses to process it. The test ends up as: if (3308868 && 1 !=3D 3308868) which is true and the jitdump is not processed. Since 1 in the container namespace is really 3308868 in the namespace that perf is running, consider this a valid mmap. We need to make perf realize this and behave accordingly, for now checking instead: if (pid && pid2 && pid !=3D nsinfo__nstgid(nsi)) Translating to: if (3308868 && 1 && 3308868 !=3D 3308868) Will make the jitdump mmap to be considered valid and processed. The jitdump is described in: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/t= ools/perf/Documentation/jitdump-specification.txt Now we end up with the expected flurry of MMAPs, one per jitted function transformed into a little ELF file that should then be processable by the other perf features, like code annotation: [acme@toolbox a]$ echo $JITDUMPDIR /tmp/.debug/jit [acme@toolbox a]$ First use 'perf inject': =E2=AC=A2 [acme@toolbox a]$ time perf inject -i perf.data -o acme-perf-in= jected.data -j Then look at the PERF_RECORD_MMAP events in the result file, that went thru the JIT map file: =E2=AC=A2 [acme@toolbox a]$ ls -la /tmp/*.map -rw-r--r--. 1 acme acme 2989559 Nov 27 16:11 /tmp/perf-3308868.map [acme@toolbox a]$ It is a symbol table: =E2=AC=A2 [acme@toolbox a]$ head /tmp/*.map 0x00007fb8bda5c1a0 0x00000000000000d0 java.lang.String java.lang.module.M= oduleDescriptor.name() 0x00007fb8bda5c4a0 0x0000000000000178 int java.lang.StringLatin1.hashCode= (byte[]) 0x00007fb8bda5c9a0 0x00000000000000d0 java.lang.String org.springframewor= k.boot.context.config.ConfigDataLocation.getValue() 0x00007fb8bda5cca0 0x00000000000000d0 java.lang.module.ModuleDescriptor j= ava.lang.module.ModuleReference.descriptor() 0x00007fb8bda5cfa0 0x00000000000000d0 java.lang.Object java.util.KeyValue= Holder.getKey() 0x00007fb8bda5d2a0 0x00000000000000d0 java.lang.Object java.util.KeyValue= Holder.getValue() 0x00007fb8bda5d5a0 0x0000000000000218 boolean jdk.internal.misc.Unsafe.co= mpareAndSetReference(java.lang.Object, long, java.lang.Object, java.lang.Ob= ject) 0x00007fb8bda5d9a0 0x00000000000001f0 boolean jdk.internal.misc.Unsafe.co= mpareAndSetLong(java.lang.Object, long, long, long) 0x00007fb8bda5dda0 0x00000000000001f8 void java.lang.System.arraycopy(jav= a.lang.Object, int, java.lang.Object, int, int) 0x00007fb8bda5e1a0 0x00000000000001e8 int java.lang.Object.hashCode() =E2=AC=A2 [acme@toolbox a]$ As specified in: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/t= ools/perf/Documentation/jit-interface.txt This was collected from inside the container, so came as /tmp/perf-1.map. To make perf, running outside the container to use it we need to copy it to /tmp/perf-3308868.map. This is another logic that has to be added to perf to work on this scenario of running outside the container but processing things created by the hava agent running inside the container. With all this in place we get to: =E2=AC=A2 [acme@toolbox a]$ perf report -D -i acme-perf-injected.data | \ grep PERF_RECORD_MMAP > /tmp/acme-perf-injected.data.mmaps ; \ wc -l /tmp/acme-perf-injected.data.mmaps 44182 /tmp/acme-perf-injected.data.mmaps =E2=AC=A2 [acme@toolbox a]$ tail /tmp/acme-perf-injected.data.mmaps 1030266786574466 0x7bc9e0 [0x98]: PERF_RECORD_MMAP2 1/78: [0x7fb8c0ceb1c0= (0x8d0) @ 0x80 00:2c 238715 1]: --xs /tmp/.debug/jit/java-jit-20241126.XXTx= EIOn/jitted-1-43989.so 1030266795288774 0x7bca78 [0x98]: PERF_RECORD_MMAP2 1/78: [0x7fb8c0cecc00= (0x7e8) @ 0x80 00:2c 238716 1]: --xs /tmp/.debug/jit/java-jit-20241126.XXTx= EIOn/jitted-1-43990.so 1030266895967339 0x7bcb10 [0x98]: PERF_RECORD_MMAP2 1/78: [0x7fb8c0cee500= (0x3328) @ 0x80 00:2c 238717 1]: --xs /tmp/.debug/jit/java-jit-20241126.XXT= xEIOn/jitted-1-43991.so 1030266915748306 0x7bcba8 [0x98]: PERF_RECORD_MMAP2 1/78: [0x7fb8c0aae0a0= (0x138) @ 0x80 00:2c 238718 1]: --xs /tmp/.debug/jit/java-jit-20241126.XXTx= EIOn/jitted-1-43992.so 1030267185851220 0x7bcc40 [0x98]: PERF_RECORD_MMAP2 1/78: [0x7fb8c0cf61e0= (0x3b50) @ 0x80 00:2c 238719 1]: --xs /tmp/.debug/jit/java-jit-20241126.XXT= xEIOn/jitted-1-43993.so 1030267231364524 0x7bccd8 [0x98]: PERF_RECORD_MMAP2 1/78: [0x7fb8c0cfea80= (0x14a0) @ 0x80 00:2c 238720 1]: --xs /tmp/.debug/jit/java-jit-20241126.XXT= xEIOn/jitted-1-43994.so 1030267425498831 0x7bcd70 [0x98]: PERF_RECORD_MMAP2 1/78: [0x7fb8c054b4a0= (0x338) @ 0x80 00:2c 238721 1]: --xs /tmp/.debug/jit/java-jit-20241126.XXTx= EIOn/jitted-1-43995.so 1030267506147888 0x7bce08 [0x98]: PERF_RECORD_MMAP2 1/78: [0x7fb8c0a995c0= (0x1e8) @ 0x80 00:2c 238722 1]: --xs /tmp/.debug/jit/java-jit-20241126.XXTx= EIOn/jitted-1-43996.so 1030268112586116 0x7bcea0 [0x98]: PERF_RECORD_MMAP2 1/78: [0x7fb8c0d02520= (0x258) @ 0x80 00:2c 238723 1]: --xs /tmp/.debug/jit/java-jit-20241126.XXTx= EIOn/jitted-1-43997.so 1030269435398150 0x7bcf38 [0x98]: PERF_RECORD_MMAP2 1/78: [0x7fb8c0d02dc0= (0x278) @ 0x80 00:2c 238724 1]: --xs /tmp/.debug/jit/java-jit-20241126.XXTx= EIOn/jitted-1-43998.so =E2=AC=A2 [acme@toolbox a]$ And if we look at those tiny ELF files generated by the jitdump code used by 'perf inject' we see: =E2=AC=A2 [acme@toolbox a]$ file /tmp/.debug/jit/java-jit-20241126.XXTxEI= On/jitted-1-43989.so /tmp/.debug/jit/java-jit-20241126.XXTxEIOn/jitted-1-43989.so: ELF 64-bit = LSB shared object, x86-64, version 1 (SYSV), statically linked, BuildID[sha= 1]=3D790591db95a77d644657dfe5058658b200000000, with debug_info, not stripped =E2=AC=A2 [acme@toolbox a]$ file /tmp/.debug/jit/java-jit-20241126.XXTxEI= On/jitted-1-43990.so /tmp/.debug/jit/java-jit-20241126.XXTxEIOn/jitted-1-43990.so: ELF 64-bit = LSB shared object, x86-64, version 1 (SYSV), statically linked, BuildID[sha= 1]=3D762f932acbee53a22638bf4c2b86780200000000, with debug_info, not stripped =E2=AC=A2 [acme@toolbox a]$ =E2=AC=A2 [acme@toolbox a]$ ls -la /tmp/.debug/jit/java-jit-20241126.XXTx= EIOn/jitted-1-43989.so /tmp/.debug/jit/java-jit-20241126.XXTxEIOn/jitted-1-= 43990.so -rw-r--r--. 1 acme acme 9432 Nov 29 10:56 /tmp/.debug/jit/java-jit-202411= 26.XXTxEIOn/jitted-1-43989.so -rw-r--r--. 1 acme acme 7504 Nov 29 10:56 /tmp/.debug/jit/java-jit-202411= 26.XXTxEIOn/jitted-1-43990.so =E2=AC=A2 [acme@toolbox a]$ And: =E2=AC=A2 [acme@toolbox a]$ objdump -dS /tmp/.debug/jit/java-jit-20241126= .XXTxEIOn/jitted-1-43990.so | head -20 /tmp/.debug/jit/java-jit-20241126.XXTxEIOn/jitted-1-43990.so: file fo= rmat elf64-x86-64 Disassembly of section .text: 0000000000000080 : 80: 44 8b 56 08 mov 0x8(%rsi),%r10d 84: 49 c1 e2 03 shl $0x3,%r10 88: 49 3b c2 cmp %r10,%rax 8b: 0f 85 6f 15 83 fc jne fffffffffc831600 91: 66 66 90 data16 xchg %ax,%ax 94: 0f 1f 84 00 00 00 00 nopl 0x0(%rax,%rax,1) 9b: 00 9c: 66 66 66 90 data16 data16 xchg %ax,%ax a0: 89 84 24 00 c0 fe ff mov %eax,-0x14000(%rsp) a7: 55 push %rbp a8: 48 8b ec mov %rsp,%rbp ab: 48 83 ec 40 sub $0x40,%rsp af: 48 89 34 24 mov %rsi,(%rsp) =E2=AC=A2 [acme@toolbox a]$ The thing now being investigated is why we can't annotate anything here, maybe that JITDUMPDIR is getting in the way: =E2=AC=A2 [acme@toolbox a]$ perf annotate --stdio2 -i acme-perf-injected.= data 'java.lang.String com.fasterxml.jackson.core.sym.CharsToNameCanonicali= zer.findSymbol(char[], int, int, int)' Error: Couldn't annotate java.lang.String com.fasterxml.jackson.core.sym.CharsTo= NameCanonicalizer.findSymbol(char[], int, int, int): Internal error: Invalid -1 error code =E2=AC=A2 [acme@toolbox a]$ In the tests I performed while merging this patch: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit= /?id=3D6d518ac7be6223811ab947897273b1bbef846180 It works, but then there was no JITDUMPDIR involved: /home/acme/.debug/jit/java-jit-20241127.XXF1SRgN/jitted-3912413-4191.so =E2=AC=A2 [acme@toolbox perf-tools-next]$ perf report --call-graph none --n= o-child -i perf-injected.data | grep jitted- | head 1.36% java jitted-3912413-54.so [.] Interpreter 0.30% C1 CompilerThre jitted-3912413-1.so [.] flush_icache_stub 0.18% java jitted-3912413-4184.so [.] org.apache.fop.fo.= properties.PropertyMaker.get(int, org.apache.fop.fo.PropertyList, boolean, = boolean) 0.18% java jitted-3912413-4177.so [.] org.apache.fop.lay= outmgr.inline.TextLayoutManager.getNextKnuthElements(org.apache.fop.layoutm= gr.LayoutContext, int) 0.13% java jitted-3912413-3845.so [.] java.text.DecimalF= ormat.subformatNumber(java.lang.StringBuffer, java.text.Format$FieldDelegat= e, boolean, boolean, int, int, int, int) 0.11% java jitted-3912413-4191.so [.] org.apache.fop.fo.= FObj.addChildNode(org.apache.fop.fo.FONode) 0.09% java jitted-3912413-2418.so [.] org.apache.fop.fo.= XMLWhiteSpaceHandler.handleWhiteSpace() 0.08% Reference Handl jitted-3912413-54.so [.] Interpreter 0.08% java jitted-3912413-3326.so [.] org.apache.xmlgrap= hics.fonts.Glyphs.stringToGlyph(java.lang.String) 0.08% java jitted-3912413-3953.so [.] org.apache.fop.lay= outmgr.BreakingAlgorithm.considerLegalBreak(org.apache.fop.layoutmgr.KnuthE= lement, int) =E2=AC=A2 [acme@toolbox perf-tools-next]$ And then: =E2=AC=A2 [acme@toolbox perf-tools-next]$ perf annotate --stdio2 -i perf-= injected.data 'org.apache.fop.layoutmgr.inline.TextLayoutManager.getNextKnu= thElements(org.apache.fop.layoutmgr.LayoutContext, int)' | head -20 Samples: 8 of event 'cpu_atom/cycles/Pu', 4000 Hz, Event count (approx.)= : 8112794, [percent: local period] org.apache.fop.layoutmgr.inline.TextLayoutManager.getNextKnuthElements(or= g.apache.fop.layoutmgr.LayoutContext, int)() /home/acme/.debug/jit/java-jit= -20241127.XXF1SRgN/jitted-3912413-4177.so Percent 0x80 : nop movl 0x8(%rsi),%r10d cmpl 0x8(%rax),%r10d =E2=86=92 jne 0 movl %eax,-0x14000(%rsp) pushq %rbp subq $0xb0,%rsp nop cmpl $0x3,0x20(%r15) =E2=86=93 jne 7037 2e: movl %ecx,0x28(%rsp) movq %rdx,%rbp movl 0x64(%rdx),%ebx cmpb $0x0,0x38(%r15) =E2=86=93 jne 3a44 movq %rsi,0x30(%rsp) 48: movq 0x30(%rsp),%r10 =E2=AC=A2 [acme@toolbox perf-tools-next]$ No source code nor line numbers, that I saw in another build of perf for RHEL9, for the same workload described in the cset above (a publicly available java benchmark), so something to investigate on perf upstream running on fedora, maybe some quirk with the jdk used when building perf for RHEL 9 and for Fedora 40. A related patch that should have make this all work is: "perf inject jit: Add namespaces support" https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit= /?id=3D67dec926931448d688efb5fe34f7b5a22470fc0a But we still need to polish this some more, maybe there are differences in the agent used in NodeJS with --perf-prof and the jvmti one we're using. Hopefully describing all the steps while we investigate this case will help us improve perf support for profiling JITed environments running in containers while profiling from inside and outside it. Reported-by: Francesco Nigro Reported-by: Ilan Green Cc: Adrian Hunter Cc: Ian Rogers Cc: James Clark Cc: Jiri Olsa Cc: Kan Liang Cc: Namhyung Kim Cc: Stephane Eranian Cc: Yonatan Goldschmidt Signed-off-by: Arnaldo Carvalho de Melo --- tools/perf/util/jitdump.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/perf/util/jitdump.c b/tools/perf/util/jitdump.c index 346513e5e9b7a956..d53c6ac4095b663c 100644 --- a/tools/perf/util/jitdump.c +++ b/tools/perf/util/jitdump.c @@ -777,7 +777,7 @@ jit_detect(const char *mmap_name, pid_t pid, struct nsi= nfo *nsi) * pid does not match mmap pid * pid=3D=3D0 in system-wide mode (synthesized) */ - if (pid && pid2 !=3D nsinfo__nstgid(nsi)) + if (pid && pid2 && pid !=3D nsinfo__nstgid(nsi)) return -1; /* * validate suffix --=20 2.47.0 From nobody Wed Dec 17 19:39:34 2025 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 0FFBD211487; Fri, 6 Dec 2024 20:48:51 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1733518132; cv=none; b=jXGcoXvrZS0CHsgX/HvxNLiQ/XnTsRhVXBXXQfQxYSlaqRtaKOr1vzvuN23XTyfQJCt4+rt3gYxd3tWuO6O2lvcVhzEKKe2TRgggU+4HpUNgxKmMlTzrxFVVOSVg6G4ubUYObGiF/DhtjT1ZpdmARk63X9LnxXcr7KS/GSUScUA= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1733518132; c=relaxed/simple; bh=exifNXsQ/uJc1E+u/IwQR1lR8U8//3ghSe2sXRyzbCI=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=iPUhdwb56dtLn+s5Px15Vxe82AbZWzaSBcvMjfV8U+eK2EAqmkNQP6raU8S4DZp2jlJNXkC+bOGUgjojn+1YBIT8/JvBQch/f5tUS2zZfWDmEXYXw222L8i0YG0Qt1nt5ZTpr/YFjgsHlqyl6r3dapFXROIjQTL8p7Nzl5Hrv3o= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=baGD88jt; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="baGD88jt" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 5A688C4CEDE; Fri, 6 Dec 2024 20:48:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1733518131; bh=exifNXsQ/uJc1E+u/IwQR1lR8U8//3ghSe2sXRyzbCI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=baGD88jtngqtNOeUJpVaCIQz+jyCVAQrExI07iQLJAQh2zDJLwTKyhC2KPl/7+Y+O 0w9irv7HfnIJ8UoLviY8Tj19xzdB45/vVpQ06uX03z8rao4ZpRPtYxoMO+BxtwvoKX xxxGl+slY8ISuj8eZjFSdvbW5CUvOZpGmbWWgy5xff7k6cFewIRqK1KTnxLMBINBO1 iggHzsFDQpbITfNaxC3vdAfd7/lw0hCDxSXVqJMHP3lZ8LiWePvsApdtOePaqfqinB hlrRbbvcATwRXNvpP5sPqaIimVa1bQhOxgXMiYv416N4wv1EPSVjEKkhbr69mADQ0f mPVKuo5H4MRzg== From: Arnaldo Carvalho de Melo To: Stephane Eranian , Yonatan Goldschmidt Cc: Francesco Nigro , Ilan Green , Namhyung Kim , Ingo Molnar , Thomas Gleixner , James Clark , Jiri Olsa , Ian Rogers , Adrian Hunter , Kan Liang , Clark Williams , linux-kernel@vger.kernel.org, linux-perf-users@vger.kernel.org, Arnaldo Carvalho de Melo Subject: [PATCH 3/5] perf namespaces: Introduce nsinfo__set_in_pidns() Date: Fri, 6 Dec 2024 17:48:26 -0300 Message-ID: <20241206204828.507527-4-acme@kernel.org> X-Mailer: git-send-email 2.47.0 In-Reply-To: <20241206204828.507527-1-acme@kernel.org> References: <20241206204828.507527-1-acme@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" From: Arnaldo Carvalho de Melo When we're processing a perf.data file we will, for every thread in that file do a machine__findnew_thread(machine, pid, tid) that when that pid is seen for the first time will create a 'struct thread' representing it. That in turn will call nsinfo__new() -> nsinfo__init() and there it will assume we're running live, which is wrong and will need to be addressed in a followup patch. The nsinfo__new() assumes that if we can't access that thread it has already finished and will ignore the -1 return from nsinfo__init(), just taking notes to avoid trying to enter in that namespace, since it isn't there anymore, a race. When doing this from 'perf inject', tho, we can fill in parts of that nsinfo from what we get from the PERF_RECORD_MMAP2 (pid, tid) and in the jitdump file name, that has the form of jit-.dump. So if the pid in the jitdump file name is not the one in the PERF_RECORD_MMAP2, we can assume that its the pid of the process _inside_ the namespace, and that perf was runing outside that namespace. This will be done in the following patch. Reported-by: Francesco Nigro Reported-by: Ilan Green Cc: Adrian Hunter Cc: Ian Rogers Cc: James Clark Cc: Jiri Olsa Cc: Kan Liang Cc: Namhyung Kim Cc: Stephane Eranian Cc: Yonatan Goldschmidt Signed-off-by: Arnaldo Carvalho de Melo --- tools/perf/util/namespaces.c | 5 +++++ tools/perf/util/namespaces.h | 1 + 2 files changed, 6 insertions(+) diff --git a/tools/perf/util/namespaces.c b/tools/perf/util/namespaces.c index cb185c5659d6b323..36047184d76e2f80 100644 --- a/tools/perf/util/namespaces.c +++ b/tools/perf/util/namespaces.c @@ -271,6 +271,11 @@ pid_t nsinfo__in_pidns(const struct nsinfo *nsi) return RC_CHK_ACCESS(nsi)->in_pidns; } =20 +void nsinfo__set_in_pidns(struct nsinfo *nsi) +{ + RC_CHK_ACCESS(nsi)->in_pidns =3D true; +} + void nsinfo__mountns_enter(struct nsinfo *nsi, struct nscookie *nc) { diff --git a/tools/perf/util/namespaces.h b/tools/perf/util/namespaces.h index 8c0731c6cbb7ee01..e014becb9cd8eb3a 100644 --- a/tools/perf/util/namespaces.h +++ b/tools/perf/util/namespaces.h @@ -59,6 +59,7 @@ pid_t nsinfo__tgid(const struct nsinfo *nsi); pid_t nsinfo__nstgid(const struct nsinfo *nsi); pid_t nsinfo__pid(const struct nsinfo *nsi); pid_t nsinfo__in_pidns(const struct nsinfo *nsi); +void nsinfo__set_in_pidns(struct nsinfo *nsi); =20 void nsinfo__mountns_enter(struct nsinfo *nsi, struct nscookie *nc); void nsinfo__mountns_exit(struct nscookie *nc); --=20 2.47.0 From nobody Wed Dec 17 19:39:35 2025 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id D38E21FFC69; Fri, 6 Dec 2024 20:48:56 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1733518136; cv=none; b=QABPaMyhxW39ZRlu8aIniSjQQ6LfA4M7RwLUmqXI0BOLqJleveQHxC4Ng7rhWjDzjZa3dkPixklfUqAqIH97CfypS26J23dAMSKofgfgtUHY4TDM8iv3ocApBDmqqSprvv8KhVPqxcWYWpil//tUE6jw00t4D/bk+19tCQfuQjM= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1733518136; c=relaxed/simple; bh=C/GYO19WCUxdqbu0P1HVnqbnay9/cLMX9yt7EvaV+N8=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=bJnmCfhfOmESGi2Ks/Bny5mfocHeYHCU+SFypsS2kWzR4jvqUC6zdCE2828jzsJHqlezlTwbiQY8gpitLi1WmjVERlznQcAWHS0XsEG41jvcChLYPaPlV8cyZy3oywjKsRe0Znjh5p2xuIlXPE6VoLFNXltKZK43mt5k8izhIEc= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=tT2vjXGU; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="tT2vjXGU" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 1E03BC4CED1; Fri, 6 Dec 2024 20:48:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1733518136; bh=C/GYO19WCUxdqbu0P1HVnqbnay9/cLMX9yt7EvaV+N8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=tT2vjXGUpU7QaBOvFWK6/6WhoCAj8fUBqmrFyinJ43Ql6Ch9wA4hWQnhdNlMEDkjX 4vdIYkUuFlJAVeMZrinzpydJ2zsvjDNtEF0eRPl5oqBqkY/f4d1fKwnNoij6ilEL0J bTWDcCzXPVMw95GoXs6NrBQPKZiq0D6KoKbvWjuIsEvkuuowV2NbpQn4pbBa6va2uE q9AR1Ndk3IwTPtmbh27nPTaUIQIeH+qimbzGQzsCpW4dkSP3QEfnLrWsKb3i3GPlBx HKPd649jk6TdmhSzFooPFOdF2YHUK/QATbMempOhJuF8G/8d7A2rAmitsJtZiwEWV0 FIT0nzmJjiApQ== From: Arnaldo Carvalho de Melo To: Stephane Eranian , Yonatan Goldschmidt Cc: Francesco Nigro , Ilan Green , Namhyung Kim , Ingo Molnar , Thomas Gleixner , James Clark , Jiri Olsa , Ian Rogers , Adrian Hunter , Kan Liang , Clark Williams , linux-kernel@vger.kernel.org, linux-perf-users@vger.kernel.org, Arnaldo Carvalho de Melo Subject: [PATCH 4/5] perf jitdump: Fixup in_pidns member when java agent and 'perf record' are not in the same pidns Date: Fri, 6 Dec 2024 17:48:27 -0300 Message-ID: <20241206204828.507527-5-acme@kernel.org> X-Mailer: git-send-email 2.47.0 In-Reply-To: <20241206204828.507527-1-acme@kernel.org> References: <20241206204828.507527-1-acme@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" From: Arnaldo Carvalho de Melo When running 'perf record' outside a container and the java agent inside a container the jit_repipe_code_load() and friends will emit PERF_RECORD_MMAP2 entries for the jitdump records and will check if we need to fixup the pid/tid: nspid =3D jr->load.pid; pid =3D jr_entry_pid(jd, jr); tid =3D jr_entry_tid(jd, jr); The jr_entry_pid() function looks if we're in the same pidns: static pid_t jr_entry_pid(struct jit_buf_desc *jd, union jr_entry *jr) { if (jd->nsi && nsinfo__in_pidns(jd->nsi)) return nsinfo__tgid(jd->nsi); return jr->load.pid; } But since the thread, populated from perf.data records, try to figure out if in the same pidns by actually trying, on the system where 'perf inject' is running to open a procfs file (a bug that remains to be fixed), assuming that if it is not possible that is because that thread terminated and thus we can't get its namespace info and tolerates nsinfo__init() failing, noting only that that namespace can't be entered, so don't even try. But we can kinda get at least that info (thread->nsinfo->in_pidns) from the data in the perf.data file, namely the pid and tid in the PERF_RECORD_MMAP2 for the jit-.dump file generated from the java agent, if the PERF_RECORD_MMAP2->pid is the same as what is in the jitdump file, then we're in the same namespace, otherwise we need to use the PERF_RECORD_MMAP2->pid. This all has to be revamped for this jitdump + running perf from outside, as the meaning of in_pidns is being abused, the initialization of nsinfo->pid with the value coming from the PERF_RECORD_MMAP2 data is wrong as it is the pid _outside_ the container since perf was running there. The hack in this patch at least produces the expected result in this scenario by following the assumptions in the current codebase for finding maps and for generating the PERF_RECORD_MMAP2 for the ELF files synthesized from the jitdump records in jit_repipe_code_load(), etc.s Reported-by: Francesco Nigro Reported-by: Ilan Green Cc: Adrian Hunter Cc: Ian Rogers Cc: James Clark Cc: Jiri Olsa Cc: Kan Liang Cc: Namhyung Kim Cc: Stephane Eranian Cc: Yonatan Goldschmidt Signed-off-by: Arnaldo Carvalho de Melo --- tools/perf/util/jitdump.c | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/tools/perf/util/jitdump.c b/tools/perf/util/jitdump.c index d53c6ac4095b663c..f23e21502bf8381a 100644 --- a/tools/perf/util/jitdump.c +++ b/tools/perf/util/jitdump.c @@ -737,7 +737,7 @@ jit_inject(struct jit_buf_desc *jd, const char *path) * as captured in the RECORD_MMAP record */ static int -jit_detect(const char *mmap_name, pid_t pid, struct nsinfo *nsi) +jit_detect(const char *mmap_name, pid_t pid, struct nsinfo *nsi, bool *in_= pidns) { char *p; char *end =3D NULL; @@ -773,11 +773,16 @@ jit_detect(const char *mmap_name, pid_t pid, struct n= sinfo *nsi) if (!end) return -1; =20 + *in_pidns =3D pid =3D=3D nsinfo__nstgid(nsi); /* * pid does not match mmap pid * pid=3D=3D0 in system-wide mode (synthesized) + * + * If the pid in the file name is equal to the nstgid, then + * the agent ran inside a container and perf outside the + * container, so record it for further use in jit_inject(). */ - if (pid && pid2 && pid !=3D nsinfo__nstgid(nsi)) + if (pid && !(pid2 =3D=3D pid || *in_pidns)) return -1; /* * validate suffix @@ -830,6 +835,7 @@ jit_process(struct perf_session *session, struct nsinfo *nsi; struct evsel *first; struct jit_buf_desc jd; + bool in_pidns =3D false; int ret; =20 thread =3D machine__findnew_thread(machine, pid, tid); @@ -844,7 +850,7 @@ jit_process(struct perf_session *session, /* * first, detect marker mmap (i.e., the jitdump mmap) */ - if (jit_detect(filename, pid, nsi)) { + if (jit_detect(filename, pid, nsi, &in_pidns)) { nsinfo__put(nsi); =20 /* @@ -866,6 +872,9 @@ jit_process(struct perf_session *session, jd.machine =3D machine; jd.nsi =3D nsi; =20 + if (in_pidns) + nsinfo__set_in_pidns(nsi); + /* * track sample_type to compute id_all layout * perf sets the same sample type to all events as of now --=20 2.47.0 From nobody Wed Dec 17 19:39:35 2025 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 7E27F20629E; Fri, 6 Dec 2024 20:49:01 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1733518141; cv=none; b=iZIQ0iDZG5WSnUGwja8TCGjd7Ek8Y0kEvBjG5Vw4G92xClL0EKFtRzpEp/8AlLFO1vO6gDAkbUxyUB/5Oej/VsT9K70gfj7SBwZPsw0cyL1ApYEhqG2s3gv3MITVoit858psLWAodBL2BK35H4YuEoyTqB6R8IXHU6iqSnlOxOo= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1733518141; c=relaxed/simple; bh=qs5MTe5EbBWsH8cCkewwpdPdfFM9D7tPgyDJ5fd16FQ=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=jSZl3Cpd6KefxIddtB2yUaxfuHcfnfVihqnr/rTGFj6x6nu2eA4GfwxWokhjwHAXe1VQoJBqhFkM4BolLbArLkj7zBGOZ2V4i5bC6/Km8gittI65Wnm9o9UxSoTcV9FftKw5uCDncgWu4epOqkod2H4enbee0Y3bqGvpFzcbOBY= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=ZdwILxht; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="ZdwILxht" Received: by smtp.kernel.org (Postfix) with ESMTPSA id D8DBCC4CED2; Fri, 6 Dec 2024 20:48:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1733518141; bh=qs5MTe5EbBWsH8cCkewwpdPdfFM9D7tPgyDJ5fd16FQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ZdwILxhtQSQLdOAdRvrpVk/Y1qsXnDk7PEHahUUqrvg9RM3TwRtJ4Dn4FnThvoLmX GNhPIIJRqLs7wdKd/yDuc6BIux3Fx/nxk8FVPoyUZEhiEeDsX4SncR/8t7977xm6le V09dTrHRVlSrMwjZfdfmVn5jOWgSrd/78CoZYZOiCeNob5j1OOkjhTho1AbHCDD7Kn U3yUK/tknceRyE5RoetcsCMaljf+jAyDeYvr80m7PrgcG1eMicJxqFssfBS6NAvYBh N2IECJfyFZHmjc7/e5NZ+EOsoWs78k4a4jY3sRiBY94LCbO5PxD+gvhAxdiD9XPWOn hm3GIGPUuobfg== From: Arnaldo Carvalho de Melo To: Stephane Eranian , Yonatan Goldschmidt Cc: Francesco Nigro , Ilan Green , Namhyung Kim , Ingo Molnar , Thomas Gleixner , James Clark , Jiri Olsa , Ian Rogers , Adrian Hunter , Kan Liang , Clark Williams , linux-kernel@vger.kernel.org, linux-perf-users@vger.kernel.org, Arnaldo Carvalho de Melo Subject: [PATCH 5/5] perf namespaces: Fixup the nsinfo__in_pidns() return type, its bool Date: Fri, 6 Dec 2024 17:48:28 -0300 Message-ID: <20241206204828.507527-6-acme@kernel.org> X-Mailer: git-send-email 2.47.0 In-Reply-To: <20241206204828.507527-1-acme@kernel.org> References: <20241206204828.507527-1-acme@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" From: Arnaldo Carvalho de Melo When adding support for refconunt checking a cut'n'paste made this function, that is just an accessor to a bool member of 'struct nsinfo', return a pid_t, when that member is a boolean, fix it. Fixes: bcaf0a97858de7ab ("perf namespaces: Add functions to access nsinfo") Reported-by: Francesco Nigro Reported-by: Ilan Green Cc: Adrian Hunter Cc: Ian Rogers Cc: James Clark Cc: Jiri Olsa Cc: Kan Liang Cc: Namhyung Kim Cc: Stephane Eranian Cc: Yonatan Goldschmidt Signed-off-by: Arnaldo Carvalho de Melo --- tools/perf/util/namespaces.c | 2 +- tools/perf/util/namespaces.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/perf/util/namespaces.c b/tools/perf/util/namespaces.c index 36047184d76e2f80..68f5de2d79c72c2c 100644 --- a/tools/perf/util/namespaces.c +++ b/tools/perf/util/namespaces.c @@ -266,7 +266,7 @@ pid_t nsinfo__pid(const struct nsinfo *nsi) return RC_CHK_ACCESS(nsi)->pid; } =20 -pid_t nsinfo__in_pidns(const struct nsinfo *nsi) +bool nsinfo__in_pidns(const struct nsinfo *nsi) { return RC_CHK_ACCESS(nsi)->in_pidns; } diff --git a/tools/perf/util/namespaces.h b/tools/perf/util/namespaces.h index e014becb9cd8eb3a..e95c79b80e27c8fc 100644 --- a/tools/perf/util/namespaces.h +++ b/tools/perf/util/namespaces.h @@ -58,7 +58,7 @@ void nsinfo__clear_need_setns(struct nsinfo *nsi); pid_t nsinfo__tgid(const struct nsinfo *nsi); pid_t nsinfo__nstgid(const struct nsinfo *nsi); pid_t nsinfo__pid(const struct nsinfo *nsi); -pid_t nsinfo__in_pidns(const struct nsinfo *nsi); +bool nsinfo__in_pidns(const struct nsinfo *nsi); void nsinfo__set_in_pidns(struct nsinfo *nsi); =20 void nsinfo__mountns_enter(struct nsinfo *nsi, struct nscookie *nc); --=20 2.47.0