<?xml version="1.0"?>
<?xml-stylesheet type="text/xsl" href="/rss.xsl.xml"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/">
<channel>
    <title>Changes in disasm.c</title>
    <description></description>
    <language>en</language>
    <copyright>Copyright 2015</copyright>
    <generator>Java</generator><item>
        <title>4c3f09e3 - perf annotate: Return errors from disasm_line__parse_powerpc()</title>
        <link>http://172.16.0.5:8080/history/linux-6.15/tools/perf/util/disasm.c#4c3f09e3</link>
        <description>perf annotate: Return errors from disasm_line__parse_powerpc()In disasm_line__parse_powerpc() , return code from functiondisasm_line__parse() is ignored. This will result in bad resultsif the disasm_line__parse() fails to disasm the line. Usethe return code to fix this.Signed-off-by: Athira Rajeev &lt;atrajeev@linux.ibm.com&gt;Tested-By: Venkat Rao Bagalkote &lt;venkat88@linux.ibm.com&gt;Link: https://lore.kernel.org/r/20250304154114.62093-2-atrajeev@linux.ibm.comSigned-off-by: Namhyung Kim &lt;namhyung@kernel.org&gt;

            List of files:
            /linux-6.15/tools/perf/util/disasm.c</description>
        <pubDate>Tue, 04 Mar 2025 15:41:14 +0000</pubDate>
        <dc:creator>Athira Rajeev &lt;atrajeev@linux.ibm.com&gt;</dc:creator>
    </item>
<item>
        <title>dab8c32e - perf annotate: Add annotation_options.disassembler_used</title>
        <link>http://172.16.0.5:8080/history/linux-6.15/tools/perf/util/disasm.c#dab8c32e</link>
        <description>perf annotate: Add annotation_options.disassembler_usedWhen doing &quot;perf annotate&quot;, perf tool provides option touse specific disassembler like llvm/objdump/capstone. Theorder picked is to use llvm first and if that fails fallbackto objdump ie to use PERF_DISASM_LLVM, PERF_DISASM_CAPSTONEand PERF_DISASM_OBJDUMPIn powerpc, when using &quot;data type&quot; sort keys, first preferredapproach is to read the raw instruction from the DSO. In objdumpis specified in &quot;--objdump&quot; option, it picks the symbol disassembleusing objdump. Currently disasm_line__parse_powerpc() functionuses length of the &quot;line&quot; to determine if objdump is used.But there are few cases, where if objdump doesn&apos;t recognise theinstruction, the disassembled string will be empty.Example:     134cdc:	c4 05 82 41 	beq     1352a0 &lt;getcwd+0x6e0&gt;     134ce0:	ac 00 8e 40 	bne     cr3,134d8c &lt;getcwd+0x1cc&gt;     134ce4:	0f 00 10 04 	pld     r9,1028308====&gt;134ce8:	d4 b0 20 e5     134cec:	16 00 40 39 	li      r10,22     134cf0:	48 01 21 ea 	ld      r17,328(r1)So depending on length of line will give bad results.Add a new filed to annotation options structure,&quot;struct annotation_options&quot; to save the disassembler used.Use this info to determine if disassembly is done whileparsing the disasm line.Reported-by: Tejas Manhas &lt;Tejas.Manhas1@ibm.com&gt;Signed-off-by: Athira Rajeev &lt;atrajeev@linux.ibm.com&gt;Tested-By: Venkat Rao Bagalkote &lt;venkat88@linux.ibm.com&gt;Link: https://lore.kernel.org/r/20250304154114.62093-1-atrajeev@linux.ibm.comSigned-off-by: Namhyung Kim &lt;namhyung@kernel.org&gt;

            List of files:
            /linux-6.15/tools/perf/util/disasm.c</description>
        <pubDate>Tue, 04 Mar 2025 15:41:13 +0000</pubDate>
        <dc:creator>Athira Rajeev &lt;atrajeev@linux.ibm.com&gt;</dc:creator>
    </item>
<item>
        <title>bde4ccfd - perf annotate: Use an array for the disassembler preference</title>
        <link>http://172.16.0.5:8080/history/linux-6.15/tools/perf/util/disasm.c#bde4ccfd</link>
        <description>perf annotate: Use an array for the disassembler preferencePrior to this change a string was used which could cause issues withan unrecognized disassembler in symbol__disassembler. Change toinitializing an array of perf_disassembler enum values. If a valuealready exists then adding it a second time is ignored to avoid arrayout of bounds problems present in the previous code, it also allows astatically sized array and removes memory allocation needs. Errors inthe disassembler string are reported when the config is parsed duringperf annotate or perf top start up. If the array is uninitializedafter processing the config file the default llvm, capstone thenobjdump values are added but without a need to parse a string.Fixes: a6e8a58de629 (&quot;perf disasm: Allow configuring what disassemblers to use&quot;)Closes: https://lore.kernel.org/lkml/CAP-5=fUdfCyxmEiTpzS2uumUp3-SyQOseX2xZo81-dQtWXj6vA@mail.gmail.com/Signed-off-by: Ian Rogers &lt;irogers@google.com&gt;Tested-by: Namhyung Kim &lt;namhyung@kernel.org&gt;Link: https://lore.kernel.org/r/20250124043856.1177264-1-irogers@google.comSigned-off-by: Namhyung Kim &lt;namhyung@kernel.org&gt;

            List of files:
            /linux-6.15/tools/perf/util/disasm.c</description>
        <pubDate>Fri, 24 Jan 2025 04:38:56 +0000</pubDate>
        <dc:creator>Ian Rogers &lt;irogers@google.com&gt;</dc:creator>
    </item>
