perf disasm: Add e_machine/e_flags to struct archCurrently functions like get_dwarf_regnum only work with the hostarchitecture. Carry the elf machine and flags in struct arch so thatin disassembl
perf disasm: Add e_machine/e_flags to struct archCurrently functions like get_dwarf_regnum only work with the hostarchitecture. Carry the elf machine and flags in struct arch so thatin disassembly these can be used to allow cross platform disassembly.Reviewed-by: Masami Hiramatsu (Google) <[email protected]>Signed-off-by: Ian Rogers <[email protected]>Cc: Anup Patel <[email protected]>Cc: Yang Jihong <[email protected]>Cc: Palmer Dabbelt <[email protected]>Cc: David S. Miller <[email protected]>Cc: Albert Ou <[email protected]>Cc: Shenlin Liang <[email protected]>Cc: Nick Terrell <[email protected]>Cc: Guilherme Amadio <[email protected]>Cc: Steinar H. Gunderson <[email protected]>Cc: Changbin Du <[email protected]>Cc: Alexander Lobakin <[email protected]>Cc: Przemek Kitszel <[email protected]>Cc: Huacai Chen <[email protected]>Cc: Guo Ren <[email protected]>Cc: Masahiro Yamada <[email protected]>Cc: Will Deacon <[email protected]>Cc: James Clark <[email protected]>Cc: Mike Leach <[email protected]>Cc: Chen Pei <[email protected]>Cc: Leo Yan <[email protected]>Cc: Oliver Upton <[email protected]>Cc: Aditya Gupta <[email protected]>Cc: Kajol Jain <[email protected]>Cc: Athira Rajeev <[email protected]>Cc: [email protected]Cc: [email protected]Cc: Bibo Mao <[email protected]>Cc: John Garry <[email protected]>Cc: Atish Patra <[email protected]>Cc: Dima Kogan <[email protected]>Cc: Paul Walmsley <[email protected]>Cc: Dr. David Alan Gilbert <[email protected]>Cc: [email protected]Link: https://lore.kernel.org/r/[email protected]Signed-off-by: Namhyung Kim <[email protected]>
show more ...
perf annotate: Update parameters for reg extract functions to use raw instruction on powerpcUse the raw instruction code and macros to identify memory instructions,extract register fields and also
perf annotate: Update parameters for reg extract functions to use raw instruction on powerpcUse 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 memoryreference.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 "structdisasm_line" as argument. This is needed in parse functions where opcodeis used to determine whether to set multi_regs and other fieldsReviewed-by: Kajol Jain <[email protected]>Reviewed-by: Namhyung Kim <[email protected]>Signed-off-by: Athira Rajeev <[email protected]>Tested-by: Kajol Jain <[email protected]>Cc: Adrian Hunter <[email protected]>Cc: Akanksha J N <[email protected]>Cc: Christophe Leroy <[email protected]>Cc: Disha Goel <[email protected]>Cc: Hari Bathini <[email protected]>Cc: Ian Rogers <[email protected]>Cc: Jiri Olsa <[email protected]>Cc: Madhavan Srinivasan <[email protected]>Cc: Segher Boessenkool <[email protected]>Link: https://lore.kernel.org/lkml/[email protected]Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
perf annotate: Move raw_comment and raw_func_start fields out of 'struct ins_operands'Thoese two fields are used only for the jump_ops, so move them into theunion to save some bytes. Also add jum
perf annotate: Move raw_comment and raw_func_start fields out of 'struct ins_operands'Thoese two fields are used only for the jump_ops, so move them into theunion to save some bytes. Also add jump__delete() callback not to freethe fields as they didn't allocate new strings.Signed-off-by: Namhyung Kim <[email protected]>Cc: Adrian Hunter <[email protected]>Cc: Andi Kleen <[email protected]>Cc: Huacai Chen <[email protected]>Cc: Ian Rogers <[email protected]>Cc: Ingo Molnar <[email protected]>Cc: Jiri Olsa <[email protected]>Cc: Linus Torvalds <[email protected]>Cc: Masami Hiramatsu (Google) <[email protected]>Cc: Peter Zijlstra <[email protected]>Cc: Stephane Eranian <[email protected]>Cc: WANG Rui <[email protected]>Cc: [email protected]Cc: [email protected]Link: https://lore.kernel.org/r/[email protected]Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
perf annotate: Fix instruction association and parsing for LoongArchIn the perf annotate view for LoongArch, there is no arrowed linepointing to the target from the branch instruction. This issue
perf annotate: Fix instruction association and parsing for LoongArchIn the perf annotate view for LoongArch, there is no arrowed linepointing to the target from the branch instruction. This issue iscaused by incorrect instruction association and parsing.$ perf record alloc-6276705c94ad1398 # rust benchmark$ perf report 0.28 │ ori $a1, $zero, 0x63 │ move $a2, $zero 10.55 │ addi.d $a3, $a2, 1(0x1) │ sltu $a4, $a3, $s7 9.53 │ masknez $a4, $s7, $a4 │ sub.d $a3, $a3, $a4 12.12 │ st.d $a1, $fp, 24(0x18) │ st.d $a3, $fp, 16(0x10) 16.29 │ slli.d $a2, $a2, 0x2 │ ldx.w $a2, $s8, $a2 12.77 │ st.w $a2, $sp, 724(0x2d4) │ st.w $s0, $sp, 720(0x2d0) 7.03 │ addi.d $a2, $sp, 720(0x2d0) │ addi.d $a1, $a1, -1(0xfff) 12.03 │ move $a2, $a3 │ → bne $a1, $s3, -52(0x3ffcc) # 82ce8 <test::bench::Bencher::iter+0x3f4> 2.50 │ addi.d $a0, $a0, 1(0x1)This patch fixes instruction association issues, such as associatingbranch instructions with jump_ops instead of call_ops, and correctsfalse instruction matches. It also implements branch instruction parsingspecifically for LoongArch. With this patch, we will be able to see thearrowed line. 0.79 │3ec: ori $a1, $zero, 0x63 │ move $a2, $zero 10.32 │3f4:┌─→addi.d $a3, $a2, 1(0x1) │ │ sltu $a4, $a3, $s7 10.44 │ │ masknez $a4, $s7, $a4 │ │ sub.d $a3, $a3, $a4 14.17 │ │ st.d $a1, $fp, 24(0x18) │ │ st.d $a3, $fp, 16(0x10) 13.15 │ │ slli.d $a2, $a2, 0x2 │ │ ldx.w $a2, $s8, $a2 11.00 │ │ st.w $a2, $sp, 724(0x2d4) │ │ st.w $s0, $sp, 720(0x2d0) 8.00 │ │ addi.d $a2, $sp, 720(0x2d0) │ │ addi.d $a1, $a1, -1(0xfff) 11.99 │ │ move $a2, $a3 │ └──bne $a1, $s3, 3f4 3.17 │ addi.d $a0, $a0, 1(0x1)Signed-off-by: WANG Rui <[email protected]>Acked-by: Namhyung Kim <[email protected]>Cc: Mark Rutland <[email protected]>Cc: Peter Zijlstra <[email protected]>Cc: Arnaldo Carvalho de Melo <[email protected]>Cc: Jiri Olsa <[email protected]>Cc: Alexander Shishkin <[email protected]>Cc: [email protected]Cc: [email protected]Cc: Huacai Chen <[email protected]>Cc: Tiezhu Yang <[email protected]>Cc: Ingo Molnar <[email protected]>Cc: WANG Xuerui <[email protected]>Link: https://lore.kernel.org/r/[email protected]Signed-off-by: Namhyung Kim <[email protected]>
tools/perf: Add basic support for LoongArchAdd basic support for LoongArch, which is very similar to the MIPSversion.Signed-off-by: Ming Wang <[email protected]>Signed-off-by: Huacai Chen
tools/perf: Add basic support for LoongArchAdd basic support for LoongArch, which is very similar to the MIPSversion.Signed-off-by: Ming Wang <[email protected]>Signed-off-by: Huacai Chen <[email protected]>