<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/linux.git/tools/perf/util/disasm.h, branch v6.19.11</title>
<subtitle>Linux kernel stable tree (mirror)</subtitle>
<id>https://git.radix-linux.su/kernel/linux.git/atom?h=v6.19.11</id>
<link rel='self' href='https://git.radix-linux.su/kernel/linux.git/atom?h=v6.19.11'/>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/'/>
<updated>2026-03-04T12:19:26+00:00</updated>
<entry>
<title>perf annotate: Fix args leak of map_symbol</title>
<updated>2026-03-04T12:19:26+00:00</updated>
<author>
<name>Ian Rogers</name>
<email>irogers@google.com</email>
</author>
<published>2026-01-22T21:35:06+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=8157613a89769ed7b47b85c18ff9f038c751e75c'/>
<id>urn:sha1:8157613a89769ed7b47b85c18ff9f038c751e75c</id>
<content type='text'>
[ Upstream commit 00419892bac28bf148450d762bbff990a6bd5494 ]

map_symbol__exit() needs calling on an annotate_args.ms, however, rather
than introduce proper reference count handling to symbol__annotate()
just switch to passing the map_symbol pointer parameter around, making
the puts the caller's responsibility.

Fix a number of cases to ensure the map in a map_symbol has a
reference count increment and add the then necessary map_symbol_exits.

Fixes: 56e144fe98260a0f ("perf mem_info: Add and use map_symbol__exit and addr_map_symbol__exit")
Reviewed-by: James Clark &lt;james.clark@linaro.org&gt;
Signed-off-by: Ian Rogers &lt;irogers@google.com&gt;
Cc: Aditya Bodkhe &lt;aditya.b1@linux.ibm.com&gt;
Cc: Adrian Hunter &lt;adrian.hunter@intel.com&gt;
Cc: Albert Ou &lt;aou@eecs.berkeley.edu&gt;
Cc: Alexander Shishkin &lt;alexander.shishkin@linux.intel.com&gt;
Cc: Alexandre Ghiti &lt;alex@ghiti.fr&gt;
Cc: Athira Rajeev &lt;atrajeev@linux.ibm.com&gt;
Cc: Bill Wendling &lt;morbo@google.com&gt;
Cc: Dr. David Alan Gilbert &lt;linux@treblig.org&gt;
Cc: Guo Ren &lt;guoren@kernel.org&gt;
Cc: Howard Chu &lt;howardchu95@gmail.com&gt;
Cc: Ian Rogers &lt;irogers@google.com&gt;
Cc: Ingo Molnar &lt;mingo@redhat.com&gt;
Cc: Jiri Olsa &lt;jolsa@kernel.org&gt;
Cc: John Garry &lt;john.g.garry@oracle.com&gt;
Cc: Julia Lawall &lt;Julia.Lawall@inria.fr&gt;
Cc: Justin Stitt &lt;justinstitt@google.com&gt;
Cc: Krzysztof Łopatowski &lt;krzysztof.m.lopatowski@gmail.com&gt;
Cc: Leo Yan &lt;leo.yan@linux.dev&gt;
Cc: linux-arm-kernel@lists.infradead.org
Cc: linux-csky@vger.kernel.org
Cc: linux-riscv@lists.infradead.org
Cc: Namhyung Kim &lt;namhyung@kernel.org&gt;
Cc: Nathan Chancellor &lt;nathan@kernel.org&gt;
Cc: Nick Desaulniers &lt;nick.desaulniers+lkml@gmail.com&gt;
Cc: Palmer Dabbelt &lt;palmer@dabbelt.com&gt;
Cc: Paul Walmsley &lt;pjw@kernel.org&gt;
Cc: Peter Zijlstra &lt;peterz@infradead.org&gt;
Cc: Sergei Trofimovich &lt;slyich@gmail.com&gt;
Cc: Shimin Guo &lt;shimin.guo@skydio.com&gt;
Cc: Suchit Karunakaran &lt;suchitkarunakaran@gmail.com&gt;
Cc: Thomas Falcon &lt;thomas.falcon@intel.com&gt;
Cc: Tianyou Li &lt;tianyou.li@intel.com&gt;
Cc: Will Deacon &lt;will@kernel.org&gt;
Cc: Zecheng Li &lt;zecheng@google.com&gt;
Signed-off-by: Arnaldo Carvalho de Melo &lt;acme@redhat.com&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>perf disasm: Remove unused evsel from 'struct annotate_args'</title>
<updated>2025-10-06T19:47:51+00:00</updated>
<author>
<name>Ian Rogers</name>
<email>irogers@google.com</email>
</author>
<published>2025-10-05T21:22:09+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=e3b08a0664057bd89c72ee1ec312462ed3e37ca0'/>
<id>urn:sha1:e3b08a0664057bd89c72ee1ec312462ed3e37ca0</id>
<content type='text'>
Set in symbol__annotate() but never used.