<item>
        <title>b2b95a2d - perf disasm: Return a proper error when not determining the file type</title>
        <link>http://172.16.0.5:8080/history/linux-6.15/tools/perf/util/disasm.c#b2b95a2d</link>
        <description>perf disasm: Return a proper error when not determining the file typeBefore:  &#11042; [acme@toolbox a]$ perf annotate --stdio2 -i acme-perf-injected.data &apos;java.lang.String com.fasterxml.jackson.core.sym.CharsToNameCanonicalizer.findSymbol(char[], int, int, int)&apos;  Error:  Couldn&apos;t annotate java.lang.String com.fasterxml.jackson.core.sym.CharsToNameCanonicalizer.findSymbol(char[], int, int, int):  Internal error: Invalid -1 error code  &#11042; [acme@toolbox a]$After:  &#11042; [acme@toolbox a]$ perf annotate --stdio2 -i acme-perf-injected.data &apos;java.lang.String com.fasterxml.jackson.core.sym.CharsToNameCanonicalizer.findSymbol(char[], int, int, int)&apos;  Error:  Couldn&apos;t annotate java.lang.String com.fasterxml.jackson.core.sym.CharsToNameCanonicalizer.findSymbol(char[], int, int, int):  Couldn&apos;t determine the file /tmp/perf-3308868.map type.  &#11042; [acme@toolbox a]$Reported-by: Francesco Nigro &lt;fnigro@redhat.com&gt;Reported-by: Ilan Green &lt;igreen@redhat.com&gt;Cc: Adrian Hunter &lt;adrian.hunter@intel.com&gt;Cc: Ian Rogers &lt;irogers@google.com&gt;Cc: James Clark &lt;james.clark@linaro.org&gt;Cc: Jiri Olsa &lt;jolsa@kernel.org&gt;Cc: Kan Liang &lt;kan.liang@linux.intel.com&gt;Cc: Namhyung Kim &lt;namhyung@kernel.org&gt;Cc: Stephane Eranian &lt;eranian@google.com&gt;Cc: Yonatan Goldschmidt &lt;yonatan.goldschmidt@granulate.io&gt;Link: https://lore.kernel.org/lkml/Z092D9-r_iOgwIWM@x1Signed-off-by: Arnaldo Carvalho de Melo &lt;acme@redhat.com&gt;

            List of files:
            /linux-6.15/tools/perf/util/disasm.c</description>
        <pubDate>Fri, 29 Nov 2024 15:20:39 +0000</pubDate>
        <dc:creator>Arnaldo Carvalho de Melo &lt;acme@redhat.com&gt;</dc:creator>
    </item>
<item>
        <title>a6e8a58d - perf disasm: Allow configuring what disassemblers to use</title>
        <link>http://172.16.0.5:8080/history/linux-6.15/tools/perf/util/disasm.c#a6e8a58d</link>
        <description>perf disasm: Allow configuring what disassemblers to useThe perf tools annotation code used for a long time parsing the outputof binutils&apos;s objdump (or its reimplementations, like llvm&apos;s) to thenparse and augment it with samples, allow navigation, etc.More recently disassemblers from the capstone and llvm (libraries, notparsing the output of tools using those libraries to mimic binutils&apos;sobjdump output) were introduced.So when all those methods are available, there is a static preferencefor a series of attempts of disassembling a binary, with the &apos;llvm,capstone, objdump&apos; sequence being hard coded.This patch allows users to change that sequence, specifying via a &apos;perfconfig&apos; &apos;annotate.disassemblers&apos; entry which and in what orderdisassemblers should be attempted.As alluded to in the comments in the source code of this series, thisflexibility is useful for users and developers alike, elliminating therequirement to rebuild the tool with some specific set of libraries tosee how the output of disassembling would be for one of these methods.  root@x1:~# rm -f ~/.perfconfig  root@x1:~# perf annotate -v --stdio2 update_load_avg  &lt;SNIP&gt;  symbol__disassemble:    filename=/usr/lib/debug/lib/modules/6.11.4-201.fc40.x86_64/vmlinux,    sym=update_load_avg, start=0xffffffffb6148fe0, en&gt;  annotating [0x6ff7170]    /usr/lib/debug/lib/modules/6.11.4-201.fc40.x86_64/vmlinux :    [0x7407ca0] update_load_avg  Disassembled with llvm  annotate.disassemblers=llvm,capstone,objdump  Samples: 66  of event &apos;cpu_atom/cycles/P&apos;, 10000 Hz,	Event count (approx.): 5185444, [percent: local period]  update_load_avg()    /usr/lib/debug/lib/modules/6.11.4-201.fc40.x86_64/vmlinux  Percent       0xffffffff81148fe0 &lt;update_load_avg&gt;:     1.61         pushq   %r15                  pushq   %r14     1.00         pushq   %r13                  movl    %edx,%r13d     1.90         pushq   %r12                  pushq   %rbp                  movq    %rsi,%rbp                  pushq   %rbx                  movq    %rdi,%rbx                  subq    $0x18,%rsp    15.14         movl    0x1a4(%rdi),%eax  root@x1:~# perf config annotate.disassemblers=capstone  root@x1:~# cat ~/.perfconfig  # this file is auto-generated.  [annotate]	  disassemblers = capstone  root@x1:~#  root@x1:~# perf annotate -v --stdio2 update_load_avg  &lt;SNIP&gt;  Disassembled with capstone  annotate.disassemblers=capstone  Samples: 66  of event &apos;cpu_atom/cycles/P&apos;, 10000 Hz,  Event count (approx.): 5185444, [percent: local period]  update_load_avg()  /usr/lib/debug/lib/modules/6.11.4-201.fc40.x86_64/vmlinux  Percent       0xffffffff81148fe0 &lt;update_load_avg&gt;:     1.61         pushq   %r15                  pushq   %r14     1.00         pushq   %r13                  movl    %edx,%r13d     1.90         pushq   %r12                  pushq   %rbp                  movq    %rsi,%rbp                  pushq   %rbx                  movq    %rdi,%rbx                  subq    $0x18,%rsp    15.14         movl    0x1a4(%rdi),%eax  root@x1:~# perf config annotate.disassemblers=objdump,capstone  root@x1:~# perf config annotate.disassemblers  annotate.disassemblers=objdump,capstone  root@x1:~# cat ~/.perfconfig  # this file is auto-generated.  [annotate]	  disassemblers = objdump,capstone  root@x1:~# perf annotate -v --stdio2 update_load_avg  Executing: objdump  --start-address=0xffffffff81148fe0 \		      --stop-address=0xffffffff811497aa  \		      -d --no-show-raw-insn -S -C &quot;$1&quot;  Disassembled with objdump  annotate.disassemblers=objdump,capstone  Samples: 66  of event &apos;cpu_atom/cycles/P&apos;, 10000 Hz,  Event count (approx.): 5185444, [percent: local period]  update_load_avg()  /usr/lib/debug/lib/modules/6.11.4-201.fc40.x86_64/vmlinux  Percent                Disassembly of section .text:                ffffffff81148fe0 &lt;update_load_avg&gt;:                #define DO_ATTACH       0x4                ffffffff81148fe0 &lt;update_load_avg&gt;:                #define DO_ATTACH       0x4                #define DO_DETACH       0x8                /* Update task and its cfs_rq load average */                static inline void update_load_avg(struct cfs_rq *cfs_rq,						   struct sched_entity *se,						   int flags)                {     1.61         push   %r15                  push   %r14     1.00         push   %r13                  mov    %edx,%r13d     1.90         push   %r12                  push   %rbp                  mov    %rsi,%rbp                  push   %rbx                  mov    %rdi,%rbx                  sub    $0x18,%rsp                }                /* rq-&gt;task_clock normalized against any time		   this cfs_rq has spent throttled */                static inline u64 cfs_rq_clock_pelt(struct cfs_rq *cfs_rq)                {                if (unlikely(cfs_rq-&gt;throttle_count))    15.14         mov    0x1a4(%rdi),%eax  root@x1:~#After adding a way to select the disassembler from the command line a&apos;perf test&apos; comparing the output of the various diassemblers should beintroduced, to test these codebases.Acked-by: Ian Rogers &lt;irogers@google.com&gt;Cc: Adrian Hunter &lt;adrian.hunter@intel.com&gt;Cc: Athira Rajeev &lt;atrajeev@linux.vnet.ibm.com&gt;Cc: Jiri Olsa &lt;jolsa@kernel.org&gt;Cc: Kan Liang &lt;kan.liang@linux.intel.com&gt;Cc: Namhyung Kim &lt;namhyung@kernel.org&gt;Cc: Steinar H. Gunderson &lt;sesse@google.com&gt;Link: https://lore.kernel.org/r/20241111151734.1018476-4-acme@kernel.orgSigned-off-by: Arnaldo Carvalho de Melo &lt;acme@redhat.com&gt;

            List of files:
            /linux-6.15/tools/perf/util/disasm.c</description>
        <pubDate>Mon, 11 Nov 2024 15:17:34 +0000</pubDate>
        <dc:creator>Arnaldo Carvalho de Melo &lt;acme@redhat.com&gt;</dc:creator>
    </item>
