Home
last modified time | relevance | path

Searched refs:arch (Results 1 – 25 of 151) sorted by relevance

1234567

/tools/perf/util/
Dperf_regs.c26 const char *perf_reg_name(int id, const char *arch) in perf_reg_name() argument
30 if (!strcmp(arch, "csky")) in perf_reg_name()
32 else if (!strcmp(arch, "loongarch")) in perf_reg_name()
34 else if (!strcmp(arch, "mips")) in perf_reg_name()
36 else if (!strcmp(arch, "powerpc")) in perf_reg_name()
38 else if (!strcmp(arch, "riscv")) in perf_reg_name()
40 else if (!strcmp(arch, "s390")) in perf_reg_name()
42 else if (!strcmp(arch, "x86")) in perf_reg_name()
44 else if (!strcmp(arch, "arm")) in perf_reg_name()
46 else if (!strcmp(arch, "arm64")) in perf_reg_name()
[all …]
Dperf_regs.h33 const char *perf_reg_name(int id, const char *arch);
35 uint64_t perf_arch_reg_ip(const char *arch);
36 uint64_t perf_arch_reg_sp(const char *arch);
65 static inline uint64_t DWARF_MINIMAL_REGS(const char *arch) in DWARF_MINIMAL_REGS() argument
67 return (1ULL << perf_arch_reg_ip(arch)) | (1ULL << perf_arch_reg_sp(arch)); in DWARF_MINIMAL_REGS()
72 static inline uint64_t DWARF_MINIMAL_REGS(const char *arch __maybe_unused) in DWARF_MINIMAL_REGS()
77 static inline const char *perf_reg_name(int id __maybe_unused, const char *arch __maybe_unused) in perf_reg_name()
89 static inline uint64_t perf_arch_reg_ip(const char *arch __maybe_unused) in perf_arch_reg_ip()
94 static inline uint64_t perf_arch_reg_sp(const char *arch __maybe_unused) in perf_arch_reg_sp()
Denv.c204 zfree(&env->arch); in perf_env__exit()
258 const char *arch = perf_env__raw_arch(env); in perf_env__init_kernel_mode() local
260 if (!strncmp(arch, "x86_64", 6) || !strncmp(arch, "aarch64", 7) || in perf_env__init_kernel_mode()
261 !strncmp(arch, "arm64", 5) || !strncmp(arch, "mips64", 6) || in perf_env__init_kernel_mode()
262 !strncmp(arch, "parisc64", 8) || !strncmp(arch, "riscv64", 7) || in perf_env__init_kernel_mode()
263 !strncmp(arch, "s390x", 5) || !strncmp(arch, "sparc64", 7)) in perf_env__init_kernel_mode()
389 if (env->arch) in perf_env__read_arch()
393 env->arch = strdup(uts.machine); in perf_env__read_arch()
395 return env->arch ? 0 : -ENOMEM; in perf_env__read_arch()
408 return env && !perf_env__read_arch(env) ? env->arch : "unknown"; in perf_env__raw_arch()
[all …]
Dpython-ext-sources43 util/perf-regs-arch/perf_regs_aarch64.c
44 util/perf-regs-arch/perf_regs_arm.c
45 util/perf-regs-arch/perf_regs_csky.c
46 util/perf-regs-arch/perf_regs_loongarch.c
47 util/perf-regs-arch/perf_regs_mips.c
48 util/perf-regs-arch/perf_regs_powerpc.c
49 util/perf-regs-arch/perf_regs_riscv.c
50 util/perf-regs-arch/perf_regs_s390.c
51 util/perf-regs-arch/perf_regs_x86.c
Dunwind-libunwind.c22 const char *arch; in unwind__prepare_access() local
41 if (!machine->env || !machine->env->arch) in unwind__prepare_access()
48 arch = perf_env__arch(machine->env); in unwind__prepare_access()
50 if (!strcmp(arch, "x86")) { in unwind__prepare_access()
53 } else if (!strcmp(arch, "arm64") || !strcmp(arch, "arm")) { in unwind__prepare_access()
59 pr_warning_once("unwind: target platform=%s is not supported\n", arch); in unwind__prepare_access()
Dannotate.c65 static struct ins_ops *ins__find(struct arch *arch, const char *name);
66 static void ins__sort(struct arch *arch);
73 struct arch { struct
78 struct ins_ops *(*associate_instruction_ops)(struct arch *arch, const char *name); argument
85 int (*init)(struct arch *arch, char *cpuid); argument
86 bool (*ins_is_fused)(struct arch *arch, const char *ins1, argument
102 static int arch__grow_instructions(struct arch *arch) in arch__grow_instructions() argument
107 if (arch->nr_instructions_allocated == 0 && arch->instructions) in arch__grow_instructions()
110 new_nr_allocated = arch->nr_instructions_allocated + 128; in arch__grow_instructions()
111 new_instructions = realloc(arch->instructions, new_nr_allocated * sizeof(struct ins)); in arch__grow_instructions()
[all …]
/tools/perf/trace/beauty/
Darch_errno_names.sh20 arch="$1"
22 header="$toolsdir/arch/$arch/include/uapi/asm/errno.h"
32 arch=$(arch_string "$1")
34 printf "static const char *errno_to_name__%s(int err)\n{\n\tswitch (err) {\n" $arch
45 arch="$1"
46 asm_errno=$(asm_errno_file "$arch")
52 |IFS=, create_errno_lookup_func "$arch"
62 for arch in $archlist; do
63 printf '\tif (!strcmp(arch, "%s"))\n' $(arch_string "$arch")
64 printf '\t\treturn errno_to_name__%s(err);\n' $(arch_string "$arch")
[all …]
/tools/testing/selftests/kvm/x86_64/
Ddebug_regs.c109 run->debug.arch.exception == BP_VECTOR && in main()
110 run->debug.arch.pc == CAST_TO_RIP(sw_bp), in main()
112 run->exit_reason, run->debug.arch.exception, in main()
113 run->debug.arch.pc, CAST_TO_RIP(sw_bp)); in main()
120 debug.arch.debugreg[i] = CAST_TO_RIP(hw_bp); in main()
121 debug.arch.debugreg[7] = 0x400 | (1UL << (2*i+1)); in main()
126 run->debug.arch.exception == DB_VECTOR && in main()
127 run->debug.arch.pc == CAST_TO_RIP(hw_bp) && in main()
128 run->debug.arch.dr6 == target_dr6, in main()
131 i, run->exit_reason, run->debug.arch.exception, in main()
[all …]
/tools/perf/arch/arm/annotate/
Dinstructions.c13 static struct ins_ops *arm__associate_instruction_ops(struct arch *arch, const char *name) in arm__associate_instruction_ops() argument
15 struct arm_annotate *arm = arch->priv; in arm__associate_instruction_ops()
26 arch__associate_ins_ops(arch, name, ops); in arm__associate_instruction_ops()
30 static int arm__annotate_init(struct arch *arch, char *cpuid __maybe_unused) in arm__annotate_init() argument
35 if (arch->initialized) in arm__annotate_init()
51 arch->initialized = true; in arm__annotate_init()
52 arch->priv = arm; in arm__annotate_init()
53 arch->associate_instruction_ops = arm__associate_instruction_ops; in arm__annotate_init()
54 arch->objdump.comment_char = ';'; in arm__annotate_init()
55 arch->objdump.skip_functions_char = '+'; in arm__annotate_init()
/tools/perf/arch/riscv64/annotate/
Dinstructions.c4 struct ins_ops *riscv64__associate_ins_ops(struct arch *arch, const char *name) in riscv64__associate_ins_ops() argument
19 arch__associate_ins_ops(arch, name, ops); in riscv64__associate_ins_ops()
25 int riscv64__annotate_init(struct arch *arch, char *cpuid __maybe_unused) in riscv64__annotate_init() argument
27 if (!arch->initialized) { in riscv64__annotate_init()
28 arch->associate_instruction_ops = riscv64__associate_ins_ops; in riscv64__annotate_init()
29 arch->initialized = true; in riscv64__annotate_init()
30 arch->objdump.comment_char = '#'; in riscv64__annotate_init()
/tools/perf/arch/
Dcommon.c148 const char *arch = perf_env__arch(env), *cross_env; in perf_env__lookup_binutils_path() local
156 if (!strcmp(perf_env__arch(NULL), arch)) in perf_env__lookup_binutils_path()
173 if (!strcmp(arch, "arc")) in perf_env__lookup_binutils_path()
175 else if (!strcmp(arch, "arm")) in perf_env__lookup_binutils_path()
177 else if (!strcmp(arch, "arm64")) in perf_env__lookup_binutils_path()
179 else if (!strcmp(arch, "powerpc")) in perf_env__lookup_binutils_path()
181 else if (!strcmp(arch, "riscv32")) in perf_env__lookup_binutils_path()
183 else if (!strcmp(arch, "riscv64")) in perf_env__lookup_binutils_path()
185 else if (!strcmp(arch, "sh")) in perf_env__lookup_binutils_path()
187 else if (!strcmp(arch, "s390")) in perf_env__lookup_binutils_path()
[all …]
/tools/perf/arch/s390/annotate/
Dinstructions.c4 static int s390_call__parse(struct arch *arch, struct ins_operands *ops, in s390_call__parse() argument
25 if (arch->objdump.skip_functions_char && in s390_call__parse()
26 strchr(name, arch->objdump.skip_functions_char)) in s390_call__parse()
53 static int s390_mov__parse(struct arch *arch __maybe_unused, in s390_mov__parse()
106 static struct ins_ops *s390__associate_ins_ops(struct arch *arch, const char *name) in s390__associate_ins_ops() argument
132 arch__associate_ins_ops(arch, name, ops); in s390__associate_ins_ops()
136 static int s390__cpuid_parse(struct arch *arch, char *cpuid) in s390__cpuid_parse() argument
149 arch->family = family; in s390__cpuid_parse()
150 arch->model = 0; in s390__cpuid_parse()
157 static int s390__annotate_init(struct arch *arch, char *cpuid __maybe_unused) in s390__annotate_init() argument
[all …]
/tools/perf/arch/mips/annotate/
Dinstructions.c4 struct ins_ops *mips__associate_ins_ops(struct arch *arch, const char *name) in mips__associate_ins_ops() argument
31 arch__associate_ins_ops(arch, name, ops); in mips__associate_ins_ops()
37 int mips__annotate_init(struct arch *arch, char *cpuid __maybe_unused) in mips__annotate_init() argument
39 if (!arch->initialized) { in mips__annotate_init()
40 arch->associate_instruction_ops = mips__associate_ins_ops; in mips__annotate_init()
41 arch->initialized = true; in mips__annotate_init()
42 arch->objdump.comment_char = '#'; in mips__annotate_init()
/tools/perf/arch/powerpc/annotate/
Dinstructions.c4 static struct ins_ops *powerpc__associate_instruction_ops(struct arch *arch, const char *name) in powerpc__associate_instruction_ops() argument
48 arch__associate_ins_ops(arch, name, ops); in powerpc__associate_instruction_ops()
52 static int powerpc__annotate_init(struct arch *arch, char *cpuid __maybe_unused) in powerpc__annotate_init() argument
54 if (!arch->initialized) { in powerpc__annotate_init()
55 arch->initialized = true; in powerpc__annotate_init()
56 arch->associate_instruction_ops = powerpc__associate_instruction_ops; in powerpc__annotate_init()
57 arch->objdump.comment_char = '#'; in powerpc__annotate_init()
/tools/perf/arch/arm64/annotate/
Dinstructions.c12 static int arm64_mov__parse(struct arch *arch __maybe_unused, in arm64_mov__parse()
69 static struct ins_ops *arm64__associate_instruction_ops(struct arch *arch, const char *name) in arm64__associate_instruction_ops() argument
71 struct arm64_annotate *arm = arch->priv; in arm64__associate_instruction_ops()
84 arch__associate_ins_ops(arch, name, ops); in arm64__associate_instruction_ops()
88 static int arm64__annotate_init(struct arch *arch, char *cpuid __maybe_unused) in arm64__annotate_init() argument
93 if (arch->initialized) in arm64__annotate_init()
110 arch->initialized = true; in arm64__annotate_init()
111 arch->priv = arm; in arm64__annotate_init()
112 arch->associate_instruction_ops = arm64__associate_instruction_ops; in arm64__annotate_init()
113 arch->objdump.comment_char = '/'; in arm64__annotate_init()
[all …]
/tools/perf/arch/csky/annotate/
Dinstructions.c6 static struct ins_ops *csky__associate_ins_ops(struct arch *arch, in csky__associate_ins_ops() argument
37 arch__associate_ins_ops(arch, name, ops); in csky__associate_ins_ops()
41 static int csky__annotate_init(struct arch *arch, char *cpuid __maybe_unused) in csky__annotate_init() argument
43 arch->initialized = true; in csky__annotate_init()
44 arch->objdump.comment_char = '/'; in csky__annotate_init()
45 arch->associate_instruction_ops = csky__associate_ins_ops; in csky__annotate_init()
/tools/perf/arch/loongarch/annotate/
Dinstructions.c8 static int loongarch_call__parse(struct arch *arch, struct ins_operands *ops, struct map_symbol *ms) in loongarch_call__parse() argument
25 if (arch->objdump.skip_functions_char && in loongarch_call__parse()
26 strchr(name, arch->objdump.skip_functions_char)) in loongarch_call__parse()
54 static int loongarch_jump__parse(struct arch *arch, struct ins_operands *ops, struct map_symbol *ms) in loongarch_jump__parse() argument
64 ops->raw_comment = strchr(ops->raw, arch->objdump.comment_char); in loongarch_jump__parse()
101 struct ins_ops *loongarch__associate_ins_ops(struct arch *arch, const char *name) in loongarch__associate_ins_ops() argument
120 arch__associate_ins_ops(arch, name, ops); in loongarch__associate_ins_ops()
126 int loongarch__annotate_init(struct arch *arch, char *cpuid __maybe_unused) in loongarch__annotate_init() argument
128 if (!arch->initialized) { in loongarch__annotate_init()
129 arch->associate_instruction_ops = loongarch__associate_ins_ops; in loongarch__annotate_init()
[all …]
/tools/perf/
Dcheck-headers.sh161 check arch/x86/lib/memcpy_64.S '-I "^EXPORT_SYMBOL" -I "^#include <asm/export.h>" -I"^SYM_FU…
162 check arch/x86/lib/memset_64.S '-I "^EXPORT_SYMBOL" -I "^#include <asm/export.h>" -I"^SYM_FU…
163 check arch/x86/include/asm/amd-ibs.h '-I "^#include [<\"]\(asm/\)*msr-index.h"'
164 check arch/arm64/include/asm/cputype.h '-I "^#include [<\"]\(asm/\)*sysreg.h"'
173 check_2 tools/perf/arch/x86/entry/syscalls/syscall_64.tbl arch/x86/entry/syscalls/syscall_64.tbl
174 check_2 tools/perf/arch/powerpc/entry/syscalls/syscall.tbl arch/powerpc/kernel/syscalls/syscall.tbl
175 check_2 tools/perf/arch/s390/entry/syscalls/syscall.tbl arch/s390/kernel/syscalls/syscall.tbl
176 check_2 tools/perf/arch/mips/entry/syscalls/syscall_n64.tbl arch/mips/kernel/syscalls/syscall_n64.t…
/tools/perf/arch/x86/annotate/
Dinstructions.c119 static bool amd__ins_is_fused(struct arch *arch, const char *ins1, in amd__ins_is_fused() argument
126 if (arch->family >= 0x15 && (strstarts(ins1, "test") || in amd__ins_is_fused()
132 if (arch->family >= 0x19 && (strstarts(ins1, "add") || in amd__ins_is_fused()
142 static bool intel__ins_is_fused(struct arch *arch, const char *ins1, in intel__ins_is_fused() argument
145 if (arch->family != 6 || arch->model < 0x1e || strstr(ins2, "jmp")) in intel__ins_is_fused()
148 if (arch->model == 0x1e) { in intel__ins_is_fused()
170 static int x86__cpuid_parse(struct arch *arch, char *cpuid) in x86__cpuid_parse() argument
180 arch->family = family; in x86__cpuid_parse()
181 arch->model = model; in x86__cpuid_parse()
182 arch->ins_is_fused = strstarts(cpuid, "AuthenticAMD") ? in x86__cpuid_parse()
[all …]
/tools/objtool/arch/x86/
DBuild4 inat_tables_script = ../arch/x86/tools/gen-insn-attr-x86.awk
5 inat_tables_maps = ../arch/x86/lib/x86-opcode-map.txt
7 $(OUTPUT)arch/x86/lib/inat-tables.c: $(inat_tables_script) $(inat_tables_maps)
11 $(OUTPUT)arch/x86/decode.o: $(OUTPUT)arch/x86/lib/inat-tables.c
13 CFLAGS_decode.o += -I$(OUTPUT)arch/x86/lib
/tools/perf/arch/arc/annotate/
Dinstructions.c4 static int arc__annotate_init(struct arch *arch, char *cpuid __maybe_unused) in arc__annotate_init() argument
6 arch->initialized = true; in arc__annotate_init()
7 arch->objdump.comment_char = ';'; in arc__annotate_init()
/tools/perf/arch/sparc/annotate/
Dinstructions.c120 static struct ins_ops *sparc__associate_instruction_ops(struct arch *arch, const char *name) in sparc__associate_instruction_ops() argument
155 arch__associate_ins_ops(arch, name, ops); in sparc__associate_instruction_ops()
160 static int sparc__annotate_init(struct arch *arch, char *cpuid __maybe_unused) in sparc__annotate_init() argument
162 if (!arch->initialized) { in sparc__annotate_init()
163 arch->initialized = true; in sparc__annotate_init()
164 arch->associate_instruction_ops = sparc__associate_instruction_ops; in sparc__annotate_init()
165 arch->objdump.comment_char = '#'; in sparc__annotate_init()
/tools/perf/pmu-events/
Dempty-pmu-events.c205 const char *arch; member
217 .arch = "testarch",
223 .arch = 0,
383 const struct pmu_events_table *find_core_events_table(const char *arch, const char *cpuid) in find_core_events_table() argument
386 tables->arch; in find_core_events_table()
388 if (!strcmp(tables->arch, arch) && !strcmp_cpuid_str(tables->cpuid, cpuid)) in find_core_events_table()
394 const struct pmu_metrics_table *find_core_metrics_table(const char *arch, const char *cpuid) in find_core_metrics_table() argument
397 tables->arch; in find_core_metrics_table()
399 if (!strcmp(tables->arch, arch) && !strcmp_cpuid_str(tables->cpuid, cpuid)) in find_core_metrics_table()
407 for (const struct pmu_events_map *tables = &pmu_events_map[0]; tables->arch; tables++) { in pmu_for_each_core_event()
[all …]
/tools/perf/arch/x86/entry/syscalls/
Dsyscalltbl.sh5 arch="$2"
21 echo "static const char *const syscalltbl_${arch}[] = {"
40 echo "#define SYSCALLTBL_${arch}_MAX_ID ${max_nr}"
/tools/bpf/bpftool/
Djit_disasm.c81 init_context(disasm_ctx_t *ctx, const char *arch, in init_context() argument
87 if (arch) in init_context()
88 triple = LLVMNormalizeTargetTriple(arch); in init_context()
216 static int init_context(disasm_ctx_t *ctx, const char *arch, in init_context() argument
258 if (arch) { in init_context()
259 const bfd_arch_info_type *inf = bfd_scan_arch(arch); in init_context()
264 p_err("No libbfd support for %s", arch); in init_context()
269 info->arch = bfd_get_arch(bfdf); in init_context()
279 ctx->disassemble = disassembler(info->arch, in init_context()
320 const char *arch, const char *disassembler_options, in disasm_print_insn() argument
[all …]

1234567