Signed-off-by: Ian Rogers &lt;irogers@google.com&gt;
Cc: Adrian Hunter &lt;adrian.hunter@intel.com&gt;
Cc: Alexander Shishkin &lt;alexander.shishkin@linux.intel.com&gt;
Cc: Alexandre Ghiti &lt;alexghiti@rivosinc.com&gt;
Cc: Andi Kleen &lt;ak@linux.intel.com&gt;
Cc: Athira Rajeev &lt;atrajeev@linux.ibm.com&gt;
Cc: Bill Wendling &lt;morbo@google.com&gt;
Cc: Charlie Jenkins &lt;charlie@rivosinc.com&gt;
Cc: Collin Funk &lt;collin.funk1@gmail.com&gt;
Cc: Dmitriy Vyukov &lt;dvyukov@google.com&gt;
Cc: Dr. David Alan Gilbert &lt;linux@treblig.org&gt;
Cc: Eric Biggers &lt;ebiggers@kernel.org&gt;
Cc: Haibo Xu &lt;haibo1.xu@intel.com&gt;
Cc: Ingo Molnar &lt;mingo@redhat.com&gt;
Cc: James Clark &lt;james.clark@linaro.org&gt;
Cc: Jiri Olsa &lt;jolsa@kernel.org&gt;
Cc: Justin Stitt &lt;justinstitt@google.com&gt;
Cc: Li Huafei &lt;lihuafei1@huawei.com&gt;
Cc: Masami Hiramatsu &lt;mhiramat@kernel.org&gt;
Cc: Namhyung Kim &lt;namhyung@kernel.org&gt;
Cc: Nathan Chancellor &lt;nathan@kernel.org&gt;
Cc: Nick Desaulniers &lt;nick.desaulniers+lkml@gmail.com&gt;
Cc: Peter Zijlstra &lt;peterz@infradead.org&gt;
Cc: Song Liu &lt;song@kernel.org&gt;
Cc: Stephen Brennan &lt;stephen.s.brennan@oracle.com&gt;
Signed-off-by: Arnaldo Carvalho de Melo &lt;acme@redhat.com&gt;
</content>
</entry>
<entry>
<title>perf disasm: Make ins__scnprintf() and ins__is_nop() static</title>
<updated>2025-10-06T19:35:29+00:00</updated>
<author>
<name>Ian Rogers</name>
<email>irogers@google.com</email>
</author>
<published>2025-10-05T21:22:07+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=fa770f1a9d40c99be4e7404c4a4bf77f50b0c892'/>
<id>urn:sha1:fa770f1a9d40c99be4e7404c4a4bf77f50b0c892</id>
<content type='text'>
Reduce the scope of ins__scnprintf() and ins__is_nop() that aren't used
outside of disasm.c.

