instruction
stringlengths
82
202
input
stringclasses
1 value
output
stringlengths
73
23.9M
Linux kernel'inin 'tools/perf/tests/evsel-tp-sched' alt sistemi için gerekli C kaynak kodunu implemente et.
```c // SPDX-License-Identifier: GPL-2.0 #include <linux/err.h> #include <event-parse.h> #include "evsel.h" #include "tests.h" #include "debug.h" static int evsel__test_field(struct evsel *evsel, const char *name, int size, bool should_be_signed) { struct tep_format_field *field = evsel__field(evsel, name); int is_s...
Linux kernel'inin 'tools/perf/tests/expand-cgroup' alt sistemi için gerekli C kaynak kodunu implemente et.
```c // SPDX-License-Identifier: GPL-2.0 #include "tests.h" #include "debug.h" #include "evlist.h" #include "cgroup.h" #include "rblist.h" #include "metricgroup.h" #include "parse-events.h" #include "pmu-events/pmu-events.h" #include "pfm.h" #include "target.h" #include <subcmd/parse-options.h> #include <stdio.h> #incl...
Linux kernel'inin 'tools/perf/tests/mem2node' alt sistemi için gerekli C kaynak kodunu implemente et.
```c // SPDX-License-Identifier: GPL-2.0 #include <linux/compiler.h> #include <linux/bitmap.h> #include <linux/kernel.h> #include <linux/zalloc.h> #include <perf/cpumap.h> #include <internal/cpumap.h> #include "debug.h" #include "env.h" #include "mem2node.h" #include "tests.h" static struct node { int node; const ...
Linux kernel'inin 'tools/perf/tests/tool_pmu' alt sistemi için gerekli C kaynak kodunu implemente et.
```c // SPDX-License-Identifier: (LGPL-2.1 OR BSD-2-Clause) #include "debug.h" #include "evlist.h" #include "parse-events.h" #include "tests.h" #include "tool_pmu.h" static int do_test(enum tool_pmu_event ev, bool with_pmu) { struct evlist *evlist = evlist__new(); struct evsel *evsel; struct parse_events_error err;...
Linux kernel'inin 'tools/perf/tests/keep-tracking' alt sistemi için gerekli C kaynak kodunu implemente et.
```c // SPDX-License-Identifier: GPL-2.0 #include <linux/types.h> #include <limits.h> #include <unistd.h> #include <sys/prctl.h> #include <perf/cpumap.h> #include <perf/evlist.h> #include <perf/mmap.h> #include "debug.h" #include "parse-events.h" #include "evlist.h" #include "evsel.h" #include "record.h" #include "thr...
Linux kernel'inin 'tools/perf/tests/hists_filter' alt sistemi için gerekli C kaynak kodunu implemente et.
```c // SPDX-License-Identifier: GPL-2.0 #include "util/debug.h" #include "util/map.h" #include "util/symbol.h" #include "util/sort.h" #include "util/evsel.h" #include "util/event.h" #include "util/evlist.h" #include "util/machine.h" #include "util/parse-events.h" #include "util/thread.h" #include "tests/tests.h" #incl...
Linux kernel'inin 'tools/perf/tests/cpumap' alt sistemi için gerekli C kaynak kodunu implemente et.
```c // SPDX-License-Identifier: GPL-2.0 #include "tests.h" #include <stdio.h> #include "cpumap.h" #include "event.h" #include "util/synthetic-events.h" #include <string.h> #include <linux/bitops.h> #include <internal/cpumap.h> #include "debug.h" struct machine; static int process_event_mask(const struct perf_tool *t...
Linux kernel'inin 'tools/perf/tests/sample-parsing' alt sistemi için gerekli C kaynak kodunu implemente et.
```c // SPDX-License-Identifier: GPL-2.0 #include <stdbool.h> #include <inttypes.h> #include <stdlib.h> #include <string.h> #include <linux/bitops.h> #include <linux/kernel.h> #include <linux/types.h> #include "map_symbol.h" #include "branch.h" #include "event.h" #include "evsel.h" #include "debug.h" #include "util/sy...
Linux işletim sistemi çekirdeği için 'tools/perf/tests/tests' yapılarının ve prototiplerinin bulunduğu C Header dosyasını yaz.
```c /* SPDX-License-Identifier: GPL-2.0 */ #ifndef TESTS_H #define TESTS_H #include <stdbool.h> #include "util/debug.h" enum { TEST_OK = 0, TEST_FAIL = -1, TEST_SKIP = -2, }; #define TEST_ASSERT_VAL(text, cond) \ do { \ if (!(cond)) { \ pr_debug("FAILED %s:%d %s\n", __FILE__, __LINE__,...
Linux kernel'inin 'tools/perf/tests/bp_signal' alt sistemi için gerekli C kaynak kodunu implemente et.
```c // SPDX-License-Identifier: GPL-2.0 /* * Inspired by breakpoint overflow test done by * Vince Weaver <vincent.weaver@maine.edu> for perf_event_tests * (git://github.com/deater/perf_event_tests) */ /* * Powerpc needs __SANE_USERSPACE_TYPES__ before <linux/types.h> to select * 'int-ll64.h' and avoid compile w...
Linux kernel'inin 'tools/perf/tests/hists_cumulate' alt sistemi için gerekli C kaynak kodunu implemente et.
```c // SPDX-License-Identifier: GPL-2.0 #include "util/debug.h" #include "util/dso.h" #include "util/event.h" #include "util/map.h" #include "util/symbol.h" #include "util/sort.h" #include "util/evsel.h" #include "util/evlist.h" #include "util/machine.h" #include "util/parse-events.h" #include "util/thread.h" #include...
Linux kernel'inin 'tools/perf/tests/parse-events' alt sistemi için gerekli C kaynak kodunu implemente et.
```c // SPDX-License-Identifier: GPL-2.0 #include "parse-events.h" #include "evsel.h" #include "evsel_fprintf.h" #include "evlist.h" #include <api/fs/fs.h> #include "tests.h" #include "debug.h" #include "pmu.h" #include "pmus.h" #include "strbuf.h" #include <dirent.h> #include <errno.h> #include "fncache.h" #include <s...
Linux kernel'inin 'tools/perf/tests/dso-data' alt sistemi için gerekli C kaynak kodunu implemente et.
```c // SPDX-License-Identifier: GPL-2.0 #include <dirent.h> #include <stdlib.h> #include <linux/kernel.h> #include <linux/types.h> #include <sys/stat.h> #include <fcntl.h> #include <string.h> #include <sys/time.h> #include <sys/resource.h> #include <api/fs/fs.h> #include "dso.h" #include "dsos.h" #include "machine.h" ...
Linux kernel'inin 'tools/perf/tests/thread-maps-share' alt sistemi için gerekli C kaynak kodunu implemente et.
```c // SPDX-License-Identifier: GPL-2.0 #include "tests.h" #include "machine.h" #include "thread.h" #include "debug.h" static int test__thread_maps_share(struct test_suite *test __maybe_unused, int subtest __maybe_unused) { struct machines machines; struct machine *machine; /* thread group */ struct thread *lead...
Linux kernel'inin 'tools/perf/tests/fdarray' alt sistemi için gerekli C kaynak kodunu implemente et.
```c // SPDX-License-Identifier: GPL-2.0 #include <api/fd/array.h> #include <poll.h> #include "util/debug.h" #include "tests/tests.h" static void fdarray__init_revents(struct fdarray *fda, short revents) { int fd; fda->nr = fda->nr_alloc; for (fd = 0; fd < fda->nr; ++fd) { fda->entries[fd].fd = fda->nr - fd; ...
Linux kernel'inin 'tools/perf/tests/demangle-java-test' alt sistemi için gerekli C kaynak kodunu implemente et.
```c // SPDX-License-Identifier: GPL-2.0 #include <string.h> #include <stdlib.h> #include <stdio.h> #include <linux/kernel.h> #include "debug.h" #include "symbol.h" #include "tests.h" static int test__demangle_java(struct test_suite *test __maybe_unused, int subtest __maybe_unused) { int ret = TEST_OK; char *buf = N...
Linux kernel'inin 'tools/perf/tests/task-exit' alt sistemi için gerekli C kaynak kodunu implemente et.
```c // SPDX-License-Identifier: GPL-2.0 #include "debug.h" #include "evlist.h" #include "evsel.h" #include "target.h" #include "thread_map.h" #include "tests.h" #include "util/mmap.h" #include <errno.h> #include <signal.h> #include <linux/string.h> #include <perf/cpumap.h> #include <perf/evlist.h> #include <perf/mmap...
Linux kernel'inin 'tools/perf/tests/maps' alt sistemi için gerekli C kaynak kodunu implemente et.
```c // SPDX-License-Identifier: GPL-2.0 #include <inttypes.h> #include <linux/compiler.h> #include <linux/kernel.h> #include "tests.h" #include "map.h" #include "maps.h" #include "dso.h" #include "debug.h" struct map_def { const char *name; u64 start; u64 end; }; struct check_maps_cb_args { struct map_def *merge...
Linux kernel'inin 'tools/perf/tests/expr' alt sistemi için gerekli C kaynak kodunu implemente et.
```c // SPDX-License-Identifier: GPL-2.0 #include "util/cputopo.h" #include "util/debug.h" #include "util/expr.h" #include "util/hashmap.h" #include "util/header.h" #include "util/smt.h" #include "tests.h" #include <perf/cpumap.h> #include <math.h> #include <stdlib.h> #include <string.h> #include <string2.h> #include <...
Linux kernel'inin 'tools/perf/tests/kallsyms-split' alt sistemi için gerekli C kaynak kodunu implemente et.
```c // SPDX-License-Identifier: GPL-2.0 #include <linux/compiler.h> #include <fcntl.h> #include <signal.h> #include <unistd.h> #include <sys/stat.h> #include "util/dso.h" #include "util/map.h" #include "util/symbol.h" #include "util/debug.h" #include "util/machine.h" #include "tests.h" /* * This test is to check whe...
Linux kernel'inin 'tools/perf/tests/wp' alt sistemi için gerekli C kaynak kodunu implemente et.
```c // SPDX-License-Identifier: GPL-2.0 #include <stdlib.h> #include <string.h> #include <unistd.h> #include <errno.h> #include <sys/ioctl.h> #include <linux/compiler.h> #include <linux/hw_breakpoint.h> #include <linux/kernel.h> #include "tests.h" #include "debug.h" #include "event.h" #include "cloexec.h" #include ".....
Linux kernel'inin 'tools/perf/tests/is_printable_array' alt sistemi için gerekli C kaynak kodunu implemente et.
```c // SPDX-License-Identifier: GPL-2.0 #include <linux/compiler.h> #include <linux/kernel.h> #include "tests.h" #include "debug.h" #include "print_binary.h" static int test__is_printable_array(struct test_suite *test __maybe_unused, int subtest __maybe_unused) { char buf1[] = { 'k', 'r', 4, 'v', 'a', 0 }; char buf...
Linux kernel'inin 'tools/perf/tests/perf-record' alt sistemi için gerekli C kaynak kodunu implemente et.
```c // SPDX-License-Identifier: GPL-2.0 #include <errno.h> #include <inttypes.h> #include <linux/string.h> #include <sched.h> #include <perf/mmap.h> #include "event.h" #include "evlist.h" #include "evsel.h" #include "debug.h" #include "record.h" #include "tests.h" #include "util/mmap.h" #include "util/sample.h" #incl...
Linux kernel'inin 'tools/perf/tests/bp_account' alt sistemi için gerekli C kaynak kodunu implemente et.
```c // SPDX-License-Identifier: GPL-2.0 /* * Powerpc needs __SANE_USERSPACE_TYPES__ before <linux/types.h> to select * 'int-ll64.h' and avoid compile warnings when printing __u64 with %llu. */ #define __SANE_USERSPACE_TYPES__ #include <stdlib.h> #include <stdio.h> #include <unistd.h> #include <string.h> #include <...
Linux kernel'inin 'tools/perf/tests/api-io' alt sistemi için gerekli C kaynak kodunu implemente et.
```c // SPDX-License-Identifier: GPL-2.0-only #include <sys/types.h> #include <sys/stat.h> #include <fcntl.h> #include <limits.h> #include <stdio.h> #include <stdlib.h> #include <string.h> #include <unistd.h> #include "debug.h" #include "tests.h" #include <api/io.h> #include <linux/kernel.h> #include <linux/zalloc.h> ...
Linux kernel'inin 'tools/perf/tests/tests-scripts' alt sistemi için gerekli C kaynak kodunu implemente et.
```c /* SPDX-License-Identifier: GPL-2.0 */ #include <dirent.h> #include <errno.h> #include <fcntl.h> #include <linux/ctype.h> #include <linux/kernel.h> #include <linux/string.h> #include <linux/zalloc.h> #include <string.h> #include <stdlib.h> #include <sys/types.h> #include <unistd.h> #include <subcmd/exec-cmd.h> #in...
Linux kernel'inin 'tools/perf/tests/stat' alt sistemi için gerekli C kaynak kodunu implemente et.
```c // SPDX-License-Identifier: GPL-2.0 #include <linux/compiler.h> #include "event.h" #include "tests.h" #include "stat.h" #include "counts.h" #include "debug.h" #include "util/synthetic-events.h" static bool has_term(struct perf_record_stat_config *config, u64 tag, u64 val) { unsigned i; for (i = 0; i < c...
Linux kernel'inin 'tools/perf/tests/thread-map' alt sistemi için gerekli C kaynak kodunu implemente et.
```c // SPDX-License-Identifier: GPL-2.0 #include <stdlib.h> #include <string.h> #include <sys/types.h> #include <unistd.h> #include <sys/prctl.h> #include "tests.h" #include "thread_map.h" #include "debug.h" #include "event.h" #include "util/synthetic-events.h" #include <perf/event.h> #include <internal/threadmap.h> ...
Linux kernel'inin 'tools/perf/tests/kmod-path' alt sistemi için gerekli C kaynak kodunu implemente et.
```c // SPDX-License-Identifier: GPL-2.0 #include <stdbool.h> #include <stdlib.h> #include <string.h> #include "tests.h" #include "dso.h" #include "debug.h" #include "event.h" static int test(const char *path, bool alloc_name, bool kmod, int comp, const char *name) { struct kmod_path m; memset(&m, 0x0, sizeof(m))...
Linux kernel'inin 'tools/perf/tests/util' alt sistemi için gerekli C kaynak kodunu implemente et.
```c // SPDX-License-Identifier: GPL-2.0 #include "tests.h" #include "util/blake2s.h" #include "util/debug.h" #include <linux/compiler.h> #include <stdlib.h> #include <string2.h> static int test_strreplace(char needle, const char *haystack, const char *replace, const char *expected) { char *new = strreplace_ch...
Linux kernel'inde 'tools/perf/tests/shell/coresight/asm_pure_loop/asm_pure_loop' modülü için gerekli Low-Level Assembly kodunu yaz.
```assembly /* SPDX-License-Identifier: GPL-2.0 */ /* Tamas Zsoldos <tamas.zsoldos@arm.com>, 2021 */ .globl _start _start: mov x0, 0x0000ffff mov x1, xzr loop: nop nop cbnz x1, noskip nop nop adrp x2, skip add x2, x2, :lo12:skip br x2 nop nop noskip: nop nop skip: sub x0, x0, 1 cbnz x0, loop mov x0,...
Linux kernel'inin 'tools/perf/tests/shell/coresight/memcpy_thread/memcpy_thread' alt sistemi için gerekli C kaynak kodunu implemente et.
```c // SPDX-License-Identifier: GPL-2.0 // Carsten Haitzler <carsten.haitzler@arm.com>, 2021 #include <stdio.h> #include <stdlib.h> #include <unistd.h> #include <string.h> #include <pthread.h> struct args { unsigned long loops; unsigned long size; pthread_t th; void *ret; }; static void *thrfn(void *arg) { stru...
Linux kernel'inin 'tools/perf/tests/shell/coresight/thread_loop/thread_loop' alt sistemi için gerekli C kaynak kodunu implemente et.
```c // SPDX-License-Identifier: GPL-2.0 // Carsten Haitzler <carsten.haitzler@arm.com>, 2021 // define this for gettid() #define _GNU_SOURCE #include <stdio.h> #include <stdlib.h> #include <unistd.h> #include <string.h> #include <pthread.h> #include <sys/syscall.h> #ifndef SYS_gettid // gettid is 178 on arm64 # defi...
Linux kernel'inin 'tools/perf/tests/shell/coresight/unroll_loop_thread/unroll_loop_thread' alt sistemi için gerekli C kaynak kodunu implemente et.
```c // SPDX-License-Identifier: GPL-2.0 // Carsten Haitzler <carsten.haitzler@arm.com>, 2021 #include <stdio.h> #include <stdlib.h> #include <unistd.h> #include <string.h> #include <pthread.h> struct args { pthread_t th; unsigned int in; void *ret; }; static void *thrfn(void *arg) { struct args *a = arg; unsign...
Linux kernel'inin 'tools/perf/tests/workloads/noploop' alt sistemi için gerekli C kaynak kodunu implemente et.
```c /* SPDX-License-Identifier: GPL-2.0 */ #include <pthread.h> #include <stdlib.h> #include <signal.h> #include <unistd.h> #include <linux/compiler.h> #include "../tests.h" static volatile sig_atomic_t done; static void sighandler(int sig __maybe_unused) { done = 1; } static int noploop(int argc, const char **arg...
Linux kernel'inin 'tools/perf/tests/workloads/sqrtloop' alt sistemi için gerekli C kaynak kodunu implemente et.
```c /* SPDX-License-Identifier: GPL-2.0 */ #include <math.h> #include <signal.h> #include <stdlib.h> #include <unistd.h> #include <linux/compiler.h> #include <sys/wait.h> #include "../tests.h" static volatile sig_atomic_t done; static void sighandler(int sig __maybe_unused) { done = 1; } static int __sqrtloop(int ...
Linux kernel'inin 'tools/perf/tests/workloads/leafloop' alt sistemi için gerekli C kaynak kodunu implemente et.
```c /* SPDX-License-Identifier: GPL-2.0 */ #include <signal.h> #include <stdlib.h> #include <linux/compiler.h> #include <unistd.h> #include "../tests.h" /* We want to check these symbols in perf script */ noinline void leaf(volatile int b); noinline void parent(volatile int b); static volatile int a; static volatile...
Linux kernel'inin 'tools/perf/tests/workloads/traploop' alt sistemi için gerekli C kaynak kodunu implemente et.
```c // SPDX-License-Identifier: GPL-2.0 #include <stdlib.h> #include "../tests.h" #define BENCH_RUNS 999999 #ifdef __aarch64__ static void trap_bench(void) { unsigned long val; asm("mrs %0, ID_AA64ISAR0_EL1" : "=r" (val)); /* TRAP + ERET */ } #else static void trap_bench(void) { } #endif static int traploop(in...
Linux kernel'inin 'tools/perf/tests/workloads/code_with_type' alt sistemi için gerekli C kaynak kodunu implemente et.
```c // SPDX-License-Identifier: GPL-2.0 #include <pthread.h> #include <stdlib.h> #include <signal.h> #include <unistd.h> #include <linux/compiler.h> #include "../tests.h" extern void test_rs(uint count); static volatile sig_atomic_t done; static void sighandler(int sig __maybe_unused) { done = 1; } static int cod...
Linux kernel'inin 'tools/perf/tests/workloads/inlineloop' alt sistemi için gerekli C kaynak kodunu implemente et.
```c // SPDX-License-Identifier: GPL-2.0 #include <pthread.h> #include <stdlib.h> #include <signal.h> #include <unistd.h> #include <linux/compiler.h> #include "../tests.h" static volatile int a; static volatile sig_atomic_t done; static void sighandler(int sig __maybe_unused) { done = 1; } static inline void __attr...
Linux kernel'inin 'tools/perf/tests/workloads/datasym' alt sistemi için gerekli C kaynak kodunu implemente et.
```c #include <stdlib.h> #include <signal.h> #include <unistd.h> #include <linux/compiler.h> #include "../tests.h" struct buf { char data1; char reserved[55]; char data2; } __attribute__((aligned(64))); /* volatile to try to avoid the compiler seeing reserved as unused. */ static volatile struct buf workload_datas...
Linux kernel'inin 'tools/perf/tests/workloads/thloop' alt sistemi için gerekli C kaynak kodunu implemente et.
```c /* SPDX-License-Identifier: GPL-2.0 */ #include <pthread.h> #include <stdlib.h> #include <signal.h> #include <unistd.h> #include <linux/compiler.h> #include "../tests.h" static volatile sig_atomic_t done; /* We want to check this symbol in perf report */ noinline void test_loop(void); static void sighandler(int...
Linux kernel'inin 'tools/perf/tests/workloads/landlock' alt sistemi için gerekli C kaynak kodunu implemente et.
```c /* SPDX-License-Identifier: GPL-2.0 */ #include <linux/compiler.h> #include <linux/types.h> #include <unistd.h> #include "../tests.h" /* This workload was initially added to test enum augmentation with BTF in perf * trace because its the only syscall that has an enum argument. Since it is * a recent addition to...
Linux kernel'inin 'tools/perf/tests/workloads/brstack' alt sistemi için gerekli C kaynak kodunu implemente et.
```c /* SPDX-License-Identifier: GPL-2.0 */ #include <stdlib.h> #include "../tests.h" #define BENCH_RUNS 999999 static volatile int cnt; static void brstack_bar(void) { } /* return */ static void brstack_foo(void) { brstack_bar(); /* call */ } /* return */ static void brstack_bench(void) { void (*brstack_...
Linux kernel'inin 'tools/perf/check-header_ignore_hunks/lib/list_sort' alt sistemi için gerekli C kaynak kodunu implemente et.
```c @@ -50,6 +50,7 @@ struct list_head *a, struct list_head *b) { struct list_head *tail = head; + u8 count = 0; for (;;) { /* if equal, take 'a' -- important for sort stability */ @@ -75,6 +76,15 @@ /* Finish linking remainder of list b on to tail */ tail->next = b; do { + /* + * If the merge i...
Linux kernel'inin 'tools/perf/arch/common' alt sistemi için gerekli C kaynak kodunu implemente et.
```c // SPDX-License-Identifier: GPL-2.0 #include <limits.h> #include <stdio.h> #include <stdlib.h> #include <string.h> #include <unistd.h> #include "common.h" #include "../util/env.h" #include "../util/debug.h" #include <linux/zalloc.h> static const char *const arc_triplets[] = { "arc-linux-", "arc-snps-linux-uclib...
Linux işletim sistemi çekirdeği için 'tools/perf/arch/common' yapılarının ve prototiplerinin bulunduğu C Header dosyasını yaz.
```c /* SPDX-License-Identifier: GPL-2.0 */ #ifndef ARCH_PERF_COMMON_H #define ARCH_PERF_COMMON_H #include <stdbool.h> struct perf_env; int perf_env__lookup_objdump(struct perf_env *env, char **path); bool perf_env__single_address_space(struct perf_env *env); #endif /* ARCH_PERF_COMMON_H */ ```
Linux işletim sistemi çekirdeği için 'tools/perf/arch/powerpc/include/dwarf-regs-table' yapılarının ve prototiplerinin bulunduğu C Header dosyasını yaz.
```c /* SPDX-License-Identifier: GPL-2.0 */ #ifdef DEFINE_DWARF_REGSTR_TABLE /* This is included in perf/util/dwarf-regs.c */ /* * Reference: * http://refspecs.linuxfoundation.org/ELF/ppc64/PPC-elf64abi-1.9.html * http://refspecs.linux-foundation.org/elf/elfspec_ppc.pdf */ #define REG_DWARFNUM_NAME(reg, idx) [idx]...
Linux işletim sistemi çekirdeği için 'tools/perf/arch/powerpc/include/arch-tests' yapılarının ve prototiplerinin bulunduğu C Header dosyasını yaz.
```c /* SPDX-License-Identifier: GPL-2.0 */ #ifndef ARCH_TESTS_H #define ARCH_TESTS_H extern struct test_suite *arch_tests[]; #endif ```
Linux işletim sistemi çekirdeği için 'tools/perf/arch/powerpc/include/perf_regs' yapılarının ve prototiplerinin bulunduğu C Header dosyasını yaz.
```c /* SPDX-License-Identifier: GPL-2.0 */ #ifndef ARCH_PERF_REGS_H #define ARCH_PERF_REGS_H #include <stdlib.h> #include <linux/types.h> #include "../../../../arch/powerpc/include/uapi/asm/perf_regs.h" void perf_regs_load(u64 *regs); #define PERF_REGS_MASK ((1ULL << PERF_REG_POWERPC_MAX) - 1) #define PERF_REGS_MA...
Linux kernel'inin 'tools/perf/arch/powerpc/util/sym-handling' alt sistemi için gerekli C kaynak kodunu implemente et.
```c // SPDX-License-Identifier: GPL-2.0-only /* * * Copyright (C) 2015 Naveen N. Rao, IBM Corporation */ #include "dso.h" #include "symbol.h" #include "map.h" #include "probe-event.h" #include "probe-file.h" int arch__choose_best_symbol(struct symbol *syma, struct symbol *symb __maybe_unused) { char *sym...
Linux kernel'inin 'tools/perf/arch/powerpc/util/header' alt sistemi için gerekli C kaynak kodunu implemente et.
```c // SPDX-License-Identifier: GPL-2.0 #include <sys/types.h> #include <errno.h> #include <unistd.h> #include <stdio.h> #include <stdlib.h> #include <string.h> #include <linux/stringify.h> #include "header.h" #include "utils_header.h" #include "metricgroup.h" #include <api/fs/fs.h> #include <sys/auxv.h> static bool ...
Linux kernel'inin 'tools/perf/arch/powerpc/util/pmu' alt sistemi için gerekli C kaynak kodunu implemente et.
```c // SPDX-License-Identifier: GPL-2.0 #include <string.h> #include "../../../util/pmu.h" #include "mem-events.h" void perf_pmu__arch_init(struct perf_pmu *pmu) { if (pmu->is_core) pmu->mem_events = perf_mem_events_power; } ```
Linux kernel'inin 'tools/perf/arch/powerpc/util/unwind-libunwind' alt sistemi için gerekli C kaynak kodunu implemente et.
```c // SPDX-License-Identifier: GPL-2.0-or-later /* * Copyright 2016 Chandan Kumar, IBM Corporation. */ #include <errno.h> #include <libunwind.h> #include <asm/perf_regs.h> #include "../../util/unwind.h" #include "../../util/debug.h" int libunwind__arch_reg_id(int regnum) { switch (regnum) { case UNW_PPC64_R0: ...
Linux kernel'inin 'tools/perf/arch/powerpc/util/evsel' alt sistemi için gerekli C kaynak kodunu implemente et.
```c // SPDX-License-Identifier: GPL-2.0 #include <stdio.h> #include "util/evsel.h" void arch_evsel__set_sample_weight(struct evsel *evsel) { evsel__set_sample_bit(evsel, WEIGHT_STRUCT); } ```
Linux kernel'inin 'tools/perf/arch/powerpc/util/auxtrace' alt sistemi için gerekli C kaynak kodunu implemente et.
```c // SPDX-License-Identifier: GPL-2.0 /* * VPA support */ #include <errno.h> #include <linux/kernel.h> #include <linux/types.h> #include <linux/string.h> #include <linux/zalloc.h> #include "../../util/evlist.h" #include "../../util/debug.h" #include "../../util/auxtrace.h" #include "../../util/powerpc-vpadtl.h" #...
Linux kernel'inin 'tools/perf/arch/powerpc/util/mem-events' alt sistemi için gerekli C kaynak kodunu implemente et.
```c // SPDX-License-Identifier: GPL-2.0 #include "util/map_symbol.h" #include "util/mem-events.h" #include "mem-events.h" #define E(t, n, s, l, a) { .tag = t, .name = n, .event_name = s, .ldlat = l, .aux_event = a } struct perf_mem_event perf_mem_events_power[PERF_MEM_EVENTS__MAX] = { E("ldlat-loads", "%s/mem-loads...
Linux işletim sistemi çekirdeği için 'tools/perf/arch/powerpc/util/utils_header' yapılarının ve prototiplerinin bulunduğu C Header dosyasını yaz.
```c /* SPDX-License-Identifier: GPL-2.0 */ #ifndef __PERF_UTIL_HEADER_H #define __PERF_UTIL_HEADER_H #include <linux/stringify.h> #define mfspr(rn) ({unsigned long rval; \ asm volatile("mfspr %0," __stringify(rn) \ : "=r" (rval)); rval; }) #define SPRN_PVR 0x11F /* Processor Version Register *...
Linux işletim sistemi çekirdeği için 'tools/perf/arch/powerpc/util/mem-events' yapılarının ve prototiplerinin bulunduğu C Header dosyasını yaz.
```c /* SPDX-License-Identifier: GPL-2.0 */ #ifndef _POWER_MEM_EVENTS_H #define _POWER_MEM_EVENTS_H extern struct perf_mem_event perf_mem_events_power[PERF_MEM_EVENTS__MAX]; #endif /* _POWER_MEM_EVENTS_H */ ```
Linux kernel'inin 'tools/perf/arch/powerpc/util/skip-callchain-idx' alt sistemi için gerekli C kaynak kodunu implemente et.
```c // SPDX-License-Identifier: GPL-2.0-or-later /* * Use DWARF Debug information to skip unnecessary callchain entries. * * Copyright (C) 2014 Sukadev Bhattiprolu, IBM Corporation. * Copyright (C) 2014 Ulrich Weigand, IBM Corporation. */ #include <inttypes.h> #include <dwarf.h> #include <elfutils/libdwfl.h> #in...
Linux kernel'inde 'tools/perf/arch/powerpc/tests/regs_load' modülü için gerekli Low-Level Assembly kodunu yaz.
```assembly /* SPDX-License-Identifier: GPL-2.0 */ #include <linux/linkage.h> /* Offset is based on macros from arch/powerpc/include/uapi/asm/ptrace.h. */ #define R0 0 #define R1 1 * 8 #define R2 2 * 8 #define R3 3 * 8 #define R4 4 * 8 #define R5 5 * 8 #define R6 6 * 8 #define R7 7 * 8 #define R8 8 * 8 #defin...
Linux kernel'inin 'tools/perf/arch/powerpc/tests/dwarf-unwind' alt sistemi için gerekli C kaynak kodunu implemente et.
```c // SPDX-License-Identifier: GPL-2.0 #include <string.h> #include "perf_regs.h" #include "thread.h" #include "map.h" #include "maps.h" #include "event.h" #include "debug.h" #include "tests/tests.h" #define STACK_SIZE 8192 static int sample_ustack(struct perf_sample *sample, struct thread *thread, u64 *regs) {...
Linux kernel'inin 'tools/perf/arch/powerpc/tests/arch-tests' alt sistemi için gerekli C kaynak kodunu implemente et.
```c // SPDX-License-Identifier: GPL-2.0 #include <string.h> #include "tests/tests.h" #include "arch-tests.h" struct test_suite *arch_tests[] = { #ifdef HAVE_DWARF_UNWIND_SUPPORT &suite__dwarf_unwind, #endif NULL, }; ```
Linux işletim sistemi çekirdeği için 'tools/perf/arch/sh/include/dwarf-regs-table' yapılarının ve prototiplerinin bulunduğu C Header dosyasını yaz.
```c /* SPDX-License-Identifier: GPL-2.0 */ #ifdef DEFINE_DWARF_REGSTR_TABLE /* This is included in perf/util/dwarf-regs.c */ static const char * const sh_regstr_tbl[] = { "r0", "r1", "r2", "r3", "r4", "r5", "r6", "r7", "r8", "r9", "r10", "r11", "r12", "r13", "r14", "r15", "pc", "pr", }; #endif ```
Linux işletim sistemi çekirdeği için 'tools/perf/arch/s390/include/dwarf-regs-table' yapılarının ve prototiplerinin bulunduğu C Header dosyasını yaz.
```c /* SPDX-License-Identifier: GPL-2.0 */ #ifndef S390_DWARF_REGS_TABLE_H #define S390_DWARF_REGS_TABLE_H #define REG_DWARFNUM_NAME(reg, idx) [idx] = "%" #reg /* * For reference, see DWARF register mapping: * http://refspecs.linuxfoundation.org/ELF/zSeries/lzsabi0_s390/x1542.html */ static const char * const s39...
Linux işletim sistemi çekirdeği için 'tools/perf/arch/s390/include/perf_regs' yapılarının ve prototiplerinin bulunduğu C Header dosyasını yaz.
```c #ifndef ARCH_PERF_REGS_H #define ARCH_PERF_REGS_H #include <stdlib.h> #include <linux/types.h> #include "../../../../arch/s390/include/uapi/asm/perf_regs.h" void perf_regs_load(u64 *regs); #define PERF_REGS_MASK ((1ULL << PERF_REG_S390_MAX) - 1) #define PERF_REGS_MAX PERF_REG_S390_MAX #define PERF_SAMPLE_REGS_A...
Linux kernel'inin 'tools/perf/arch/s390/util/header' alt sistemi için gerekli C kaynak kodunu implemente et.
```c // SPDX-License-Identifier: GPL-2.0-only /* * Implementation of get_cpuid(). * * Copyright IBM Corp. 2014, 2018 * Author(s): Alexander Yarygin <yarygin@linux.vnet.ibm.com> * Thomas Richter <tmricht@linux.vnet.ibm.com> */ #include <sys/types.h> #include <errno.h> #include <unistd.h> #include <stdio.h> ...
Linux kernel'inin 'tools/perf/arch/s390/util/pmu' alt sistemi için gerekli C kaynak kodunu implemente et.
```c // SPDX-License-Identifier: GPL-2.0 /* * Copyright IBM Corp. 2023 * Author(s): Thomas Richter <tmricht@linux.ibm.com> */ #include <string.h> #include "../../../util/pmu.h" #define S390_PMUPAI_CRYPTO "pai_crypto" #define S390_PMUPAI_EXT "pai_ext" #define S390_PMUCPUM_CF "cpum_cf" void perf_pmu__arch_init(...
Linux kernel'inin 'tools/perf/arch/s390/util/machine' alt sistemi için gerekli C kaynak kodunu implemente et.
```c // SPDX-License-Identifier: GPL-2.0 #include <inttypes.h> #include <unistd.h> #include <stdio.h> #include <string.h> #include <internal/lib.h> // page_size #include "machine.h" #include "api/fs/fs.h" #include "debug.h" #include "symbol.h" int arch__fix_module_text_start(u64 *start, u64 *size, const char *name) { ...
Linux kernel'inin 'tools/perf/arch/s390/util/auxtrace' alt sistemi için gerekli C kaynak kodunu implemente et.
```c #include <errno.h> #include <stdbool.h> #include <stdlib.h> #include <linux/kernel.h> #include <linux/types.h> #include <linux/bitops.h> #include <linux/log2.h> #include <linux/zalloc.h> #include "../../util/evlist.h" #include "../../util/auxtrace.h" #include "../../util/evsel.h" #include "../../util/record.h" #...
Linux işletim sistemi çekirdeği için 'tools/perf/arch/loongarch/include/dwarf-regs-table' yapılarının ve prototiplerinin bulunduğu C Header dosyasını yaz.
```c /* SPDX-License-Identifier: GPL-2.0 */ /* * dwarf-regs-table.h : Mapping of DWARF debug register numbers into * register names. * * Copyright (C) 2020-2023 Loongson Technology Corporation Limited */ #ifdef DEFINE_DWARF_REGSTR_TABLE static const char * const loongarch_regstr_tbl[] = { "%r0", "%r1", "%r2", "%...
Linux işletim sistemi çekirdeği için 'tools/perf/arch/loongarch/include/perf_regs' yapılarının ve prototiplerinin bulunduğu C Header dosyasını yaz.
```c /* SPDX-License-Identifier: GPL-2.0 */ #ifndef ARCH_PERF_REGS_H #define ARCH_PERF_REGS_H #include <stdlib.h> #include <linux/types.h> #include "../../../../arch/loongarch/include/uapi/asm/perf_regs.h" #define PERF_REGS_MAX PERF_REG_LOONGARCH_MAX #define PERF_REGS_MASK ((1ULL << PERF_REG_LOONGARCH_MAX) - 1) #en...
Linux kernel'inin 'tools/perf/arch/loongarch/util/header' alt sistemi için gerekli C kaynak kodunu implemente et.
```c // SPDX-License-Identifier: GPL-2.0-only /* * Implementation of get_cpuid(). * * Author: Nikita Shubin <n.shubin@yadro.com> * Bibo Mao <maobibo@loongson.cn> * Huacai Chen <chenhuacai@loongson.cn> */ #include <stdio.h> #include <stdlib.h> #include <api/fs/fs.h> #include <errno.h> #include "ut...
Linux kernel'inin 'tools/perf/arch/loongarch/util/unwind-libunwind' alt sistemi için gerekli C kaynak kodunu implemente et.
```c // SPDX-License-Identifier: GPL-2.0 #include <errno.h> #include <libunwind.h> #include "perf_regs.h" #include "../../util/unwind.h" #include "util/debug.h" int libunwind__arch_reg_id(int regnum) { switch (regnum) { case UNW_LOONGARCH64_R1: return PERF_REG_LOONGARCH_R1; case UNW_LOONGARCH64_R2: return PERF...
Linux işletim sistemi çekirdeği için 'tools/perf/arch/arm/include/dwarf-regs-table' yapılarının ve prototiplerinin bulunduğu C Header dosyasını yaz.
```c /* SPDX-License-Identifier: GPL-2.0 */ #ifdef DEFINE_DWARF_REGSTR_TABLE /* This is included in perf/util/dwarf-regs.c */ static const char * const arm_regstr_tbl[] = { "%r0", "%r1", "%r2", "%r3", "%r4", "%r5", "%r6", "%r7", "%r8", "%r9", "%r10", "%fp", "%ip", "%sp", "%lr", "%pc", }; #endif ```
Linux işletim sistemi çekirdeği için 'tools/perf/arch/arm/include/arch-tests' yapılarının ve prototiplerinin bulunduğu C Header dosyasını yaz.
```c /* SPDX-License-Identifier: GPL-2.0 */ #ifndef ARCH_TESTS_H #define ARCH_TESTS_H extern struct test_suite *arch_tests[]; #endif ```
Linux işletim sistemi çekirdeği için 'tools/perf/arch/arm/include/perf_regs' yapılarının ve prototiplerinin bulunduğu C Header dosyasını yaz.
```c /* SPDX-License-Identifier: GPL-2.0 */ #ifndef ARCH_PERF_REGS_H #define ARCH_PERF_REGS_H #include <stdlib.h> #include <linux/types.h> #include "../../../../arch/arm/include/uapi/asm/perf_regs.h" void perf_regs_load(u64 *regs); #define PERF_REGS_MASK ((1ULL << PERF_REG_ARM_MAX) - 1) #define PERF_REGS_MAX PERF_RE...
Linux kernel'inin 'tools/perf/arch/arm/util/pmu' alt sistemi için gerekli C kaynak kodunu implemente et.
```c // SPDX-License-Identifier: GPL-2.0 /* * Copyright(C) 2015 Linaro Limited. All rights reserved. * Author: Mathieu Poirier <mathieu.poirier@linaro.org> */ #include <string.h> #include <linux/coresight-pmu.h> #include <linux/perf_event.h> #include <linux/string.h> #include "arm-spe.h" #include "hisi-ptt.h" #inc...
Linux kernel'inin 'tools/perf/arch/arm/util/unwind-libunwind' alt sistemi için gerekli C kaynak kodunu implemente et.
```c // SPDX-License-Identifier: GPL-2.0 #include <errno.h> #include <libunwind.h> #include "perf_regs.h" #include "../../../util/unwind.h" #include "../../../util/debug.h" int libunwind__arch_reg_id(int regnum) { switch (regnum) { case UNW_ARM_R0: return PERF_REG_ARM_R0; case UNW_ARM_R1: return PERF_REG_ARM_R...
Linux kernel'inin 'tools/perf/arch/arm/util/auxtrace' alt sistemi için gerekli C kaynak kodunu implemente et.
```c // SPDX-License-Identifier: GPL-2.0 /* * Copyright(C) 2015 Linaro Limited. All rights reserved. * Author: Mathieu Poirier <mathieu.poirier@linaro.org> */ #include <dirent.h> #include <errno.h> #include <stdbool.h> #include <linux/coresight-pmu.h> #include <stdlib.h> #include <api/fs/fs.h> #include "../../../u...
Linux kernel'inin 'tools/perf/arch/arm/util/cs-etm' alt sistemi için gerekli C kaynak kodunu implemente et.
```c // SPDX-License-Identifier: GPL-2.0 /* * Copyright(C) 2015 Linaro Limited. All rights reserved. * Author: Mathieu Poirier <mathieu.poirier@linaro.org> */ #include <api/fs/fs.h> #include <linux/bits.h> #include <linux/bitops.h> #include <linux/compiler.h> #include <linux/coresight-pmu.h> #include <linux/kernel....
Linux işletim sistemi çekirdeği için 'tools/perf/arch/arm/util/cs-etm' yapılarının ve prototiplerinin bulunduğu C Header dosyasını yaz.
```c /* SPDX-License-Identifier: GPL-2.0 */ /* * Copyright(C) 2015 Linaro Limited. All rights reserved. * Author: Mathieu Poirier <mathieu.poirier@linaro.org> */ #ifndef INCLUDE__PERF_CS_ETM_H__ #define INCLUDE__PERF_CS_ETM_H__ struct auxtrace_record *cs_etm_record_init(int *err); #endif ```
Linux kernel'inde 'tools/perf/arch/arm/tests/regs_load' modülü için gerekli Low-Level Assembly kodunu yaz.
```assembly /* SPDX-License-Identifier: GPL-2.0 */ #include <linux/linkage.h> #define R0 0x00 #define R1 0x08 #define R2 0x10 #define R3 0x18 #define R4 0x20 #define R5 0x28 #define R6 0x30 #define R7 0x38 #define R8 0x40 #define R9 0x48 #define SL 0x50 #define FP 0x58 #define IP 0x60 #define SP 0x68 #define LR 0x70 #...
Linux kernel'inin 'tools/perf/arch/arm/tests/dwarf-unwind' alt sistemi için gerekli C kaynak kodunu implemente et.
```c // SPDX-License-Identifier: GPL-2.0 #include <string.h> #include "perf_regs.h" #include "thread.h" #include "map.h" #include "maps.h" #include "event.h" #include "debug.h" #include "tests/tests.h" #define STACK_SIZE 8192 static int sample_ustack(struct perf_sample *sample, struct thread *thread, u64 *regs) {...
Linux kernel'inin 'tools/perf/arch/arm/tests/vectors-page' alt sistemi için gerekli C kaynak kodunu implemente et.
```c // SPDX-License-Identifier: GPL-2.0 #include <stdio.h> #include <string.h> #include <linux/compiler.h> #include "debug.h" #include "tests/tests.h" #include "util/find-map.c" #define VECTORS__MAP_NAME "[vectors]" static int test__vectors_page(struct test_suite *test __maybe_unused, int subtest __maybe_unused) { ...
Linux kernel'inin 'tools/perf/arch/arm/tests/arch-tests' alt sistemi için gerekli C kaynak kodunu implemente et.
```c // SPDX-License-Identifier: GPL-2.0 #include <string.h> #include "tests/tests.h" #include "arch-tests.h" struct test_suite *arch_tests[] = { #ifdef HAVE_DWARF_UNWIND_SUPPORT &suite__dwarf_unwind, #endif &suite__vectors_page, NULL, }; ```
Linux işletim sistemi çekirdeği için 'tools/perf/arch/arm64/include/dwarf-regs-table' yapılarının ve prototiplerinin bulunduğu C Header dosyasını yaz.
```c /* SPDX-License-Identifier: GPL-2.0 */ #ifdef DEFINE_DWARF_REGSTR_TABLE /* This is included in perf/util/dwarf-regs.c */ static const char * const aarch64_regstr_tbl[] = { "%x0", "%x1", "%x2", "%x3", "%x4", "%x5", "%x6", "%x7", "%x8", "%x9", "%x10", "%x11", "%x12", "%x13", "%x14", "%x15", "%x16", "%x17", "%x1...
Linux işletim sistemi çekirdeği için 'tools/perf/arch/arm64/include/arch-tests' yapılarının ve prototiplerinin bulunduğu C Header dosyasını yaz.
```c /* SPDX-License-Identifier: GPL-2.0 */ #ifndef ARCH_TESTS_H #define ARCH_TESTS_H struct test_suite; int test__cpuid_match(struct test_suite *test, int subtest); extern struct test_suite *arch_tests[]; #endif ```
Linux işletim sistemi çekirdeği için 'tools/perf/arch/arm64/include/perf_regs' yapılarının ve prototiplerinin bulunduğu C Header dosyasını yaz.
```c /* SPDX-License-Identifier: GPL-2.0 */ #ifndef ARCH_PERF_REGS_H #define ARCH_PERF_REGS_H #include <stdlib.h> #include <linux/types.h> #define perf_event_arm_regs perf_event_arm64_regs #include "../../../../arch/arm64/include/uapi/asm/perf_regs.h" #undef perf_event_arm_regs void perf_regs_load(u64 *regs); #defin...
Linux kernel'inin 'tools/perf/arch/arm64/util/arm-spe' alt sistemi için gerekli C kaynak kodunu implemente et.
```c // SPDX-License-Identifier: GPL-2.0 /* * Arm Statistical Profiling Extensions (SPE) support * Copyright (c) 2017-2018, Arm Ltd. */ #include <linux/kernel.h> #include <linux/types.h> #include <linux/bitops.h> #include <linux/log2.h> #include <linux/string.h> #include <linux/zalloc.h> #include <errno.h> #include...
Linux kernel'inin 'tools/perf/arch/arm64/util/header' alt sistemi için gerekli C kaynak kodunu implemente et.
```c #include <linux/bits.h> #include <linux/bitfield.h> #include <stdio.h> #include <stdlib.h> #include <perf/cpumap.h> #include <api/fs/fs.h> #include <errno.h> #include "debug.h" #include "header.h" #define MIDR "/regs/identification/midr_el1" #define MIDR_SIZE 19 #define MIDR_REVISION_MASK GENMASK(3, 0) #defi...
Linux kernel'inin 'tools/perf/arch/arm64/util/pmu' alt sistemi için gerekli C kaynak kodunu implemente et.
```c // SPDX-License-Identifier: GPL-2.0 #include "../../../util/pmu.h" #include "../../../util/pmus.h" #include "../../../util/tool_pmu.h" #include <api/fs/fs.h> u64 tool_pmu__cpu_slots_per_cycle(void) { char path[PATH_MAX]; unsigned long long slots = 0; struct perf_pmu *pmu = perf_pmus__find_core_pmu(); if (pm...
Linux kernel'inin 'tools/perf/arch/arm64/util/machine' alt sistemi için gerekli C kaynak kodunu implemente et.
```c // SPDX-License-Identifier: GPL-2.0 #include "callchain.h" // prototype of arch__add_leaf_frame_record_opts #include "perf_regs.h" #include "record.h" #define SMPL_REG_MASK(b) (1ULL << (b)) void arch__add_leaf_frame_record_opts(struct record_opts *opts) { opts->sample_user_regs |= SMPL_REG_MASK(PERF_REG_ARM64_...
Linux kernel'inin 'tools/perf/arch/arm64/util/unwind-libunwind' alt sistemi için gerekli C kaynak kodunu implemente et.
```c // SPDX-License-Identifier: GPL-2.0 #include <errno.h> #ifndef REMOTE_UNWIND_LIBUNWIND #include <libunwind.h> #include "perf_regs.h" #include "../../../util/unwind.h" #endif #include "../../../util/debug.h" int LIBUNWIND__ARCH_REG_ID(int regnum) { if (regnum < 0 || regnum >= PERF_REG_ARM64_EXTENDED_MAX) retur...
Linux kernel'inin 'tools/perf/arch/arm64/util/mem-events' alt sistemi için gerekli C kaynak kodunu implemente et.
```c // SPDX-License-Identifier: GPL-2.0 #include "util/map_symbol.h" #include "util/mem-events.h" #include "mem-events.h" #define E(t, n, s, l, a) { .tag = t, .name = n, .event_name = s, .ldlat = l, .aux_event = a } struct perf_mem_event perf_mem_events_arm[PERF_MEM_EVENTS__MAX] = { E("spe-load", "%s/ts_enable=1,pa...
Linux kernel'inin 'tools/perf/arch/arm64/util/hisi-ptt' alt sistemi için gerekli C kaynak kodunu implemente et.
```c // SPDX-License-Identifier: GPL-2.0 /* * HiSilicon PCIe Trace and Tuning (PTT) support * Copyright (c) 2022 HiSilicon Technologies Co., Ltd. */ #include <linux/kernel.h> #include <linux/types.h> #include <linux/bitops.h> #include <linux/log2.h> #include <linux/zalloc.h> #include <errno.h> #include <time.h> #i...
Linux işletim sistemi çekirdeği için 'tools/perf/arch/arm64/util/mem-events' yapılarının ve prototiplerinin bulunduğu C Header dosyasını yaz.
```c /* SPDX-License-Identifier: GPL-2.0 */ #ifndef _ARM64_MEM_EVENTS_H #define _ARM64_MEM_EVENTS_H extern struct perf_mem_event perf_mem_events_arm[PERF_MEM_EVENTS__MAX]; #endif /* _ARM64_MEM_EVENTS_H */ ```
Linux kernel'inin 'tools/perf/arch/arm64/util/tsc' alt sistemi için gerekli C kaynak kodunu implemente et.
```c // SPDX-License-Identifier: GPL-2.0 #include <linux/types.h> #include "../../../util/tsc.h" u64 rdtsc(void) { u64 val; /* * According to ARM DDI 0487F.c, from Armv8.0 to Armv8.5 inclusive, the * system counter is at least 56 bits wide; from Armv8.6, the counter * must be 64 bits wide. So the system co...
Linux kernel'inde 'tools/perf/arch/arm64/tests/regs_load' modülü için gerekli Low-Level Assembly kodunu yaz.
```assembly /* SPDX-License-Identifier: GPL-2.0 */ #include <linux/linkage.h> .text .type perf_regs_load,%function #define STR_REG(r) str x##r, [x0, 8 * r] #define LDR_REG(r) ldr x##r, [x0, 8 * r] #define SP (8 * 31) #define PC (8 * 32) SYM_FUNC_START(perf_regs_load) STR_REG(0) STR_REG(1) STR_REG(2) STR_REG(3) ST...
Linux kernel'inin 'tools/perf/arch/arm64/tests/dwarf-unwind' alt sistemi için gerekli C kaynak kodunu implemente et.
```c // SPDX-License-Identifier: GPL-2.0 #include <string.h> #include "perf_regs.h" #include "thread.h" #include "map.h" #include "maps.h" #include "event.h" #include "debug.h" #include "tests/tests.h" #define STACK_SIZE 8192 static int sample_ustack(struct perf_sample *sample, struct thread *thread, u64 *regs) { ...