<item>
        <title>1f7393ad - perf disasm: Define stubs for the LLVM and capstone disassemblers</title>
        <link>http://172.16.0.5:8080/history/linux-6.15/tools/perf/util/disasm.c#1f7393ad</link>
        <description>perf disasm: Define stubs for the LLVM and capstone disassemblersThis reduces the number of ifdefs in the main symbol__disassemble()method and paves the way for allowing the user to configure thedisassemblers of preference.Acked-by: Ian Rogers &lt;irogers@google.com&gt;Cc: Adrian Hunter &lt;adrian.hunter@intel.com&gt;Cc: Aditya Bodkhe &lt;Aditya.Bodkhe1@ibm.com&gt;Cc: Athira Rajeev &lt;atrajeev@linux.vnet.ibm.com&gt;Cc: Jiri Olsa &lt;jolsa@kernel.org&gt;Cc: Kan Liang &lt;kan.liang@linux.intel.com&gt;Cc: Masami Hiramatsu (Google) &lt;mhiramat@kernel.org&gt;Cc: Namhyung Kim &lt;namhyung@kernel.org&gt;Cc: Steinar H. Gunderson &lt;sesse@google.com&gt;Link: https://lore.kernel.org/r/20241111151734.1018476-3-acme@kernel.org[ Applied fixes from Masami Hiramatsu and Aditya Bodkhe for when capstone devel files are not available ]Link: https://lore.kernel.org/r/B78FB6DF-24E9-4A3C-91C9-535765EC0E2A@ibm.comLink: https://lore.kernel.org/r/173145729034.2747044.453926054000880254.stgit@mhiramat.roam.corp.google.comSigned-off-by: Arnaldo Carvalho de Melo &lt;acme@redhat.com&gt;

            List of files:
            /linux-6.15/tools/perf/util/disasm.c</description>
        <pubDate>Mon, 11 Nov 2024 15:17:33 +0000</pubDate>
        <dc:creator>Arnaldo Carvalho de Melo &lt;acme@redhat.com&gt;</dc:creator>
    </item>
<item>
        <title>4c1d8f05 - perf disasm: Introduce symbol__disassemble_objdump()</title>
        <link>http://172.16.0.5:8080/history/linux-6.15/tools/perf/util/disasm.c#4c1d8f05</link>
        <description>perf disasm: Introduce symbol__disassemble_objdump()With the first disassemble method in perf, the parsing of objdumpoutput, just like we have for llvm and capstone.This paves the way to allow the user to specify what disassemblers arepreferred and to also to at some point allow building without theobjdump method.Acked-by: Ian Rogers &lt;irogers@google.com&gt;Cc: Adrian Hunter &lt;adrian.hunter@intel.com&gt;Cc: Athira Rajeev &lt;atrajeev@linux.vnet.ibm.com&gt;Cc: Jiri Olsa &lt;jolsa@kernel.org&gt;Cc: Kan Liang &lt;kan.liang@linux.intel.com&gt;Cc: Namhyung Kim &lt;namhyung@kernel.org&gt;Cc: Steinar H. Gunderson &lt;sesse@google.com&gt;Link: https://lore.kernel.org/r/20241111151734.1018476-2-acme@kernel.orgSigned-off-by: Arnaldo Carvalho de Melo &lt;acme@redhat.com&gt;

            List of files:
            /linux-6.15/tools/perf/util/disasm.c</description>
        <pubDate>Mon, 11 Nov 2024 15:17:32 +0000</pubDate>
        <dc:creator>Arnaldo Carvalho de Melo &lt;acme@redhat.com&gt;</dc:creator>
    </item>