Signed-off-by: Ian Rogers &lt;irogers@google.com&gt;
Cc: Adrian Hunter &lt;adrian.hunter@intel.com&gt;
Cc: Alexander Shishkin &lt;alexander.shishkin@linux.intel.com&gt;
Cc: Alexandre Ghiti &lt;alexghiti@rivosinc.com&gt;
Cc: Andi Kleen &lt;ak@linux.intel.com&gt;
Cc: Athira Rajeev &lt;atrajeev@linux.ibm.com&gt;
Cc: Bill Wendling &lt;morbo@google.com&gt;
Cc: Charlie Jenkins &lt;charlie@rivosinc.com&gt;
Cc: Collin Funk &lt;collin.funk1@gmail.com&gt;
Cc: Dmitriy Vyukov &lt;dvyukov@google.com&gt;
Cc: Dr. David Alan Gilbert &lt;linux@treblig.org&gt;
Cc: Eric Biggers &lt;ebiggers@kernel.org&gt;
Cc: Haibo Xu &lt;haibo1.xu@intel.com&gt;
Cc: Ingo Molnar &lt;mingo@redhat.com&gt;
Cc: James Clark &lt;james.clark@linaro.org&gt;
Cc: Jiri Olsa &lt;jolsa@kernel.org&gt;
Cc: Justin Stitt &lt;justinstitt@google.com&gt;
Cc: Li Huafei &lt;lihuafei1@huawei.com&gt;
Cc: Masami Hiramatsu &lt;mhiramat@kernel.org&gt;
Cc: Namhyung Kim &lt;namhyung@kernel.org&gt;
Cc: Nathan Chancellor &lt;nathan@kernel.org&gt;
Cc: Nick Desaulniers &lt;nick.desaulniers+lkml@gmail.com&gt;
Cc: Peter Zijlstra &lt;peterz@infradead.org&gt;
Cc: Song Liu &lt;song@kernel.org&gt;
Cc: Stephen Brennan &lt;stephen.s.brennan@oracle.com&gt;
Signed-off-by: Arnaldo Carvalho de Melo &lt;acme@redhat.com&gt;
</content>
</entry>
<entry>
<title>perf llvm: Move llvm functionality into its own file</title>
<updated>2025-10-02T18:38:23+00:00</updated>
<author>
<name>Ian Rogers</name>
<email>irogers@google.com</email>
</author>
<published>2025-09-29T19:07:53+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=d9007afca0cf6c549c5049d5a75bce470453b024'/>
<id>urn:sha1:d9007afca0cf6c549c5049d5a75bce470453b024</id>
<content type='text'>
LLVM disassembly support was in disasm.c and addr2line support in
srcline.c. Move support out of these files into llvm.[ch] and remove
LLVM includes from those files. As disassembly routines can fail, make
failure the only option without HAVE_LIBLLVM_SUPPORT. For simplicity's
sake, duplicate the read_symbol utility function.

The intent with moving LLVM support into a single file is that dynamic
support, using dlopen for libllvm, can be added in later patches. This
can potentially always succeed or fail, so relying on ifdefs isn't
sufficient. Using dlopen is a useful option to minimize the perf tools
dependencies and potentially size.

