instruction stringlengths 82 202 | input stringclasses 1
value | output stringlengths 73 23.9M |
|---|---|---|
Linux kernel'inin 'tools/lib/bpf/libbpf_probes' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: (LGPL-2.1 OR BSD-2-Clause)
/* Copyright (c) 2019 Netronome Systems, Inc. */
#include <errno.h>
#include <fcntl.h>
#include <string.h>
#include <stdlib.h>
#include <unistd.h>
#include <net/if.h>
#include <sys/utsname.h>
#include <linux/btf.h>
#include <linux/filter.h>
#include <linux/k... | |
Linux kernel'inin 'tools/lib/bpf/nlattr' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: (LGPL-2.1 OR BSD-2-Clause)
/*
* NETLINK Netlink attributes
*
* Copyright (c) 2003-2013 Thomas Graf <tgraf@suug.ch>
*/
#include <errno.h>
#include <string.h>
#include <stdio.h>
#include <linux/rtnetlink.h>
#include "nlattr.h"
#include "libbpf_internal.h"
static uint16_t nla_a... | |
Linux kernel'inin 'tools/lib/bpf/btf_relocate' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: (LGPL-2.1 OR BSD-2-Clause)
/* Copyright (c) 2024, Oracle and/or its affiliates. */
#ifndef _GNU_SOURCE
#define _GNU_SOURCE
#endif
#ifdef __KERNEL__
#include <linux/bpf.h>
#include <linux/bsearch.h>
#include <linux/btf.h>
#include <linux/sort.h>
#include <linux/string.h>
#include <linu... | |
Linux işletim sistemi çekirdeği için 'tools/lib/bpf/zip' yapılarının ve prototiplerinin bulunduğu C Header dosyasını yaz. | ```c
/* SPDX-License-Identifier: (LGPL-2.1 OR BSD-2-Clause) */
#ifndef __LIBBPF_ZIP_H
#define __LIBBPF_ZIP_H
#include <linux/types.h>
/* Represents an open zip archive.
* Only basic ZIP files are supported, in particular the following are not
* supported:
* - encryption
* - streaming
* - multi-part ZIP files
*... | |
Linux kernel'inin 'tools/lib/bpf/btf_dump' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: (LGPL-2.1 OR BSD-2-Clause)
/*
* BTF-to-C type converter.
*
* Copyright (c) 2019 Facebook
*/
#include <stdbool.h>
#include <stddef.h>
#include <stdlib.h>
#include <string.h>
#include <ctype.h>
#include <endian.h>
#include <errno.h>
#include <limits.h>
#include <linux/err.h>
#includ... | |
Linux işletim sistemi çekirdeği için 'tools/lib/bpf/strset' yapılarının ve prototiplerinin bulunduğu C Header dosyasını yaz. | ```c
/* SPDX-License-Identifier: (LGPL-2.1 OR BSD-2-Clause) */
/* Copyright (c) 2021 Facebook */
#ifndef __LIBBPF_STRSET_H
#define __LIBBPF_STRSET_H
#include <stdbool.h>
#include <stddef.h>
struct strset;
struct strset *strset__new(size_t max_data_sz, const char *init_data, size_t init_data_sz);
void strset__free(s... | |
Linux işletim sistemi çekirdeği için 'tools/lib/bpf/libbpf_version' yapılarının ve prototiplerinin bulunduğu C Header dosyasını yaz. | ```c
/* SPDX-License-Identifier: (LGPL-2.1 OR BSD-2-Clause) */
/* Copyright (C) 2021 Facebook */
#ifndef __LIBBPF_VERSION_H
#define __LIBBPF_VERSION_H
#define LIBBPF_MAJOR_VERSION 1
#define LIBBPF_MINOR_VERSION 8
#endif /* __LIBBPF_VERSION_H */
``` | |
Linux kernel'inin 'tools/lib/bpf/relo_core' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: (LGPL-2.1 OR BSD-2-Clause)
/* Copyright (c) 2019 Facebook */
#ifdef __KERNEL__
#include <linux/bpf.h>
#include <linux/btf.h>
#include <linux/string.h>
#include <linux/bpf_verifier.h>
#include "relo_core.h"
static const char *btf_kind_str(const struct btf_type *t)
{
return btf_type_st... | |
Linux işletim sistemi çekirdeği için 'tools/lib/bpf/bpf_tracing' yapılarının ve prototiplerinin bulunduğu C Header dosyasını yaz. | ```c
/* SPDX-License-Identifier: (LGPL-2.1 OR BSD-2-Clause) */
#ifndef __BPF_TRACING_H__
#define __BPF_TRACING_H__
#include "bpf_helpers.h"
/* Scan the ARCH passed in from ARCH env variable (see Makefile) */
#if defined(__TARGET_ARCH_x86)
#define bpf_target_x86
#define bpf_target_defined
#elif defined(__TARGET_ARCH... | |
Linux kernel'inin 'tools/lib/bpf/btf_iter' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: (LGPL-2.1 OR BSD-2-Clause)
/* Copyright (c) 2021 Facebook */
/* Copyright (c) 2024, Oracle and/or its affiliates. */
#ifdef __KERNEL__
#include <linux/bpf.h>
#include <linux/btf.h>
#define btf_var_secinfos(t) (struct btf_var_secinfo *)btf_type_var_secinfo(t)
#else
#include "btf.h"
#i... | |
Linux kernel'inin 'tools/lib/bpf/zip' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: (LGPL-2.1 OR BSD-2-Clause)
/*
* Routines for dealing with .zip archives.
*
* Copyright (c) Meta Platforms, Inc. and affiliates.
*/
#include <errno.h>
#include <fcntl.h>
#include <stdint.h>
#include <stdlib.h>
#include <string.h>
#include <sys/mman.h>
#include <unistd.h>
#include "... | |
Linux işletim sistemi çekirdeği için 'tools/lib/bpf/libbpf_common' yapılarının ve prototiplerinin bulunduğu C Header dosyasını yaz. | ```c
/* SPDX-License-Identifier: (LGPL-2.1 OR BSD-2-Clause) */
/*
* Common user-facing libbpf helpers.
*
* Copyright (c) 2019 Facebook
*/
#ifndef __LIBBPF_LIBBPF_COMMON_H
#define __LIBBPF_LIBBPF_COMMON_H
#include <string.h>
#include "libbpf_version.h"
#ifndef LIBBPF_API
#define LIBBPF_API __attribute__((visibil... | |
Linux işletim sistemi çekirdeği için 'tools/lib/bpf/relo_core' yapılarının ve prototiplerinin bulunduğu C Header dosyasını yaz. | ```c
/* SPDX-License-Identifier: (LGPL-2.1 OR BSD-2-Clause) */
/* Copyright (c) 2019 Facebook */
#ifndef __RELO_CORE_H
#define __RELO_CORE_H
#include <linux/bpf.h>
struct bpf_core_cand {
const struct btf *btf;
__u32 id;
};
/* dynamically sized list of type IDs and its associated struct btf */
struct bpf_core_cand... | |
Linux kernel'inin 'tools/lib/bpf/hashmap' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: (LGPL-2.1 OR BSD-2-Clause)
/*
* Generic non-thread safe hash map implementation.
*
* Copyright (c) 2019 Facebook
*/
#include <stdint.h>
#include <stdlib.h>
#include <stdio.h>
#include <errno.h>
#include <linux/err.h>
#include "hashmap.h"
/* make sure libbpf doesn't use kernel-only... | |
Linux kernel'inin 'tools/lib/bpf/usdt' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: (LGPL-2.1 OR BSD-2-Clause)
/* Copyright (c) 2022 Meta Platforms, Inc. and affiliates. */
#include <ctype.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <libelf.h>
#include <gelf.h>
#include <unistd.h>
#include <linux/ptrace.h>
#include <linux/kernel.h>
/* s8 wil... | |
Linux işletim sistemi çekirdeği için 'tools/lib/bpf/libbpf_legacy' yapılarının ve prototiplerinin bulunduğu C Header dosyasını yaz. | ```c
/* SPDX-License-Identifier: (LGPL-2.1 OR BSD-2-Clause) */
/*
* Libbpf legacy APIs (either discouraged or deprecated, as mentioned in [0])
*
* [0] https://docs.google.com/document/d/1UyjTZuPFWiPFyKk1tV5an11_iaRuec6U-ZESZ54nNTY
*
* Copyright (C) 2021 Facebook
*/
#ifndef __LIBBPF_LEGACY_BPF_H
#define __LIBBP... | |
Linux kernel'inin 'tools/lib/bpf/ringbuf' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: (LGPL-2.1 OR BSD-2-Clause)
/*
* Ring buffer operations.
*
* Copyright (C) 2020 Facebook, Inc.
*/
#ifndef _GNU_SOURCE
#define _GNU_SOURCE
#endif
#include <stdlib.h>
#include <stdio.h>
#include <errno.h>
#include <unistd.h>
#include <linux/err.h>
#include <linux/bpf.h>
#include <asm/b... | |
Linux işletim sistemi çekirdeği için 'tools/lib/bpf/usdt.bpf' yapılarının ve prototiplerinin bulunduğu C Header dosyasını yaz. | ```c
/* SPDX-License-Identifier: (LGPL-2.1 OR BSD-2-Clause) */
/* Copyright (c) 2022 Meta Platforms, Inc. and affiliates. */
#ifndef __USDT_BPF_H__
#define __USDT_BPF_H__
#include <linux/errno.h>
#include "bpf_helpers.h"
#include "bpf_tracing.h"
/* Below types and maps are internal implementation details of libbpf's ... | |
Linux işletim sistemi çekirdeği için 'tools/lib/bpf/bpf_endian' yapılarının ve prototiplerinin bulunduğu C Header dosyasını yaz. | ```c
/* SPDX-License-Identifier: (LGPL-2.1 OR BSD-2-Clause) */
#ifndef __BPF_ENDIAN__
#define __BPF_ENDIAN__
/*
* Isolate byte #n and put it into byte #m, for __u##b type.
* E.g., moving byte #6 (nnnnnnnn) into byte #1 (mmmmmmmm) for __u64:
* 1) xxxxxxxx nnnnnnnn xxxxxxxx xxxxxxxx xxxxxxxx xxxxxxxx mmmmmmmm xxxxxxx... | |
Linux işletim sistemi çekirdeği için 'tools/lib/bpf/bpf_gen_internal' yapılarının ve prototiplerinin bulunduğu C Header dosyasını yaz. | ```c
/* SPDX-License-Identifier: (LGPL-2.1 OR BSD-2-Clause) */
/* Copyright (c) 2021 Facebook */
#ifndef __BPF_GEN_INTERNAL_H
#define __BPF_GEN_INTERNAL_H
#include "bpf.h"
#include "libbpf_internal.h"
struct ksym_relo_desc {
const char *name;
int kind;
int insn_idx;
bool is_weak;
bool is_typeless;
bool is_ld64;... | |
Linux işletim sistemi çekirdeği için 'tools/lib/bpf/bpf_helpers' yapılarının ve prototiplerinin bulunduğu C Header dosyasını yaz. | ```c
/* SPDX-License-Identifier: (LGPL-2.1 OR BSD-2-Clause) */
#ifndef __BPF_HELPERS__
#define __BPF_HELPERS__
/*
* Note that bpf programs need to include either
* vmlinux.h (auto-generated from BTF) or linux/types.h
* in advance since bpf_helper_defs.h uses such types
* as __u64.
*/
#include "bpf_helper_defs.h"
... | |
Linux kernel'inin 'tools/lib/bpf/features' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: (LGPL-2.1 OR BSD-2-Clause)
/* Copyright (c) 2023 Meta Platforms, Inc. and affiliates. */
#include <linux/kernel.h>
#include <linux/filter.h>
#include "bpf.h"
#include "libbpf.h"
#include "libbpf_common.h"
#include "libbpf_internal.h"
static inline __u64 ptr_to_u64(const void *ptr)
{
r... | |
Linux kernel'inin 'tools/lib/bpf/libbpf' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: (LGPL-2.1 OR BSD-2-Clause)
/*
* Common eBPF ELF object loading operations.
*
* Copyright (C) 2013-2015 Alexei Starovoitov <ast@kernel.org>
* Copyright (C) 2015 Wang Nan <wangnan0@huawei.com>
* Copyright (C) 2015 Huawei Inc.
* Copyright (C) 2017 Nicira, Inc.
* Copyright (C) 2019 ... | |
Linux kernel'inin 'tools/lib/bpf/elf' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: (LGPL-2.1 OR BSD-2-Clause)
#ifndef _GNU_SOURCE
#define _GNU_SOURCE
#endif
#include <libelf.h>
#include <gelf.h>
#include <fcntl.h>
#include <linux/kernel.h>
#include "libbpf_internal.h"
/* A SHT_GNU_versym section holds 16-bit words. This bit is set if
* the symbol is hidden and can... | |
Linux işletim sistemi çekirdeği için 'tools/lib/bpf/hashmap' yapılarının ve prototiplerinin bulunduğu C Header dosyasını yaz. | ```c
/* SPDX-License-Identifier: (LGPL-2.1 OR BSD-2-Clause) */
/*
* Generic non-thread safe hash map implementation.
*
* Copyright (c) 2019 Facebook
*/
#ifndef __LIBBPF_HASHMAP_H
#define __LIBBPF_HASHMAP_H
#include <stdbool.h>
#include <stddef.h>
#include <limits.h>
static inline size_t hash_bits(size_t h, int b... | |
Linux kernel'inin 'tools/lib/bpf/btf' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: (LGPL-2.1 OR BSD-2-Clause)
/* Copyright (c) 2018 Facebook */
#include <byteswap.h>
#include <endian.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <fcntl.h>
#include <unistd.h>
#include <errno.h>
#include <sys/utsname.h>
#include <sys/param.h>
#include <sys/stat... | |
Linux işletim sistemi çekirdeği için 'tools/lib/bpf/libbpf_internal' yapılarının ve prototiplerinin bulunduğu C Header dosyasını yaz. | ```c
/* SPDX-License-Identifier: (LGPL-2.1 OR BSD-2-Clause) */
/*
* Internal libbpf helpers.
*
* Copyright (c) 2019 Facebook
*/
#ifndef __LIBBPF_LIBBPF_INTERNAL_H
#define __LIBBPF_LIBBPF_INTERNAL_H
#include <stdlib.h>
#include <byteswap.h>
#include <limits.h>
#include <errno.h>
#include <linux/err.h>
#include <f... | |
Linux işletim sistemi çekirdeği için 'tools/lib/bpf/bpf' yapılarının ve prototiplerinin bulunduğu C Header dosyasını yaz. | ```c
/* SPDX-License-Identifier: (LGPL-2.1 OR BSD-2-Clause) */
/*
* Common BPF ELF operations.
*
* Copyright (C) 2013-2015 Alexei Starovoitov <ast@kernel.org>
* Copyright (C) 2015 Wang Nan <wangnan0@huawei.com>
* Copyright (C) 2015 Huawei Inc.
*
* This program is free software; you can redistribute it and/or
*... | |
Linux işletim sistemi çekirdeği için 'tools/lib/bpf/libbpf' yapılarının ve prototiplerinin bulunduğu C Header dosyasını yaz. | ```c
/* SPDX-License-Identifier: (LGPL-2.1 OR BSD-2-Clause) */
/*
* Common eBPF ELF object loading operations.
*
* Copyright (C) 2013-2015 Alexei Starovoitov <ast@kernel.org>
* Copyright (C) 2015 Wang Nan <wangnan0@huawei.com>
* Copyright (C) 2015 Huawei Inc.
*/
#ifndef __LIBBPF_LIBBPF_H
#define __LIBBPF_LIBBPF_... | |
Linux işletim sistemi çekirdeği için 'tools/lib/bpf/nlattr' yapılarının ve prototiplerinin bulunduğu C Header dosyasını yaz. | ```c
/* SPDX-License-Identifier: (LGPL-2.1 OR BSD-2-Clause) */
/*
* NETLINK Netlink attributes
*
* Copyright (c) 2003-2013 Thomas Graf <tgraf@suug.ch>
*/
#ifndef __LIBBPF_NLATTR_H
#define __LIBBPF_NLATTR_H
#include <stdint.h>
#include <string.h>
#include <errno.h>
#include <linux/netlink.h>
#include <linux/... | |
Linux kernel'inin 'tools/lib/bpf/bpf_prog_linfo' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: (LGPL-2.1 OR BSD-2-Clause)
/* Copyright (c) 2018 Facebook */
#include <string.h>
#include <stdlib.h>
#include <linux/err.h>
#include <linux/bpf.h>
#include "libbpf.h"
#include "libbpf_internal.h"
struct bpf_prog_linfo {
void *raw_linfo;
void *raw_jited_linfo;
__u32 *nr_jited_linfo_... | |
Linux işletim sistemi çekirdeği için 'tools/lib/perf/internal' yapılarının ve prototiplerinin bulunduğu C Header dosyasını yaz. | ```c
/* SPDX-License-Identifier: GPL-2.0 */
#ifndef __LIBPERF_INTERNAL_H
#define __LIBPERF_INTERNAL_H
#include <perf/core.h>
void libperf_print(enum libperf_print_level level,
const char *format, ...)
__attribute__((format(printf, 2, 3)));
#define __pr(level, fmt, ...) \
do { \
li... | |
Linux kernel'inin 'tools/lib/perf/evsel' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0
#include <errno.h>
#include <unistd.h>
#include <sys/syscall.h>
#include <perf/evsel.h>
#include <perf/cpumap.h>
#include <perf/threadmap.h>
#include <linux/hash.h>
#include <linux/list.h>
#include <internal/evsel.h>
#include <linux/zalloc.h>
#include <stdlib.h>
#include <intern... | |
Linux kernel'inin 'tools/lib/perf/threadmap' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0
#include <perf/threadmap.h>
#include <stdlib.h>
#include <linux/refcount.h>
#include <internal/threadmap.h>
#include <string.h>
#include <asm/bug.h>
#include <stdio.h>
static void perf_thread_map__reset(struct perf_thread_map *map, int start, int nr)
{
size_t size = (nr - star... | |
Linux kernel'inin 'tools/lib/perf/evlist' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0
#include <perf/evlist.h>
#include <perf/evsel.h>
#include <linux/bitops.h>
#include <linux/list.h>
#include <linux/hash.h>
#include <sys/ioctl.h>
#include <internal/evlist.h>
#include <internal/evsel.h>
#include <internal/xyarray.h>
#include <internal/mmap.h>
#include <internal/... | |
Linux kernel'inin 'tools/lib/perf/core' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0-only
#define __printf(a, b) __attribute__((format(printf, a, b)))
#include <stdio.h>
#include <stdarg.h>
#include <unistd.h>
#include <linux/compiler.h>
#include <perf/core.h>
#include <internal/lib.h>
#include "internal.h"
static int __base_pr(enum libperf_print_level level... | |
Linux kernel'inin 'tools/lib/perf/xyarray' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0
#include <internal/xyarray.h>
#include <linux/zalloc.h>
#include <stdlib.h>
#include <string.h>
struct xyarray *xyarray__new(int xlen, int ylen, size_t entry_size)
{
size_t row_size = ylen * entry_size;
struct xyarray *xy = zalloc(sizeof(*xy) + xlen * row_size);
if (xy != N... | |
Linux kernel'inin 'tools/lib/perf/cpumap' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0-only
#include <errno.h>
#include <perf/cpumap.h>
#include <stdlib.h>
#include <linux/refcount.h>
#include <internal/cpumap.h>
#include <asm/bug.h>
#include <stdio.h>
#include <string.h>
#include <unistd.h>
#include <ctype.h>
#include <limits.h>
#include "internal.h"
#include <ap... | |
Linux kernel'inin 'tools/lib/perf/mmap' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0
#include <sys/mman.h>
#include <inttypes.h>
#include <asm/bug.h>
#include <errno.h>
#include <string.h>
#include <linux/ring_buffer.h>
#include <linux/perf_event.h>
#include <perf/mmap.h>
#include <perf/event.h>
#include <perf/evsel.h>
#include <internal/mmap.h>
#include <intern... | |
Linux kernel'inin 'tools/lib/perf/lib' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0
#include <unistd.h>
#include <stdbool.h>
#include <errno.h>
#include <linux/kernel.h>
#include <internal/lib.h>
unsigned int page_size;
static ssize_t ion(bool is_read, int fd, void *buf, size_t n)
{
void *buf_start = buf;
size_t left = n;
while (left) {
/* buf must be t... | |
Linux işletim sistemi çekirdeği için 'tools/lib/perf/include/perf/threadmap' yapılarının ve prototiplerinin bulunduğu C Header dosyasını yaz. | ```c
/* SPDX-License-Identifier: GPL-2.0 */
#ifndef __LIBPERF_THREADMAP_H
#define __LIBPERF_THREADMAP_H
#include <perf/core.h>
#include <sys/types.h>
struct perf_thread_map;
LIBPERF_API struct perf_thread_map *perf_thread_map__new_dummy(void);
LIBPERF_API struct perf_thread_map *perf_thread_map__new_array(int nr_thr... | |
Linux işletim sistemi çekirdeği için 'tools/lib/perf/include/perf/event' yapılarının ve prototiplerinin bulunduğu C Header dosyasını yaz. | ```c
/* SPDX-License-Identifier: GPL-2.0 */
#ifndef __LIBPERF_EVENT_H
#define __LIBPERF_EVENT_H
#include <linux/perf_event.h>
#include <linux/types.h>
#include <linux/limits.h>
#include <linux/bpf.h>
#include <sys/types.h> /* pid_t */
#define event_contains(obj, mem) ((obj).header.size > offsetof(typeof(obj), mem))
... | |
Linux işletim sistemi çekirdeği için 'tools/lib/perf/include/perf/schedstat-v17' yapılarının ve prototiplerinin bulunduğu C Header dosyasını yaz. | ```c
/* SPDX-License-Identifier: GPL-2.0 */
#ifdef CPU_FIELD
CPU_FIELD(__u32, yld_count, "sched_yield() count",
"%11u", false, yld_count, v17);
CPU_FIELD(__u32, array_exp, "Legacy counter can be ignored",
"%11u", false, array_exp, v17);
CPU_FIELD(__u32, sched_count, "schedule() called",
"%11u", false, sched_c... | |
Linux işletim sistemi çekirdeği için 'tools/lib/perf/include/perf/schedstat-v16' yapılarının ve prototiplerinin bulunduğu C Header dosyasını yaz. | ```c
/* SPDX-License-Identifier: GPL-2.0 */
#ifdef CPU_FIELD
CPU_FIELD(__u32, yld_count, "sched_yield() count",
"%11u", false, yld_count, v16);
CPU_FIELD(__u32, array_exp, "Legacy counter can be ignored",
"%11u", false, array_exp, v16);
CPU_FIELD(__u32, sched_count, "schedule() called",
"%11u", false, sched_c... | |
Linux işletim sistemi çekirdeği için 'tools/lib/perf/include/perf/bpf_perf' yapılarının ve prototiplerinin bulunduğu C Header dosyasını yaz. | ```c
/* SPDX-License-Identifier: (LGPL-2.1 OR BSD-2-Clause) */
#ifndef __LIBPERF_BPF_PERF_H
#define __LIBPERF_BPF_PERF_H
#include <linux/types.h> /* for __u32 */
/*
* bpf_perf uses a hashmap, the attr_map, to track all the leader programs.
* The hashmap is pinned in bpffs. flock() on this file is used to ensure
*... | |
Linux işletim sistemi çekirdeği için 'tools/lib/perf/include/perf/core' yapılarının ve prototiplerinin bulunduğu C Header dosyasını yaz. | ```c
/* SPDX-License-Identifier: GPL-2.0 */
#ifndef __LIBPERF_CORE_H
#define __LIBPERF_CORE_H
#include <stdarg.h>
#ifndef LIBPERF_API
#define LIBPERF_API extern __attribute__((visibility("default")))
#endif
enum libperf_print_level {
LIBPERF_ERR,
LIBPERF_WARN,
LIBPERF_INFO,
LIBPERF_DEBUG,
LIBPERF_DEBUG2,
LIBPE... | |
Linux işletim sistemi çekirdeği için 'tools/lib/perf/include/perf/cpumap' yapılarının ve prototiplerinin bulunduğu C Header dosyasını yaz. | ```c
/* SPDX-License-Identifier: GPL-2.0 */
#ifndef __LIBPERF_CPUMAP_H
#define __LIBPERF_CPUMAP_H
#include <perf/core.h>
#include <stdbool.h>
#include <stdint.h>
/** A wrapper around a CPU to avoid confusion with the perf_cpu_map's map's indices. */
struct perf_cpu {
int16_t cpu;
};
struct perf_cache {
int cache_l... | |
Linux işletim sistemi çekirdeği için 'tools/lib/perf/include/perf/schedstat-v15' yapılarının ve prototiplerinin bulunduğu C Header dosyasını yaz. | ```c
/* SPDX-License-Identifier: GPL-2.0 */
#ifdef CPU_FIELD
CPU_FIELD(__u32, yld_count, "sched_yield() count",
"%11u", false, yld_count, v15);
CPU_FIELD(__u32, array_exp, "Legacy counter can be ignored",
"%11u", false, array_exp, v15);
CPU_FIELD(__u32, sched_count, "schedule() called",
"%11u", false, sched_c... | |
Linux işletim sistemi çekirdeği için 'tools/lib/perf/include/perf/mmap' yapılarının ve prototiplerinin bulunduğu C Header dosyasını yaz. | ```c
/* SPDX-License-Identifier: GPL-2.0 */
#ifndef __LIBPERF_MMAP_H
#define __LIBPERF_MMAP_H
#include <perf/core.h>
struct perf_mmap;
union perf_event;
LIBPERF_API void perf_mmap__consume(struct perf_mmap *map);
LIBPERF_API int perf_mmap__read_init(struct perf_mmap *map);
LIBPERF_API void perf_mmap__read_done(struc... | |
Linux işletim sistemi çekirdeği için 'tools/lib/perf/include/perf/evsel' yapılarının ve prototiplerinin bulunduğu C Header dosyasını yaz. | ```c
/* SPDX-License-Identifier: GPL-2.0 */
#ifndef __LIBPERF_EVSEL_H
#define __LIBPERF_EVSEL_H
#include <stdint.h>
#include <perf/core.h>
#include <stdbool.h>
#include <linux/types.h>
struct perf_evsel;
struct perf_event_attr;
struct perf_cpu_map;
struct perf_thread_map;
struct perf_counts_values {
union {
struc... | |
Linux işletim sistemi çekirdeği için 'tools/lib/perf/include/perf/evlist' yapılarının ve prototiplerinin bulunduğu C Header dosyasını yaz. | ```c
/* SPDX-License-Identifier: GPL-2.0 */
#ifndef __LIBPERF_EVLIST_H
#define __LIBPERF_EVLIST_H
#include <perf/core.h>
#include <stdbool.h>
struct perf_evlist;
struct perf_evsel;
struct perf_cpu_map;
struct perf_thread_map;
LIBPERF_API void perf_evlist__add(struct perf_evlist *evlist,
struct perf_evsel *evse... | |
Linux işletim sistemi çekirdeği için 'tools/lib/perf/include/internal/threadmap' yapılarının ve prototiplerinin bulunduğu C Header dosyasını yaz. | ```c
/* SPDX-License-Identifier: GPL-2.0 */
#ifndef __LIBPERF_INTERNAL_THREADMAP_H
#define __LIBPERF_INTERNAL_THREADMAP_H
#include <linux/refcount.h>
#include <sys/types.h>
#include <unistd.h>
struct thread_map_data {
pid_t pid;
char *comm;
};
struct perf_thread_map {
refcount_t refcnt;
int nr;
int err_threa... | |
Linux işletim sistemi çekirdeği için 'tools/lib/perf/include/internal/rc_check' yapılarının ve prototiplerinin bulunduğu C Header dosyasını yaz. | ```c
/* SPDX-License-Identifier: (LGPL-2.1 OR BSD-2-Clause) */
#ifndef __LIBPERF_INTERNAL_RC_CHECK_H
#define __LIBPERF_INTERNAL_RC_CHECK_H
#include <stdlib.h>
#include <linux/zalloc.h>
/*
* Enable reference count checking implicitly with leak checking, which is
* integrated into address sanitizer.
*/
#if defined(_... | |
Linux işletim sistemi çekirdeği için 'tools/lib/perf/include/internal/tests' yapılarının ve prototiplerinin bulunduğu C Header dosyasını yaz. | ```c
/* SPDX-License-Identifier: GPL-2.0 */
#ifndef __LIBPERF_INTERNAL_TESTS_H
#define __LIBPERF_INTERNAL_TESTS_H
#include <stdio.h>
#include <unistd.h>
extern int tests_failed;
extern int tests_verbose;
static inline int get_verbose(char **argv, int argc)
{
int c;
int verbose = 0;
while ((c = getopt(argc, argv,... | |
Linux işletim sistemi çekirdeği için 'tools/lib/perf/include/internal/cpumap' yapılarının ve prototiplerinin bulunduğu C Header dosyasını yaz. | ```c
/* SPDX-License-Identifier: GPL-2.0 */
#ifndef __LIBPERF_INTERNAL_CPUMAP_H
#define __LIBPERF_INTERNAL_CPUMAP_H
#include <linux/refcount.h>
#include <perf/cpumap.h>
#include <internal/rc_check.h>
/**
* A sized, reference counted, sorted array of integers representing CPU
* numbers. This is commonly used to capt... | |
Linux işletim sistemi çekirdeği için 'tools/lib/perf/include/internal/xyarray' yapılarının ve prototiplerinin bulunduğu C Header dosyasını yaz. | ```c
/* SPDX-License-Identifier: GPL-2.0 */
#ifndef __LIBPERF_INTERNAL_XYARRAY_H
#define __LIBPERF_INTERNAL_XYARRAY_H
#include <linux/compiler.h>
#include <sys/types.h>
struct xyarray {
size_t row_size;
size_t entry_size;
size_t entries;
size_t max_x;
size_t max_y;
char contents[] __aligned(8);
};
struct xyarr... | |
Linux işletim sistemi çekirdeği için 'tools/lib/perf/include/internal/lib' yapılarının ve prototiplerinin bulunduğu C Header dosyasını yaz. | ```c
/* SPDX-License-Identifier: GPL-2.0 */
#ifndef __LIBPERF_INTERNAL_LIB_H
#define __LIBPERF_INTERNAL_LIB_H
#include <sys/types.h>
extern unsigned int page_size;
ssize_t readn(int fd, void *buf, size_t n);
ssize_t writen(int fd, const void *buf, size_t n);
ssize_t preadn(int fd, void *buf, size_t n, off_t offs);
... | |
Linux işletim sistemi çekirdeği için 'tools/lib/perf/include/internal/mmap' yapılarının ve prototiplerinin bulunduğu C Header dosyasını yaz. | ```c
/* SPDX-License-Identifier: GPL-2.0 */
#ifndef __LIBPERF_INTERNAL_MMAP_H
#define __LIBPERF_INTERNAL_MMAP_H
#include <linux/compiler.h>
#include <linux/refcount.h>
#include <linux/types.h>
#include <stdbool.h>
#include <internal/cpumap.h>
/* perf sample has 16 bits size limit */
#define PERF_SAMPLE_MAX_SIZE (1 <<... | |
Linux işletim sistemi çekirdeği için 'tools/lib/perf/include/internal/evsel' yapılarının ve prototiplerinin bulunduğu C Header dosyasını yaz. | ```c
/* SPDX-License-Identifier: GPL-2.0 */
#ifndef __LIBPERF_INTERNAL_EVSEL_H
#define __LIBPERF_INTERNAL_EVSEL_H
#include <linux/types.h>
#include <linux/perf_event.h>
#include <stdbool.h>
#include <sys/types.h>
#include <internal/cpumap.h>
struct perf_thread_map;
struct xyarray;
/**
* The per-thread accumulated p... | |
Linux işletim sistemi çekirdeği için 'tools/lib/perf/include/internal/evlist' yapılarının ve prototiplerinin bulunduğu C Header dosyasını yaz. | ```c
/* SPDX-License-Identifier: GPL-2.0 */
#ifndef __LIBPERF_INTERNAL_EVLIST_H
#define __LIBPERF_INTERNAL_EVLIST_H
#include <linux/list.h>
#include <api/fd/array.h>
#include <internal/cpumap.h>
#include <internal/evsel.h>
#define PERF_EVLIST__HLIST_BITS 8
#define PERF_EVLIST__HLIST_SIZE (1 << PERF_EVLIST__HLIST_BITS... | |
Linux kernel'inin 'tools/lib/perf/tests/main' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0
#include <internal/tests.h>
#include "tests.h"
int tests_failed;
int tests_verbose;
int main(int argc, char **argv)
{
__T("test cpumap", !test_cpumap(argc, argv));
__T("test threadmap", !test_threadmap(argc, argv));
__T("test evlist", !test_evlist(argc, argv));
__T("test e... | |
Linux kernel'inin 'tools/lib/perf/tests/test-cpumap' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0
#include <stdarg.h>
#include <stdio.h>
#include <perf/cpumap.h>
#include <internal/tests.h>
#include "tests.h"
static int libperf_print(enum libperf_print_level level,
const char *fmt, va_list ap)
{
return vfprintf(stderr, fmt, ap);
}
int test_cpumap(int argc, char **argv... | |
Linux kernel'inin 'tools/lib/perf/tests/test-threadmap' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0
#include <stdarg.h>
#include <stdio.h>
#include <perf/threadmap.h>
#include <internal/tests.h>
#include "tests.h"
static int libperf_print(enum libperf_print_level level,
const char *fmt, va_list ap)
{
return vfprintf(stderr, fmt, ap);
}
static int test_threadmap_array(in... | |
Linux kernel'inin 'tools/lib/perf/tests/test-evsel' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0
#include <stdarg.h>
#include <stdio.h>
#include <string.h>
#include <linux/perf_event.h>
#include <linux/kernel.h>
#include <perf/cpumap.h>
#include <perf/threadmap.h>
#include <perf/evsel.h>
#include <internal/evsel.h>
#include <internal/tests.h>
#include "tests.h"
static int ... | |
Linux işletim sistemi çekirdeği için 'tools/lib/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
int test_cpumap(int argc, char **argv);
int test_threadmap(int argc, char **argv);
int test_evlist(int argc, char **argv);
int test_evsel(int argc, char **argv);
#endif /* TESTS_H */
``` | |
Linux kernel'inin 'tools/lib/perf/tests/test-evlist' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0
#define _GNU_SOURCE // needed for sched.h to get sched_[gs]etaffinity and CPU_(ZERO,SET)
#include <inttypes.h>
#include <sched.h>
#include <stdio.h>
#include <stdarg.h>
#include <unistd.h>
#include <stdlib.h>
#include <linux/perf_event.h>
#include <linux/limits.h>
#include <sys/... | |
Linux kernel'inin 'tools/lib/perf/Documentation/examples/sampling' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
#include <linux/perf_event.h>
#include <perf/evlist.h>
#include <perf/evsel.h>
#include <perf/cpumap.h>
#include <perf/threadmap.h>
#include <perf/mmap.h>
#include <perf/core.h>
#include <perf/event.h>
#include <stdio.h>
#include <unistd.h>
static int libperf_print(enum libperf_print_level level,
... | |
Linux kernel'inin 'tools/lib/perf/Documentation/examples/counting' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
#include <linux/perf_event.h>
#include <perf/evlist.h>
#include <perf/evsel.h>
#include <perf/cpumap.h>
#include <perf/threadmap.h>
#include <perf/mmap.h>
#include <perf/core.h>
#include <perf/event.h>
#include <stdio.h>
#include <unistd.h>
static int libperf_print(enum libperf_print_level level,
... | |
Linux kernel'inin 'tools/objtool/klp-diff' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0-or-later
#define _GNU_SOURCE /* memmem() */
#include <subcmd/parse-options.h>
#include <stdlib.h>
#include <string.h>
#include <libgen.h>
#include <stdio.h>
#include <ctype.h>
#include <objtool/objtool.h>
#include <objtool/warn.h>
#include <objtool/arch.h>
#include <objtool/klp... | |
Linux kernel'inin 'tools/objtool/weak' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0-or-later
/*
* Copyright (C) 2020 Matt Helsley <mhelsley@vmware.com>
* Weak definitions necessary to compile objtool without
* some subcommands (e.g. check, orc).
*/
#include <stdbool.h>
#include <errno.h>
#include <objtool/objtool.h>
#include <objtool/arch.h>
#include <objt... | |
Linux kernel'inin 'tools/objtool/trace' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0-or-later
/*
* Copyright (c) 2025, Oracle and/or its affiliates.
*/
#include <objtool/trace.h>
bool trace;
int trace_depth;
/*
* Macros to trace CFI state attributes changes.
*/
#define TRACE_CFI_ATTR(attr, prev, next, fmt, ...) \
({ \
if ((prev)->attr != (next)-... | |
Linux kernel'inin 'tools/objtool/orc_dump' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0-or-later
/*
* Copyright (C) 2017 Josh Poimboeuf <jpoimboe@redhat.com>
*/
#include <unistd.h>
#include <asm/orc_types.h>
#include <objtool/objtool.h>
#include <objtool/orc.h>
#include <objtool/warn.h>
int orc_dump(const char *filename)
{
int fd, nr_entries, i, *orc_ip = NULL... | |
Linux kernel'inin 'tools/objtool/orc_gen' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0-or-later
/*
* Copyright (C) 2017 Josh Poimboeuf <jpoimboe@redhat.com>
*/
#include <stdlib.h>
#include <string.h>
#include <linux/objtool_types.h>
#include <asm/orc_types.h>
#include <objtool/check.h>
#include <objtool/orc.h>
#include <objtool/warn.h>
struct orc_list_entry ... | |
Linux kernel'inin 'tools/objtool/objtool' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0-or-later
/*
* Copyright (C) 2015 Josh Poimboeuf <jpoimboe@redhat.com>
*/
#include <stdio.h>
#include <stdbool.h>
#include <string.h>
#include <stdlib.h>
#include <unistd.h>
#include <subcmd/exec-cmd.h>
#include <subcmd/pager.h>
#include <linux/kernel.h>
#include <objtool/bui... | |
Linux kernel'inin 'tools/objtool/check' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0-or-later
/*
* Copyright (C) 2015-2017 Josh Poimboeuf <jpoimboe@redhat.com>
*/
#define _GNU_SOURCE /* memmem() */
#include <fnmatch.h>
#include <string.h>
#include <stdlib.h>
#include <inttypes.h>
#include <sys/mman.h>
#include <objtool/builtin.h>
#include <objtool/cfi.h>
#in... | |
Linux kernel'inin 'tools/objtool/klp-post-link' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0-or-later
/*
* Read the intermediate KLP reloc/symbol representations created by klp diff
* and convert them to the proper format required by livepatch. This needs to
* run last to avoid linker wreckage. Linkers don't tend to handle the "two
* rela sections for a single bas... | |
Linux kernel'inin 'tools/objtool/signal' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
/*
* signal.c: Register a sigaltstack for objtool, to be able to
* run a signal handler on a separate stack even if
* the main process stack has overflown. Print out
* stack overflow errors when this happens.
*/
#include <stdio.h>
#include <stdlib.h>
#include <signal.h>
#include <unistd.h>
#inc... | |
Linux kernel'inin 'tools/objtool/special' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0-or-later
/*
* Copyright (C) 2015 Josh Poimboeuf <jpoimboe@redhat.com>
*/
/*
* This file reads all the special sections which have alternate instructions
* which can be patched in or redirected to at runtime.
*/
#include <stdlib.h>
#include <string.h>
#include <arch/speci... | |
Linux kernel'inin 'tools/objtool/builtin-check' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0-or-later
/*
* Copyright (C) 2015-2017 Josh Poimboeuf <jpoimboe@redhat.com>
*/
#include <subcmd/parse-options.h>
#include <string.h>
#include <stdlib.h>
#include <fcntl.h>
#include <unistd.h>
#include <errno.h>
#include <sys/stat.h>
#include <sys/sendfile.h>
#include <objtool/... | |
Linux kernel'inin 'tools/objtool/elf' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0-or-later
/*
* elf.c - ELF access library
*
* Adapted from kpatch (https://github.com/dynup/kpatch):
* Copyright (C) 2013-2015 Josh Poimboeuf <jpoimboe@redhat.com>
* Copyright (C) 2014 Seth Jennings <sjenning@redhat.com>
*/
#include <sys/types.h>
#include <sys/stat.h>
#inc... | |
Linux kernel'inin 'tools/objtool/builtin-klp' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0-or-later
#include <subcmd/parse-options.h>
#include <string.h>
#include <stdlib.h>
#include <objtool/builtin.h>
#include <objtool/objtool.h>
#include <objtool/klp.h>
struct subcmd {
const char *name;
const char *description;
int (*fn)(int, const char **);
};
static struct s... | |
Linux işletim sistemi çekirdeği için 'tools/objtool/noreturns' yapılarının ve prototiplerinin bulunduğu C Header dosyasını yaz. | ```c
/* SPDX-License-Identifier: GPL-2.0 */
/*
* This is a (sorted!) list of all known __noreturn functions in the kernel.
* It's needed for objtool to properly reverse-engineer the control flow graph.
*
* Yes, this is unfortunate. A better solution is in the works.
*/
NORETURN(__fortify_panic)
NORETURN(__ia32_s... | |
Linux kernel'inin 'tools/objtool/disas' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0-or-later
/*
* Copyright (C) 2015-2017 Josh Poimboeuf <jpoimboe@redhat.com>
*/
#define _GNU_SOURCE
#include <fnmatch.h>
#include <objtool/arch.h>
#include <objtool/check.h>
#include <objtool/disas.h>
#include <objtool/special.h>
#include <objtool/warn.h>
#include <bfd.h>
#in... | |
Linux işletim sistemi çekirdeği için 'tools/objtool/include/objtool/elf' yapılarının ve prototiplerinin bulunduğu C Header dosyasını yaz. | ```c
/* SPDX-License-Identifier: GPL-2.0-or-later */
/*
* Copyright (C) 2015 Josh Poimboeuf <jpoimboe@redhat.com>
*/
#ifndef _OBJTOOL_ELF_H
#define _OBJTOOL_ELF_H
#include <stdio.h>
#include <gelf.h>
#include <linux/string.h>
#include <linux/list.h>
#include <linux/hashtable.h>
#include <linux/rbtree.h>
#include <l... | |
Linux işletim sistemi çekirdeği için 'tools/objtool/include/objtool/checksum_types' yapılarının ve prototiplerinin bulunduğu C Header dosyasını yaz. | ```c
/* SPDX-License-Identifier: GPL-2.0 */
#ifndef _OBJTOOL_CHECKSUM_TYPES_H
#define _OBJTOOL_CHECKSUM_TYPES_H
struct sym_checksum {
u64 addr;
u64 checksum;
};
#ifdef BUILD_KLP
#include <xxhash.h>
struct checksum {
XXH3_state_t *state;
XXH64_hash_t checksum;
};
#else /* !BUILD_KLP */
struct checksum {};
#en... | |
Linux işletim sistemi çekirdeği için 'tools/objtool/include/objtool/disas' yapılarının ve prototiplerinin bulunduğu C Header dosyasını yaz. | ```c
/* SPDX-License-Identifier: GPL-2.0-or-later */
/*
* Copyright (c) 2025, Oracle and/or its affiliates.
*/
#ifndef _DISAS_H
#define _DISAS_H
struct alternative;
struct disas_context;
struct disassemble_info;
#ifdef DISAS
struct disas_context *disas_context_create(struct objtool_file *file);
void disas_context... | |
Linux işletim sistemi çekirdeği için 'tools/objtool/include/objtool/arch' yapılarının ve prototiplerinin bulunduğu C Header dosyasını yaz. | ```c
/* SPDX-License-Identifier: GPL-2.0-or-later */
/*
* Copyright (C) 2015 Josh Poimboeuf <jpoimboe@redhat.com>
*/
#ifndef _ARCH_H
#define _ARCH_H
#include <stdbool.h>
#include <linux/list.h>
#include <objtool/objtool.h>
#include <objtool/cfi.h>
enum insn_type {
INSN_JUMP_CONDITIONAL,
INSN_JUMP_UNCONDITIONAL,
... | |
Linux işletim sistemi çekirdeği için 'tools/objtool/include/objtool/util' yapılarının ve prototiplerinin bulunduğu C Header dosyasını yaz. | ```c
/* SPDX-License-Identifier: GPL-2.0-or-later */
#ifndef _UTIL_H
#define _UTIL_H
#include <objtool/warn.h>
#define snprintf_check(str, size, format, args...) \
({ \
int __ret = snprintf(str, size, format, args); \
if (__ret < 0) \
ERROR_GLIBC("snprintf"); \
else if (__ret >= size) \... | |
Linux işletim sistemi çekirdeği için 'tools/objtool/include/objtool/endianness' yapılarının ve prototiplerinin bulunduğu C Header dosyasını yaz. | ```c
/* SPDX-License-Identifier: GPL-2.0-or-later */
#ifndef _OBJTOOL_ENDIANNESS_H
#define _OBJTOOL_ENDIANNESS_H
#include <linux/kernel.h>
#include <endian.h>
/*
* Does a byte swap if target file endianness doesn't match the host, i.e. cross
* compilation for little endian on big endian and vice versa.
* To be use... | |
Linux işletim sistemi çekirdeği için 'tools/objtool/include/objtool/builtin' yapılarının ve prototiplerinin bulunduğu C Header dosyasını yaz. | ```c
/* SPDX-License-Identifier: GPL-2.0-or-later */
/*
* Copyright (C) 2015 Josh Poimboeuf <jpoimboe@redhat.com>
*/
#ifndef _BUILTIN_H
#define _BUILTIN_H
#include <subcmd/parse-options.h>
struct opts {
/* actions: */
bool cfi;
bool checksum;
bool dump_orc;
bool hack_jump_label;
bool hack_noinstr;
bool hack_... | |
Linux işletim sistemi çekirdeği için 'tools/objtool/include/objtool/trace' yapılarının ve prototiplerinin bulunduğu C Header dosyasını yaz. | ```c
/* SPDX-License-Identifier: GPL-2.0-or-later */
/*
* Copyright (c) 2025, Oracle and/or its affiliates.
*/
#ifndef _TRACE_H
#define _TRACE_H
#include <objtool/check.h>
#include <objtool/disas.h>
#ifdef DISAS
extern bool trace;
extern int trace_depth;
#define TRACE(fmt, ...) \
({ if (trace) \
fpri... | |
Linux işletim sistemi çekirdeği için 'tools/objtool/include/objtool/warn' yapılarının ve prototiplerinin bulunduğu C Header dosyasını yaz. | ```c
/* SPDX-License-Identifier: GPL-2.0-or-later */
/*
* Copyright (C) 2015 Josh Poimboeuf <jpoimboe@redhat.com>
*/
#ifndef _WARN_H
#define _WARN_H
#include <stdlib.h>
#include <string.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <errno.h>
#include <objtool/builtin.h>
#include <objto... | |
Linux işletim sistemi çekirdeği için 'tools/objtool/include/objtool/checksum' yapılarının ve prototiplerinin bulunduğu C Header dosyasını yaz. | ```c
/* SPDX-License-Identifier: GPL-2.0-or-later */
#ifndef _OBJTOOL_CHECKSUM_H
#define _OBJTOOL_CHECKSUM_H
#include <objtool/elf.h>
#ifdef BUILD_KLP
static inline void checksum_init(struct symbol *func)
{
if (func && !func->csum.state) {
func->csum.state = XXH3_createState();
XXH3_64bits_reset(func->csum.stat... | |
Linux işletim sistemi çekirdeği için 'tools/objtool/include/objtool/objtool' yapılarının ve prototiplerinin bulunduğu C Header dosyasını yaz. | ```c
/* SPDX-License-Identifier: GPL-2.0-or-later */
/*
* Copyright (C) 2020 Matt Helsley <mhelsley@vmware.com>
*/
#ifndef _OBJTOOL_H
#define _OBJTOOL_H
#include <stdbool.h>
#include <linux/list.h>
#include <linux/hashtable.h>
#include <objtool/elf.h>
#define __weak __attribute__((weak))
struct pv_state {
bool ... | |
Linux işletim sistemi çekirdeği için 'tools/objtool/include/objtool/special' yapılarının ve prototiplerinin bulunduğu C Header dosyasını yaz. | ```c
/* SPDX-License-Identifier: GPL-2.0-or-later */
/*
* Copyright (C) 2015 Josh Poimboeuf <jpoimboe@redhat.com>
*/
#ifndef _SPECIAL_H
#define _SPECIAL_H
#include <stdbool.h>
#include <objtool/check.h>
#include <objtool/elf.h>
#define C_JUMP_TABLE_SECTION ".data.rel.ro.c_jump_table"
struct special_alt {
struct ... | |
Linux işletim sistemi çekirdeği için 'tools/objtool/include/objtool/cfi' yapılarının ve prototiplerinin bulunduğu C Header dosyasını yaz. | ```c
/* SPDX-License-Identifier: GPL-2.0-or-later */
/*
* Copyright (C) 2015-2017 Josh Poimboeuf <jpoimboe@redhat.com>
*/
#ifndef _OBJTOOL_CFI_H
#define _OBJTOOL_CFI_H
#include <arch/cfi_regs.h>
#include <linux/list.h>
#define CFI_UNDEFINED -1
#define CFI_CFA -2
#define CFI_SP_INDIRECT -3
#define CFI_BP_INDIRE... | |
Linux işletim sistemi çekirdeği için 'tools/objtool/include/objtool/check' yapılarının ve prototiplerinin bulunduğu C Header dosyasını yaz. | ```c
/* SPDX-License-Identifier: GPL-2.0-or-later */
/*
* Copyright (C) 2017 Josh Poimboeuf <jpoimboe@redhat.com>
*/
#ifndef _CHECK_H
#define _CHECK_H
#include <stdbool.h>
#include <objtool/cfi.h>
#include <objtool/arch.h>
struct insn_state {
struct cfi_state cfi;
unsigned int uaccess_stack;
bool uaccess;
bool... | |
Linux işletim sistemi çekirdeği için 'tools/objtool/include/objtool/orc' yapılarının ve prototiplerinin bulunduğu C Header dosyasını yaz. | ```c
/* SPDX-License-Identifier: GPL-2.0-or-later */
#ifndef _OBJTOOL_ORC_H
#define _OBJTOOL_ORC_H
#include <objtool/check.h>
int init_orc_entry(struct orc_entry *orc, struct cfi_state *cfi, struct instruction *insn);
void orc_print_dump(struct elf *dummy_elf, struct orc_entry *orc, int i);
int write_orc_entry(struct... | |
Linux işletim sistemi çekirdeği için 'tools/objtool/include/objtool/klp' yapılarının ve prototiplerinin bulunduğu C Header dosyasını yaz. | ```c
/* SPDX-License-Identifier: GPL-2.0-or-later */
#ifndef _OBJTOOL_KLP_H
#define _OBJTOOL_KLP_H
#define SHF_RELA_LIVEPATCH 0x00100000
#define SHN_LIVEPATCH 0xff20
/*
* .init.klp_objects and .init.klp_funcs are created by klp diff and used by the
* patch module init code to build the klp_patch, klp_object and kl... | |
Linux kernel'inin 'tools/objtool/arch/powerpc/decode' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0-or-later
#include <stdio.h>
#include <stdlib.h>
#include <objtool/check.h>
#include <objtool/disas.h>
#include <objtool/elf.h>
#include <objtool/arch.h>
#include <objtool/warn.h>
#include <objtool/builtin.h>
const char *arch_reg_name[CFI_NUM_REGS] = {
"r0", "sp", "r2", "r3... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.