<item>
        <title>ae894b77 - perf dwarf-regs: Add EM_HOST and EF_HOST defines</title>
        <link>http://172.16.0.5:8080/history/linux-6.15/tools/perf/util/disasm.c#ae894b77</link>
        <description>perf dwarf-regs: Add EM_HOST and EF_HOST definesComputed from the build architecture defines, EM_HOST and EF_HOST givevalues that can be used in dwarf register lookup. Place indwarf-regs.h so the value can be shared. Move some dwarf-regs.cconstants used for EM_HOST to dwarf-regs.h. Add CSky constants thatmay be missing.In disasm.c add an include of dwarf-regs.h as the includedarch/*/annotate/instructions.c files make use of the constants and wewant the elf.h/dwarf-regs.h dependency to be explicit.Reviewed-by: Masami Hiramatsu (Google) &lt;mhiramat@kernel.org&gt;Signed-off-by: Ian Rogers &lt;irogers@google.com&gt;Cc: Anup Patel &lt;anup@brainfault.org&gt;Cc: Yang Jihong &lt;yangjihong@bytedance.com&gt;Cc: Palmer Dabbelt &lt;palmer@dabbelt.com&gt;Cc: David S. Miller &lt;davem@davemloft.net&gt;Cc: Albert Ou &lt;aou@eecs.berkeley.edu&gt;Cc: Shenlin Liang &lt;liangshenlin@eswincomputing.com&gt;Cc: Nick Terrell &lt;terrelln@fb.com&gt;Cc: Guilherme Amadio &lt;amadio@gentoo.org&gt;Cc: Steinar H. Gunderson &lt;sesse@google.com&gt;Cc: Changbin Du &lt;changbin.du@huawei.com&gt;Cc: Alexander Lobakin &lt;aleksander.lobakin@intel.com&gt;Cc: Przemek Kitszel &lt;przemyslaw.kitszel@intel.com&gt;Cc: Huacai Chen &lt;chenhuacai@kernel.org&gt;Cc: Guo Ren &lt;guoren@kernel.org&gt;Cc: Masahiro Yamada &lt;masahiroy@kernel.org&gt;Cc: Will Deacon &lt;will@kernel.org&gt;Cc: James Clark &lt;james.clark@linaro.org&gt;Cc: Mike Leach &lt;mike.leach@linaro.org&gt;Cc: Chen Pei &lt;cp0613@linux.alibaba.com&gt;Cc: Leo Yan &lt;leo.yan@linux.dev&gt;Cc: Oliver Upton &lt;oliver.upton@linux.dev&gt;Cc: Aditya Gupta &lt;adityag@linux.ibm.com&gt;Cc: Kajol Jain &lt;kjain@linux.ibm.com&gt;Cc: Athira Rajeev &lt;atrajeev@linux.vnet.ibm.com&gt;Cc: linux-arm-kernel@lists.infradead.orgCc: linux-riscv@lists.infradead.orgCc: Bibo Mao &lt;maobibo@loongson.cn&gt;Cc: John Garry &lt;john.g.garry@oracle.com&gt;Cc: Atish Patra &lt;atishp@rivosinc.com&gt;Cc: Dima Kogan &lt;dima@secretsauce.net&gt;Cc: Paul Walmsley &lt;paul.walmsley@sifive.com&gt;Cc: Dr. David Alan Gilbert &lt;linux@treblig.org&gt;Cc: linux-csky@vger.kernel.orgLink: https://lore.kernel.org/r/20241108234606.429459-4-irogers@google.comSigned-off-by: Namhyung Kim &lt;namhyung@kernel.org&gt;

            List of files:
            /linux-6.15/tools/perf/util/disasm.c</description>
        <pubDate>Fri, 08 Nov 2024 23:45:48 +0000</pubDate>
        <dc:creator>Ian Rogers &lt;irogers@google.com&gt;</dc:creator>
    </item>
<item>
        <title>150dab31 - perf disasm: Fix not cleaning up disasm_line in symbol__disassemble_raw()</title>
        <link>http://172.16.0.5:8080/history/linux-6.15/tools/perf/util/disasm.c#150dab31</link>
        <description>perf disasm: Fix not cleaning up disasm_line in symbol__disassemble_raw()In symbol__disassemble_raw(), the created disasm_line should bediscarded before returning an error. When creating disasm_line fails,break the loop and then release the created lines.Fixes: 0b971e6bf1c3 (&quot;perf annotate: Add support to capture and parse raw instruction in powerpc using dso__data_read_offset utility&quot;)Signed-off-by: Li Huafei &lt;lihuafei1@huawei.com&gt;Tested-by: Athira Rajeev &lt;atrajeev@linux.vnet.ibm.com&gt;Cc: sesse@google.comCc: kjain@linux.ibm.comLink: https://lore.kernel.org/r/20241019154157.282038-3-lihuafei1@huawei.comSigned-off-by: Namhyung Kim &lt;namhyung@kernel.org&gt;

            List of files:
            /linux-6.15/tools/perf/util/disasm.c</description>
        <pubDate>Sat, 19 Oct 2024 15:41:57 +0000</pubDate>
        <dc:creator>Li Huafei &lt;lihuafei1@huawei.com&gt;</dc:creator>
    </item>
<item>
        <title>908d50e5 - perf disasm: Use disasm_line__free() to properly free disasm_line</title>
        <link>http://172.16.0.5:8080/history/linux-6.15/tools/perf/util/disasm.c#908d50e5</link>
        <description>perf disasm: Use disasm_line__free() to properly free disasm_linesymbol__disassemble_capstone_powerpc() goto the &apos;err&apos; label when itfailed in the loop that created disasm_line, and then used free()directly to free disasm_line. Since the structure disasm_line containsmembers that allocate memory dynamically, this can result in a memoryleak. In fact, we can simply break the loop when it fails in the middleof the loop, and disasm_line__free() will then be called to properlyfree the created line. Other error paths do not need to consider freeingdisasm_line.Fixes: c5d60de1813a (&quot;perf annotate: Add support to use libcapstone in powerpc&quot;)Signed-off-by: Li Huafei &lt;lihuafei1@huawei.com&gt;Tested-by: Athira Rajeev &lt;atrajeev@linux.vnet.ibm.com&gt;Cc: sesse@google.comCc: kjain@linux.ibm.comLink: https://lore.kernel.org/r/20241019154157.282038-2-lihuafei1@huawei.comSigned-off-by: Namhyung Kim &lt;namhyung@kernel.org&gt;

            List of files:
            /linux-6.15/tools/perf/util/disasm.c</description>
        <pubDate>Sat, 19 Oct 2024 15:41:56 +0000</pubDate>
        <dc:creator>Li Huafei &lt;lihuafei1@huawei.com&gt;</dc:creator>
    </item>
<item>
        <title>b4e0e9a1 - perf disasm: Use disasm_line__free() to properly free disasm_line</title>
        <link>http://172.16.0.5:8080/history/linux-6.15/tools/perf/util/disasm.c#b4e0e9a1</link>
        <description>perf disasm: Use disasm_line__free() to properly free disasm_lineThe structure disasm_line contains members that require dynamicallyallocated memory and need to be freed correctly usingdisasm_line__free().This patch fixes the incorrect release insymbol__disassemble_capstone().Fixes: 6d17edc113de (&quot;perf annotate: Use libcapstone to disassemble&quot;)Signed-off-by: Li Huafei &lt;lihuafei1@huawei.com&gt;Tested-by: Athira Rajeev &lt;atrajeev@linux.vnet.ibm.com&gt;Cc: sesse@google.comCc: kjain@linux.ibm.comLink: https://lore.kernel.org/r/20241019154157.282038-1-lihuafei1@huawei.comSigned-off-by: Namhyung Kim &lt;namhyung@kernel.org&gt;

            List of files:
            /linux-6.15/tools/perf/util/disasm.c</description>
        <pubDate>Sat, 19 Oct 2024 15:41:55 +0000</pubDate>
        <dc:creator>Li Huafei &lt;lihuafei1@huawei.com&gt;</dc:creator>
    </item>
<item>
        <title>8838abf6 - perf build: Rename HAVE_DWARF_SUPPORT to HAVE_LIBDW_SUPPORT</title>
        <link>http://172.16.0.5:8080/history/linux-6.15/tools/perf/util/disasm.c#8838abf6</link>
        <description>perf build: Rename HAVE_DWARF_SUPPORT to HAVE_LIBDW_SUPPORTIn Makefile.config for unwinding the name dwarf implies eitherlibunwind or libdw. Make it clearer that HAVE_DWARF_SUPPORT is reallyjust defined when libdw is present by renaming to HAVE_LIBDW_SUPPORT.Signed-off-by: Ian Rogers &lt;irogers@google.com&gt;Acked-by: Namhyung Kim &lt;namhyung@kernel.org&gt;Tested-by: Leo Yan &lt;leo.yan@arm.com&gt;Cc: Anup Patel &lt;anup@brainfault.org&gt;Cc: Yang Jihong &lt;yangjihong@bytedance.com&gt;Cc: Palmer Dabbelt &lt;palmer@dabbelt.com&gt;Cc: David S. Miller &lt;davem@davemloft.net&gt;Cc: Albert Ou &lt;aou@eecs.berkeley.edu&gt;Cc: Shenlin Liang &lt;liangshenlin@eswincomputing.com&gt;Cc: Nick Terrell &lt;terrelln@fb.com&gt;Cc: Guilherme Amadio &lt;amadio@gentoo.org&gt;Cc: Steinar H. Gunderson &lt;sesse@google.com&gt;Cc: Changbin Du &lt;changbin.du@huawei.com&gt;Cc: Alexander Lobakin &lt;aleksander.lobakin@intel.com&gt;Cc: Przemek Kitszel &lt;przemyslaw.kitszel@intel.com&gt;Cc: Huacai Chen &lt;chenhuacai@kernel.org&gt;Cc: Guo Ren &lt;guoren@kernel.org&gt;Cc: Masahiro Yamada &lt;masahiroy@kernel.org&gt;Cc: Masami Hiramatsu (Google) &lt;mhiramat@kernel.org&gt;Cc: Will Deacon &lt;will@kernel.org&gt;Cc: James Clark &lt;james.clark@linaro.org&gt;Cc: Mike Leach &lt;mike.leach@linaro.org&gt;Cc: Chen Pei &lt;cp0613@linux.alibaba.com&gt;Cc: Leo Yan &lt;leo.yan@linux.dev&gt;Cc: Oliver Upton &lt;oliver.upton@linux.dev&gt;Cc: Aditya Gupta &lt;adityag@linux.ibm.com&gt;Cc: Kajol Jain &lt;kjain@linux.ibm.com&gt;Cc: Athira Rajeev &lt;atrajeev@linux.vnet.ibm.com&gt;Cc: linux-arm-kernel@lists.infradead.orgCc: linux-riscv@lists.infradead.orgCc: Bibo Mao &lt;maobibo@loongson.cn&gt;Cc: John Garry &lt;john.g.garry@oracle.com&gt;Cc: Atish Patra &lt;atishp@rivosinc.com&gt;Cc: Dima Kogan &lt;dima@secretsauce.net&gt;Cc: Paul Walmsley &lt;paul.walmsley@sifive.com&gt;Cc: Dr. David Alan Gilbert &lt;linux@treblig.org&gt;Cc: linux-csky@vger.kernel.orgLink: https://lore.kernel.org/r/20241017001354.56973-11-irogers@google.comSigned-off-by: Namhyung Kim &lt;namhyung@kernel.org&gt;

            List of files:
            /linux-6.15/tools/perf/util/disasm.c</description>
        <pubDate>Thu, 17 Oct 2024 00:13:53 +0000</pubDate>
        <dc:creator>Ian Rogers &lt;irogers@google.com&gt;</dc:creator>
    </item>
<item>
        <title>1280f012 - perf disasm: Fix capstone memory leak</title>
        <link>http://172.16.0.5:8080/history/linux-6.15/tools/perf/util/disasm.c#1280f012</link>
        <description>perf disasm: Fix capstone memory leakThe insn argument passed to cs_disasm needs freeing. To supportaccurately having count, add an additional free_count variable.Fixes: c5d60de1813a (&quot;perf annotate: Add support to use libcapstone in powerpc&quot;)Signed-off-by: Ian Rogers &lt;irogers@google.com&gt;Reviewed-by: James Clark &lt;james.clark@linaro.org&gt;Cc: David S. Miller &lt;davem@davemloft.net&gt;Cc: Steinar H. Gunderson &lt;sesse@google.com&gt;Cc: Alexander Lobakin &lt;aleksander.lobakin@intel.com&gt;Cc: Masami Hiramatsu (Google) &lt;mhiramat@kernel.org&gt;Cc: Kajol Jain &lt;kjain@linux.ibm.com&gt;Cc: Athira Rajeev &lt;atrajeev@linux.vnet.ibm.com&gt;Cc: Hemant Kumar &lt;hemant@linux.vnet.ibm.com&gt;Link: https://lore.kernel.org/r/20241016235622.52166-2-irogers@google.comSigned-off-by: Namhyung Kim &lt;namhyung@kernel.org&gt;

            List of files:
            /linux-6.15/tools/perf/util/disasm.c</description>
        <pubDate>Wed, 16 Oct 2024 23:56:21 +0000</pubDate>
        <dc:creator>Ian Rogers &lt;irogers@google.com&gt;</dc:creator>
    </item>
<item>
        <title>04885681 - perf annotate: LLVM-based disassembler</title>
        <link>http://172.16.0.5:8080/history/linux-6.15/tools/perf/util/disasm.c#04885681</link>
        <description>perf annotate: LLVM-based disassemblerSupport using LLVM as a disassembler method, allowing helperlessannotation in non-distro builds. (It is also much faster thanusing libbfd or bfd objdump on binaries with a lot of debuginformation.)This is nearly identical to the output of llvm-objdump; there aresome very rare whitespace differences, some minor changes to demangling(since we use perf&apos;s regular demangling and not LLVM&apos;s own) andthe occasional case where llvm-objdump makes a different choicewhen multiple symbols share the same address.It should work across all of LLVM&apos;s supported architectures, althoughI&apos;ve only tested 64-bit x86, and finding the right triple from perf&apos;sidea of machine architecture can sometimes be a bit tricky. Ideally, weshould have some way of finding the triplet just from the file itself.Committer notes:Address this on 32-bit systems by using PRIu64 from inttypes.h     3    17.58 almalinux:9-i386              : FAIL gcc version 11.4.1 20231218 (Red Hat 11.4.1-3) (GCC)      util/llvm-c-helpers.cpp: In function &#8216;char* make_symbol_relative_string(dso*, const char*, u64, u64)&#8217;:      util/llvm-c-helpers.cpp:150:52: error: format &#8216;%lx&#8217; expects argument of type &#8216;long unsigned int&#8217;, but argument 5 has type &#8216;u64&#8217; {aka  +&#8216;long long unsigned int&#8217;} [-Werror=format=]        150 |                 snprintf(buf, sizeof(buf), &quot;%s+0x%lx&quot;,            |                                                  ~~^            |                                                    |            |                                                    long unsigned int            |                                                  %llx        151 |                          demangled ? demangled : sym_name, addr - base_addr);            |                                                            ~~~~~~~~~~~~~~~~            |                                                                 |            |                                                                 u64 {aka long long unsigned int}      cc1plus: all warnings being treated as errorsSigned-off-by: Steinar H. Gunderson &lt;sesse@google.com&gt;Cc: Ian Rogers &lt;irogers@google.com&gt;Link: https://lore.kernel.org/r/20240803152008.2818485-3-sesse@google.comSigned-off-by: Arnaldo Carvalho de Melo &lt;acme@redhat.com&gt;

            List of files:
            /linux-6.15/tools/perf/util/disasm.c</description>
        <pubDate>Sat, 03 Aug 2024 15:20:08 +0000</pubDate>
        <dc:creator>Steinar H. Gunderson &lt;sesse@google.com&gt;</dc:creator>
    </item>
<item>
        <title>6eca7c5a - perf annotate: Split out read_symbol()</title>
        <link>http://172.16.0.5:8080/history/linux-6.15/tools/perf/util/disasm.c#6eca7c5a</link>
        <description>perf annotate: Split out read_symbol()The Capstone disassembler code has a useful code snippet to read thebytes for a given code symbol into memory. Split it out into its ownfunction, so that the LLVM disassembler can use it in the next patch.Signed-off-by: Steinar H. Gunderson &lt;sesse@google.com&gt;Cc: Ian Rogers &lt;irogers@google.com&gt;Link: https://lore.kernel.org/r/20240803152008.2818485-2-sesse@google.comSigned-off-by: Arnaldo Carvalho de Melo &lt;acme@redhat.com&gt;

            List of files:
            /linux-6.15/tools/perf/util/disasm.c</description>
        <pubDate>Sat, 03 Aug 2024 15:20:07 +0000</pubDate>
        <dc:creator>Steinar H. Gunderson &lt;sesse@google.com&gt;</dc:creator>
    </item>
<item>
        <title>e6952dce - perf annotate: Display the branch counter histogram</title>
        <link>http://172.16.0.5:8080/history/linux-6.15/tools/perf/util/disasm.c#e6952dce</link>
        <description>perf annotate: Display the branch counter histogramDisplay the branch counter histogram in the annotation view.Press &apos;B&apos; to display the branch counter&apos;s abbreviation list as well.  Samples: 1M of events &apos;anon group { branch-instructions:ppp, branch-misses }&apos;,  4000 Hz, Event count (approx.):  f3  /home/sdp/test/tchain_edit [Percent: local period]  Percent       &#9474; IPC Cycle       Branch Counter (Average IPC: 1.39, IPC Coverage: 29.4%)                &#9474;                                     0000000000401755 &lt;f3&gt;:    0.00   0.00 &#9474;                                       endbr64                &#9474;                                       push    %rbp                &#9474;                                       mov     %rsp,%rbp                &#9474;                                       movl    $0x0,-0x4(%rbp)    0.00   0.00 &#9474;1.33     3          |A   |-   |      &#8595; jmp     25   11.03  11.03 &#9474;                                 11:   mov     -0x4(%rbp),%eax                &#9474;                                       and     $0x1,%eax                &#9474;                                       test    %eax,%eax   17.13  17.13 &#9474;2.41     1          |A   |-   |      &#8595; je      21                &#9474;                                       addl    $0x1,-0x4(%rbp)   21.84  21.84 &#9474;2.22     2          |AA  |-   |      &#8595; jmp     25   17.13  17.13 &#9474;                                 21:   addl    $0x1,-0x4(%rbp)   21.84  21.84 &#9474;                                 25:   cmpl    $0x270f,-0x4(%rbp)   11.03  11.03 &#9474;0.61     3          |A   |-   |      &#8593; jle     11                &#9474;                                       nop                &#9474;                                       pop     %rbp    0.00   0.00 &#9474;0.24    20          |AA  |B   |      &#8592; retOriginally-by: Tinghao Zhang &lt;tinghao.zhang@intel.com&gt;Reviewed-by: Andi Kleen &lt;ak@linux.intel.com&gt;Signed-off-by: Kan Liang &lt;kan.liang@linux.intel.com&gt;Acked-by: Namhyung Kim &lt;namhyung@kernel.org&gt;Cc: Adrian Hunter &lt;adrian.hunter@intel.com&gt;Cc: Ian Rogers &lt;irogers@google.com&gt;Cc: Ingo Molnar &lt;mingo@kernel.org&gt;Cc: Peter Zijlstra &lt;peterz@infradead.org&gt;Cc: Stephane Eranian &lt;eranian@google.com&gt;Link: https://lore.kernel.org/r/20240813160208.2493643-8-kan.liang@linux.intel.comSigned-off-by: Arnaldo Carvalho de Melo &lt;acme@redhat.com&gt;

            List of files:
            /linux-6.15/tools/perf/util/disasm.c</description>
        <pubDate>Tue, 13 Aug 2024 16:02:06 +0000</pubDate>
        <dc:creator>Kan Liang &lt;kan.liang@linux.intel.com&gt;</dc:creator>
    </item>
<item>
        <title>a0503171 - perf disasm: Fix memory leak for locked operations</title>
        <link>http://172.16.0.5:8080/history/linux-6.15/tools/perf/util/disasm.c#a0503171</link>
        <description>perf disasm: Fix memory leak for locked operationslock__parse() calls disasm_line__parse() passing&amp;ops-&gt;locked.ins.name that will use strdup() to populate it.Ensure ops-&gt;locked.ins.name is freed in lock__delete().Found with address/leak sanitizer.Signed-off-by: Ian Rogers &lt;irogers@google.com&gt;Acked-by: Namhyung Kim &lt;namhyung@kernel.org&gt;Cc: Adrian Hunter &lt;adrian.hunter@intel.com&gt;Cc: Alexander Shishkin &lt;alexander.shishkin@linux.intel.com&gt;Cc: Athira Rajeev &lt;atrajeev@linux.vnet.ibm.com&gt;Cc: Ingo Molnar &lt;mingo@redhat.com&gt;Cc: Jiri Olsa &lt;jolsa@kernel.org&gt;Cc: Kajol Jain &lt;kjain@linux.ibm.com&gt;Cc: Kan Liang &lt;kan.liang@linux.intel.com&gt;Cc: Mark Rutland &lt;mark.rutland@arm.com&gt;Cc: Peter Zijlstra &lt;peterz@infradead.org&gt;Cc: Thomas Richter &lt;tmricht@linux.ibm.com&gt;Link: https://lore.kernel.org/r/20240813040613.882075-1-irogers@google.comSigned-off-by: Arnaldo Carvalho de Melo &lt;acme@redhat.com&gt;

            List of files:
            /linux-6.15/tools/perf/util/disasm.c</description>
        <pubDate>Tue, 13 Aug 2024 04:06:12 +0000</pubDate>
        <dc:creator>Ian Rogers &lt;irogers@google.com&gt;</dc:creator>
    </item>
<item>
        <title>bb588e38 - perf annotate: Set al-&gt;data_nr using the notes-&gt;src-&gt;nr_events</title>
        <link>http://172.16.0.5:8080/history/linux-6.15/tools/perf/util/disasm.c#bb588e38</link>
        <description>perf annotate: Set al-&gt;data_nr using the notes-&gt;src-&gt;nr_eventsThis is a preparation to support skipping empty events.Signed-off-by: Namhyung Kim &lt;namhyung@kernel.org&gt;Cc: Adrian Hunter &lt;adrian.hunter@intel.com&gt;Cc: Ian Rogers &lt;irogers@google.com&gt;Cc: Ingo Molnar &lt;mingo@kernel.org&gt;Cc: Jiri Olsa &lt;jolsa@kernel.org&gt;Cc: Kan Liang &lt;kan.liang@linux.intel.com&gt;Cc: Peter Zijlstra &lt;peterz@infradead.org&gt;Link: https://lore.kernel.org/r/20240803211332.1107222-5-namhyung@kernel.orgSigned-off-by: Arnaldo Carvalho de Melo &lt;acme@redhat.com&gt;

            List of files:
            /linux-6.15/tools/perf/util/disasm.c</description>
        <pubDate>Sat, 03 Aug 2024 21:13:31 +0000</pubDate>
        <dc:creator>Namhyung Kim &lt;namhyung@kernel.org&gt;</dc:creator>
    </item>
<item>
        <title>ea59b70a - perf bpf: Move BPF disassembly routines to separate file to avoid clash with capstone bpf headers</title>
        <link>http://172.16.0.5:8080/history/linux-6.15/tools/perf/util/disasm.c#ea59b70a</link>
        <description>perf bpf: Move BPF disassembly routines to separate file to avoid clash with capstone bpf headersThere is a clash of the libbpf and capstone libraries, that ends upwith:  In file included from /usr/include/capstone/capstone.h:325,                   from util/disasm.c:1513:  /usr/include/capstone/bpf.h:94:14: error: &#8216;bpf_insn&#8217; defined as wrong kind of tag     94 | typedef enum bpf_insn {So far we&apos;re just trying to avoid this by not having both headersincluded in the same .c or .h file, do it one more time by moving theBPF diassembly routines from util/disasm.c to util/disasm_bpf.c.This is only being hit when building with BUILD_NONDISTRO=1, i.e.building with binutils-devel, that isn&apos;t the in the default build due toa licencing clash. We need to reimplement what is now isolated inutil/disasm_bpf.c using some other library to have BPF annotationfeature that now only is available with BUILD_NONDISTRO=1.Fixes: 6d17edc113de1e21 (&quot;perf annotate: Use libcapstone to disassemble&quot;)Cc: Adrian Hunter &lt;adrian.hunter@intel.com&gt;Cc: Ian Rogers &lt;irogers@google.com&gt;Cc: Jiri Olsa &lt;jolsa@kernel.org&gt;Cc: Kan Liang &lt;kan.liang@linux.intel.com&gt;Cc: Namhyung Kim &lt;namhyung@kernel.org&gt;Link: https://lore.kernel.org/lkml/ZqpUSKPxMwaQKORr@x1Signed-off-by: Arnaldo Carvalho de Melo &lt;acme@redhat.com&gt;

            List of files:
            /linux-6.15/tools/perf/util/disasm.c</description>
        <pubDate>Wed, 31 Jul 2024 14:58:56 +0000</pubDate>
        <dc:creator>Arnaldo Carvalho de Melo &lt;acme@redhat.com&gt;</dc:creator>
    </item>
<item>
        <title>2c9db747 - perf annotate: Set instruction name to be used with insn-stat when using raw instruction</title>
        <link>http://172.16.0.5:8080/history/linux-6.15/tools/perf/util/disasm.c#2c9db747</link>
        <description>perf annotate: Set instruction name to be used with insn-stat when using raw instructionSince the &quot;ins.name&quot; is not set while using raw instruction,&apos;perf annotate&apos; with insn-stat gives wrong data:Result from &quot;./perf annotate --data-type --insn-stat&quot;:  Annotate Instruction stats  total 615, ok 419 (68.1%), bad 196 (31.9%)    Name      :  Good   Bad    -----------------------------------------------------------              :   419   196This patch sets &quot;dl-&gt;ins.name&quot; in arch specific function&quot;check_ppc_insn&quot; while initialising &quot;struct disasm_line&quot;.Also update &quot;ins_find&quot; function to pass &quot;struct disasm_line&quot; as aparameter so as to set its name field in arch specific call.With the patch changes:  Annotate Instruction stats  total 609, ok 446 (73.2%), bad 163 (26.8%)  Name/opcode         :  Good   Bad  -----------------------------------------------------------  58                  :   323    80  32                  :    49    43  34                  :    33    11  OP_31_XOP_LDX       :     8    20  40                  :    23     0  OP_31_XOP_LWARX     :     5     1  OP_31_XOP_LWZX      :     2     3  OP_31_XOP_LDARX     :     3     0  33                  :     0     2  OP_31_XOP_LBZX      :     0     1  OP_31_XOP_LWAX      :     0     1  OP_31_XOP_LHZX      :     0     1Reviewed-by: Kajol Jain &lt;kjain@linux.ibm.com&gt;Reviewed-by: Namhyung Kim &lt;namhyung@kernel.org&gt;Signed-off-by: Athira Rajeev &lt;atrajeev@linux.vnet.ibm.com&gt;Tested-by: Kajol Jain &lt;kjain@linux.ibm.com&gt;Cc: Adrian Hunter &lt;adrian.hunter@intel.com&gt;Cc: Akanksha J N &lt;akanksha@linux.ibm.com&gt;Cc: Christophe Leroy &lt;christophe.leroy@csgroup.eu&gt;Cc: Disha Goel &lt;disgoel@linux.vnet.ibm.com&gt;Cc: Hari Bathini &lt;hbathini@linux.ibm.com&gt;Cc: Ian Rogers &lt;irogers@google.com&gt;Cc: Jiri Olsa &lt;jolsa@kernel.org&gt;Cc: Madhavan Srinivasan &lt;maddy@linux.ibm.com&gt;Cc: Segher Boessenkool &lt;segher@kernel.crashing.org&gt;Link: https://lore.kernel.org/lkml/20240718084358.72242-16-atrajeev@linux.vnet.ibm.comSigned-off-by: Arnaldo Carvalho de Melo &lt;acme@redhat.com&gt;

            List of files:
            /linux-6.15/tools/perf/util/disasm.c</description>
        <pubDate>Thu, 18 Jul 2024 08:43:58 +0000</pubDate>
        <dc:creator>Athira Rajeev &lt;atrajeev@linux.vnet.ibm.com&gt;</dc:creator>
    </item>
</channel>
</rss>