Signed-off-by: Ian Rogers &lt;irogers@google.com&gt;
Cc: Adrian Hunter &lt;adrian.hunter@intel.com&gt;
Cc: Alexander Shishkin &lt;alexander.shishkin@linux.intel.com&gt;
Cc: Alexandre Ghiti &lt;alexghiti@rivosinc.com&gt;
Cc: Andi Kleen &lt;ak@linux.intel.com&gt;
Cc: Athira Rajeev &lt;atrajeev@linux.ibm.com&gt;
Cc: Bill Wendling &lt;morbo@google.com&gt;
Cc: Charlie Jenkins &lt;charlie@rivosinc.com&gt;
Cc: Collin Funk &lt;collin.funk1@gmail.com&gt;
Cc: Dmitriy Vyukov &lt;dvyukov@google.com&gt;
Cc: Dr. David Alan Gilbert &lt;linux@treblig.org&gt;
Cc: Eric Biggers &lt;ebiggers@kernel.org&gt;
Cc: Haibo Xu &lt;haibo1.xu@intel.com&gt;
Cc: Ingo Molnar &lt;mingo@redhat.com&gt;
Cc: James Clark &lt;james.clark@linaro.org&gt;
Cc: Jiri Olsa &lt;jolsa@kernel.org&gt;
Cc: Justin Stitt &lt;justinstitt@google.com&gt;
Cc: Li Huafei &lt;lihuafei1@huawei.com&gt;
Cc: Mark Rutland &lt;mark.rutland@arm.com&gt;
Cc: Masami Hiramatsu &lt;mhiramat@kernel.org&gt;
Cc: Namhyung Kim &lt;namhyung@kernel.org&gt;
Cc: Nathan Chancellor &lt;nathan@kernel.org&gt;
Cc: Nick Desaulniers &lt;nick.desaulniers+lkml@gmail.com&gt;
Cc: Peter Zijlstra &lt;peterz@infradead.org&gt;
Cc: Song Liu &lt;song@kernel.org&gt;
Cc: Stephen Brennan &lt;stephen.s.brennan@oracle.com&gt;
Signed-off-by: Arnaldo Carvalho de Melo &lt;acme@redhat.com&gt;
</content>
</entry>
<entry>
<title>perf disasm: Add e_machine/e_flags to struct arch</title>
<updated>2024-11-09T16:39:13+00:00</updated>
<author>
<name>Ian Rogers</name>
<email>irogers@google.com</email>
</author>
<published>2024-11-08T23:45:49+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=cd6c9dca9d4bf1d5a9d3606cf5cace513f6dc5ce'/>
<id>urn:sha1:cd6c9dca9d4bf1d5a9d3606cf5cace513f6dc5ce</id>
<content type='text'>
Currently functions like get_dwarf_regnum only work with the host
architecture. Carry the elf machine and flags in struct arch so that
in disassembly these can be used to allow cross platform disassembly.

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.org
Cc: linux-riscv@lists.infradead.org
Cc: 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.org
Link: https://lore.kernel.org/r/20241108234606.429459-5-irogers@google.com
Signed-off-by: Namhyung Kim &lt;namhyung@kernel.org&gt;
</content>
</entry>
<entry>
<title>perf build: Rename HAVE_DWARF_SUPPORT to HAVE_LIBDW_SUPPORT</title>
<updated>2024-10-18T17:17:40+00:00</updated>
<author>
<name>Ian Rogers</name>
<email>irogers@google.com</email>
</author>
<published>2024-10-17T00:13:53+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=8838abf6261444f7d8047c363f90cafbd2ff32c5'/>
<id>urn:sha1:8838abf6261444f7d8047c363f90cafbd2ff32c5</id>
<content type='text'>
In Makefile.config for unwinding the name dwarf implies either
libunwind or libdw. Make it clearer that HAVE_DWARF_SUPPORT is really
just 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.org
Cc: linux-riscv@lists.infradead.org
Cc: 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.org
Link: https://lore.kernel.org/r/20241017001354.56973-11-irogers@google.com
Signed-off-by: Namhyung Kim &lt;namhyung@kernel.org&gt;
</content>
</entry>
<entry>
<title>perf annotate: Set instruction name to be used with insn-stat when using raw instruction</title>
<updated>2024-07-31T19:12:59+00:00</updated>
<author>
<name>Athira Rajeev</name>
<email>atrajeev@linux.vnet.ibm.com</email>
</author>
<published>2024-07-18T08:43:58+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=2c9db7475e5de5125b5043fe8f560284b248b0ae'/>
<id>urn:sha1:2c9db7475e5de5125b5043fe8f560284b248b0ae</id>
<content type='text'>
Since the "ins.name" is not set while using raw instruction,
'perf annotate' with insn-stat gives wrong data:

Result from "./perf annotate --data-type --insn-stat":

  Annotate Instruction stats
  total 615, ok 419 (68.1%), bad 196 (31.9%)

    Name      :  Good   Bad
    -----------------------------------------------------------
              :   419   196

This patch sets "dl-&gt;ins.name" in arch specific function
"check_ppc_insn" while initialising "struct disasm_line".

Also update "ins_find" function to pass "struct disasm_line" as a
parameter 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     1

Reviewed-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.com
Signed-off-by: Arnaldo Carvalho de Melo &lt;acme@redhat.com&gt;
</content>
</entry>
<entry>
<title>perf annotate: Add parse function for memory instructions in powerpc</title>
<updated>2024-07-31T19:12:59+00:00</updated>
<author>
<name>Athira Rajeev</name>
<email>atrajeev@linux.vnet.ibm.com</email>
</author>
<published>2024-07-18T08:43:50+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=1acdad68183ab870fca1e63b64f32601be612611'/>
<id>urn:sha1:1acdad68183ab870fca1e63b64f32601be612611</id>
<content type='text'>
Use the raw instruction code and macros to identify memory instructions,
extract register fields and also offset.

The implementation addresses the D-form, X-form, DS-form instructions.
Two main functions are added.

New parse function "load_store__parse" as instruction ops parser for
memory instructions.

Unlike other parsers (like mov__parse), this one fills in the
"multi_regs" field for source/target and new added "mem_ref" field. No
other fields are set because, here there is no need to parse the
disassembled code and arch specific macros will take care of extracting
offset and regs which is easier and will be precise.

In powerpc, all instructions with a primary opcode from 32 to 63
are memory instructions. Update "ins__find" function to have "raw_insn"
also as a parameter.

Reviewed-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-8-atrajeev@linux.vnet.ibm.com
Signed-off-by: Arnaldo Carvalho de Melo &lt;acme@redhat.com&gt;
</content>
</entry>
<entry>
<title>perf annotate: Update parameters for reg extract functions to use raw instruction on powerpc</title>
<updated>2024-07-31T19:12:59+00:00</updated>
<author>
<name>Athira Rajeev</name>
<email>atrajeev@linux.vnet.ibm.com</email>
</author>
<published>2024-07-18T08:43:49+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=1b4406d2a88cf65d615b0bcb42525d7a4723eb70'/>
<id>urn:sha1:1b4406d2a88cf65d615b0bcb42525d7a4723eb70</id>
<content type='text'>
Use the raw instruction code and macros to identify memory instructions,
extract register fields and also offset.

The implementation addresses the D-form, X-form, DS-form instructions.

Adds "mem_ref" field to check whether source/target has memory
reference.

Add function "get_powerpc_regs" which will set these fields: reg1, reg2,
offset depending of where it is source or target ops.

Update "parse" callback for "struct ins_ops" to also pass "struct
disasm_line" as argument. This is needed in parse functions where opcode
is used to determine whether to set multi_regs and other fields

Reviewed-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-7-atrajeev@linux.vnet.ibm.com
Signed-off-by: Arnaldo Carvalho de Melo &lt;acme@redhat.com&gt;
</content>
</entry>
<entry>
<title>perf annotate: Add "update_insn_state" callback function to handle arch specific instruction tracking</title>
<updated>2024-07-31T19:12:59+00:00</updated>
<author>
<name>Athira Rajeev</name>
<email>atrajeev@linux.vnet.ibm.com</email>
</author>
<published>2024-07-18T08:43:45+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=782959ac248ac3cbac80f7476d4e0410662ff400'/>
<id>urn:sha1:782959ac248ac3cbac80f7476d4e0410662ff400</id>
<content type='text'>
Add "update_insn_state" callback to "struct arch" to handle instruction
tracking. Currently updating instruction state is handled by static
function "update_insn_state_x86" which is defined in "annotate-data.c".

Make this as a callback for specific arch and move to archs specific
file "arch/x86/annotate/instructions.c" . This will help to add helper
function for other platforms in file:
"arch/&lt;platform&gt;/annotate/instructions.c" and make changes/updates
easier.

Define callback "update_insn_state" as part of "struct arch", also make
some of the debug functions non-static so that it can be referenced from
other places.

Reviewed-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-3-atrajeev@linux.vnet.ibm.com
Signed-off-by: Arnaldo Carvalho de Melo &lt;acme@redhat.com&gt;
</content>
</entry>
</feed>
