instruction stringlengths 82 202 | input stringclasses 1
value | output stringlengths 73 23.9M |
|---|---|---|
Linux kernel'inin 'tools/perf/util/setns' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: LGPL-2.1
#include "namespaces.h"
#include <unistd.h>
#include <sys/syscall.h>
int setns(int fd, int nstype)
{
return syscall(__NR_setns, fd, nstype);
}
``` | |
Linux kernel'inin 'tools/perf/util/cgroup' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0
#include <subcmd/parse-options.h>
#include "evsel.h"
#include "cgroup.h"
#include "evlist.h"
#include "rblist.h"
#include "metricgroup.h"
#include "stat.h"
#include <linux/zalloc.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <sys/statfs.h>
#include <errno.h>
#include ... | |
Linux işletim sistemi çekirdeği için 'tools/perf/util/compress' yapılarının ve prototiplerinin bulunduğu C Header dosyasını yaz. | ```c
/* SPDX-License-Identifier: GPL-2.0 */
#ifndef PERF_COMPRESS_H
#define PERF_COMPRESS_H
#include <stdbool.h>
#include <stddef.h>
#include <stdio.h>
#include <sys/types.h>
#include <linux/compiler.h>
#ifdef HAVE_ZSTD_SUPPORT
#include <zstd.h>
#endif
#ifdef HAVE_ZLIB_SUPPORT
int gzip_decompress_to_file(const char *... | |
Linux kernel'inin 'tools/perf/util/parse-sublevel-options' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
#include <stdlib.h>
#include <stdint.h>
#include <string.h>
#include <stdio.h>
#include "util/debug.h"
#include "util/parse-sublevel-options.h"
static int parse_one_sublevel_option(const char *str,
struct sublevel_option *opts)
{
struct sublevel_option *opt = opts;
char *vstr, *s = strdup(str);
int v... | |
Linux kernel'inin 'tools/perf/util/trace-event-scripting' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0-or-later
/*
* trace-event-scripting. Scripting engine common and initialization code.
*
* Copyright (C) 2009-2010 Tom Zanussi <tzanussi@gmail.com>
*/
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <errno.h>
#ifdef HAVE_LIBTRACEEVENT
#include <event-par... | |
Linux işletim sistemi çekirdeği için 'tools/perf/util/blake2s' yapılarının ve prototiplerinin bulunduğu C Header dosyasını yaz. | ```c
/* SPDX-License-Identifier: GPL-2.0 OR MIT */
/*
* Copyright (C) 2015-2019 Jason A. Donenfeld <Jason@zx2c4.com>. All Rights Reserved.
*/
#ifndef _CRYPTO_BLAKE2S_H
#define _CRYPTO_BLAKE2S_H
#include <string.h>
#include <linux/types.h>
#define BLAKE2S_BLOCK_SIZE 64
struct blake2s_ctx {
u32 h[8];
u32 t[2];
u... | |
Linux kernel'inin 'tools/perf/util/data' 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 <linux/string.h>
#include <linux/zalloc.h>
#include <linux/err.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <errno.h>
#include <fcntl.h>
#include <unistd.h>
#include <string.h>
#include <asm/bug.h>
#inclu... | |
Linux işletim sistemi çekirdeği için 'tools/perf/util/block-info' yapılarının ve prototiplerinin bulunduğu C Header dosyasını yaz. | ```c
/* SPDX-License-Identifier: GPL-2.0 */
#ifndef __PERF_BLOCK_H
#define __PERF_BLOCK_H
#include <linux/types.h>
#include "hist.h"
#include "symbol.h"
#include "sort.h"
#include "ui/ui.h"
struct block_info {
struct symbol *sym;
u64 start;
u64 end;
u64 cycles;
u64 cycles_aggr;
s64 cycles_spark[NUM_S... | |
Linux işletim sistemi çekirdeği için 'tools/perf/util/perf-hooks' yapılarının ve prototiplerinin bulunduğu C Header dosyasını yaz. | ```c
/* SPDX-License-Identifier: GPL-2.0 */
#ifndef PERF_UTIL_PERF_HOOKS_H
#define PERF_UTIL_PERF_HOOKS_H
#ifdef __cplusplus
extern "C" {
#endif
typedef void (*perf_hook_func_t)(void *ctx);
struct perf_hook_desc {
const char * const hook_name;
perf_hook_func_t * const p_hook_func;
void *hook_ctx;
};
extern void p... | |
Linux işletim sistemi çekirdeği için 'tools/perf/util/hwmon_pmu' 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 __HWMON_PMU_H
#define __HWMON_PMU_H
#include "pmu.h"
#include <stdbool.h>
struct list_head;
struct perf_thread_map;
/**
* enum hwmon_type:
*
* As described in Documentation/hwmon/sysfs-interface.rst hwmon events are
* defined over multiple fi... | |
Linux işletim sistemi çekirdeği için 'tools/perf/util/srcline' yapılarının ve prototiplerinin bulunduğu C Header dosyasını yaz. | ```c
/* SPDX-License-Identifier: GPL-2.0 */
#ifndef PERF_SRCLINE_H
#define PERF_SRCLINE_H
#include <linux/list.h>
#include <linux/rbtree.h>
#include <linux/types.h>
struct dso;
struct symbol;
extern bool srcline_full_filename;
char *get_srcline(struct dso *dso, u64 addr, struct symbol *sym,
bool show_sym, bool s... | |
Linux kernel'inin 'tools/perf/util/bpf_kwork_top' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0
/*
* bpf_kwork_top.c
*
* Copyright (c) 2022 Huawei Inc, Yang Jihong <yangjihong1@huawei.com>
*/
#include <time.h>
#include <fcntl.h>
#include <signal.h>
#include <stdio.h>
#include <unistd.h>
#include <linux/time64.h>
#include "util/debug.h"
#include "util/evsel.h"
#inc... | |
Linux işletim sistemi çekirdeği için 'tools/perf/util/stat' yapılarının ve prototiplerinin bulunduğu C Header dosyasını yaz. | ```c
/* SPDX-License-Identifier: GPL-2.0 */
#ifndef __PERF_STATS_H
#define __PERF_STATS_H
#include <linux/types.h>
#include <stdio.h>
#include <sys/types.h>
#include <sys/resource.h>
#include "cpumap.h"
#include "counts.h"
struct perf_cpu_map;
struct perf_stat_config;
struct timespec;
struct stats {
double n, mean,... | |
Linux kernel'inin 'tools/perf/util/print-events' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0
#include <dirent.h>
#include <errno.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <fcntl.h>
#include <sys/param.h>
#include <unistd.h>
#include <api/fs/tracing_path.h>
#include <api/io.h>
#include <linux/stddef.h>
#include <linux/perf_event.h>
#include ... | |
Linux işletim sistemi çekirdeği için 'tools/perf/util/annotate' yapılarının ve prototiplerinin bulunduğu C Header dosyasını yaz. | ```c
/* SPDX-License-Identifier: GPL-2.0 */
#ifndef __PERF_ANNOTATE_H
#define __PERF_ANNOTATE_H
#include <stdbool.h>
#include <stdint.h>
#include <stdio.h>
#include <linux/types.h>
#include <linux/list.h>
#include <linux/rbtree.h>
#include <asm/bug.h>
#include "symbol_conf.h"
#include "mutex.h"
#include "spark.h"
#inc... | |
Linux işletim sistemi çekirdeği için 'tools/perf/util/perf_api_probe' yapılarının ve prototiplerinin bulunduğu C Header dosyasını yaz. | ```c
/* SPDX-License-Identifier: GPL-2.0 */
#ifndef __PERF_API_PROBE_H
#define __PERF_API_PROBE_H
#include <stdbool.h>
bool perf_can_aux_sample(void);
bool perf_can_comm_exec(void);
bool perf_can_record_cpu_wide(void);
bool perf_can_record_switch_events(void);
bool perf_can_record_text_poke_events(void);
bool perf_c... | |
Linux kernel'inin 'tools/perf/util/color_config' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0
#include <linux/kernel.h>
#include <subcmd/pager.h>
#include <string.h>
#include "config.h"
#include <stdlib.h>
#include <stdio.h>
#include "color.h"
#include <math.h>
#include <unistd.h>
int perf_config_colorbool(const char *var, const char *value, int stdout_is_tty)
{
if (va... | |
Linux işletim sistemi çekirdeği için 'tools/perf/util/env' yapılarının ve prototiplerinin bulunduğu C Header dosyasını yaz. | ```c
/* SPDX-License-Identifier: GPL-2.0 */
#ifndef __PERF_ENV_H
#define __PERF_ENV_H
#include <linux/types.h>
#include <linux/rbtree.h>
#include "cpumap.h"
#include "rwsem.h"
struct perf_cpu_map;
struct cpu_topology_map {
int socket_id;
int die_id;
int cluster_id;
int core_id;
};
struct cpu_cache_level {
u32 ... | |
Linux işletim sistemi çekirdeği için 'tools/perf/util/util' yapılarının ve prototiplerinin bulunduğu C Header dosyasını yaz. | ```c
/* SPDX-License-Identifier: GPL-2.0 */
#ifndef __PERF_UTIL_H
#define __PERF_UTIL_H
#define _BSD_SOURCE 1
/* glibc 2.20 deprecates _BSD_SOURCE in favour of _DEFAULT_SOURCE */
#define _DEFAULT_SOURCE 1
#include <dirent.h>
#include <fcntl.h>
#include <stdbool.h>
#include <stddef.h>
#include <linux/compiler.h>
#incl... | |
Linux işletim sistemi çekirdeği için 'tools/perf/util/demangle-cxx' yapılarının ve prototiplerinin bulunduğu C Header dosyasını yaz. | ```c
/* SPDX-License-Identifier: GPL-2.0 */
#ifndef __PERF_DEMANGLE_CXX
#define __PERF_DEMANGLE_CXX 1
#include <stdbool.h>
#ifdef __cplusplus
extern "C" {
#endif
char *cxx_demangle_sym(const char *str, bool params, bool modifiers);
#ifdef __cplusplus
}
#endif
#endif /* __PERF_DEMANGLE_CXX */
``` | |
Linux kernel'inin 'tools/perf/util/bpf_off_cpu' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0
#include "util/bpf_counter.h"
#include "util/debug.h"
#include "util/evsel.h"
#include "util/evlist.h"
#include "util/off_cpu.h"
#include "util/perf-hooks.h"
#include "util/record.h"
#include "util/session.h"
#include "util/target.h"
#include "util/cpumap.h"
#include "util/threa... | |
Linux işletim sistemi çekirdeği için 'tools/perf/util/addr2line' yapılarının ve prototiplerinin bulunduğu C Header dosyasını yaz. | ```c
/* SPDX-License-Identifier: GPL-2.0 */
#ifndef __PERF_ADDR2LINE_H
#define __PERF_ADDR2LINE_H
#include <linux/types.h>
struct dso;
struct inline_node;
struct symbol;
int cmd__addr2line(const char *dso_name, u64 addr,
char **file, unsigned int *line_nr,
struct dso *dso,
bool unwind_inlines,
st... | |
Linux işletim sistemi çekirdeği için 'tools/perf/util/print_insn' yapılarının ve prototiplerinin bulunduğu C Header dosyasını yaz. | ```c
/* SPDX-License-Identifier: GPL-2.0 */
#ifndef PERF_PRINT_INSN_H
#define PERF_PRINT_INSN_H
#include <stddef.h>
#include <stdio.h>
struct perf_sample;
struct thread;
struct machine;
struct perf_insn;
#define PRINT_INSN_IMM_HEX (1<<0)
size_t sample__fprintf_insn_asm(struct perf_sample *sample, struct thread *th... | |
Linux kernel'inin 'tools/perf/util/annotate' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0-only
/*
* Copyright (C) 2011, Red Hat Inc, Arnaldo Carvalho de Melo <acme@redhat.com>
*
* Parts came from builtin-annotate.c, see those files for further
* copyright notes.
*/
#include <errno.h>
#include <inttypes.h>
#include <stdlib.h>
#include "util.h" // hex_width()
#in... | |
Linux kernel'inin 'tools/perf/util/pfm' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0
/*
* Support for libpfm4 event encoding.
*
* Copyright 2020 Google LLC.
*/
#include "util/cpumap.h"
#include "util/debug.h"
#include "util/event.h"
#include "util/evlist.h"
#include "util/evsel.h"
#include "util/parse-events.h"
#include "util/pmus.h"
#include "util/pfm.h"
#i... | |
Linux işletim sistemi çekirdeği için 'tools/perf/util/event' yapılarının ve prototiplerinin bulunduğu C Header dosyasını yaz. | ```c
/* SPDX-License-Identifier: GPL-2.0 */
#ifndef __PERF_RECORD_H
#define __PERF_RECORD_H
/*
* The linux/stddef.h isn't need here, but is needed for __always_inline used
* in files included from uapi/linux/perf_event.h such as
* /usr/include/linux/swab.h and /usr/include/linux/byteorder/little_endian.h,
* detecte... | |
Linux kernel'inin 'tools/perf/util/hist' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0
#include "callchain.h"
#include "debug.h"
#include "dso.h"
#include "build-id.h"
#include "hist.h"
#include "kvm-stat.h"
#include "map.h"
#include "map_symbol.h"
#include "branch.h"
#include "mem-events.h"
#include "mem-info.h"
#include "session.h"
#include "namespaces.h"
#inclu... | |
Linux işletim sistemi çekirdeği için 'tools/perf/util/s390-cpumsf-kernel' yapılarının ve prototiplerinin bulunduğu C Header dosyasını yaz. | ```c
/* SPDX-License-Identifier: GPL-2.0 */
/*
* Auxtrace support for s390 CPU measurement sampling facility
*
* Copyright IBM Corp. 2018
* Author(s): Hendrik Brueckner <brueckner@linux.ibm.com>
* Thomas Richter <tmricht@linux.ibm.com>
*/
#ifndef S390_CPUMSF_KERNEL_H
#define S390_CPUMSF_KERNEL_H
#define... | |
Linux kernel'inin 'tools/perf/util/tp_pmu' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: (LGPL-2.1 OR BSD-2-Clause)
#include "tp_pmu.h"
#include "pmus.h"
#include <api/fs/fs.h>
#include <api/fs/tracing_path.h>
#include <api/io_dir.h>
#include <linux/kernel.h>
#include <errno.h>
#include <string.h>
int tp_pmu__id(const char *sys, const char *name)
{
char *tp_dir = get_even... | |
Linux kernel'inin 'tools/perf/util/namespaces' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0-only
/*
*
* Copyright (C) 2017 Hari Bathini, IBM Corporation
*/
#include "namespaces.h"
#include "event.h"
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <limits.h>
#include <sched.h>
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#inclu... | |
Linux işletim sistemi çekirdeği için 'tools/perf/util/addr_location' yapılarının ve prototiplerinin bulunduğu C Header dosyasını yaz. | ```c
/* SPDX-License-Identifier: GPL-2.0 */
#ifndef __PERF_ADDR_LOCATION
#define __PERF_ADDR_LOCATION 1
#include <linux/types.h>
struct thread;
struct maps;
struct map;
struct symbol;
struct addr_location {
struct thread *thread;
struct map *map;
struct symbol *sym;
const char *srcline;
u64 addr;
c... | |
Linux kernel'inin 'tools/perf/util/unwind-libunwind' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0
#include "unwind.h"
#include "dso.h"
#include "map.h"
#include "thread.h"
#include "session.h"
#include "debug.h"
#include "env.h"
#include "callchain.h"
struct unwind_libunwind_ops __weak *local_unwind_libunwind_ops;
struct unwind_libunwind_ops __weak *x86_32_unwind_libunwind_... | |
Linux işletim sistemi çekirdeği için 'tools/perf/util/tp_pmu' 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 __TP_PMU_H
#define __TP_PMU_H
#include "pmu.h"
typedef int (*tp_sys_callback)(void *state, const char *sys_name);
typedef int (*tp_event_callback)(void *state, const char *sys_name, const char *evt_name);
int tp_pmu__id(const char *sys, const cha... | |
Linux kernel'inin 'tools/perf/util/symbol-elf' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0
#include <fcntl.h>
#include <stdio.h>
#include <errno.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include <inttypes.h>
#include "compress.h"
#include "dso.h"
#include "libbfd.h"
#include "map.h"
#include "maps.h"
#include "symbol.h"
#include "symsrc.h"
#incl... | |
Linux işletim sistemi çekirdeği için 'tools/perf/util/intlist' yapılarının ve prototiplerinin bulunduğu C Header dosyasını yaz. | ```c
/* SPDX-License-Identifier: GPL-2.0 */
#ifndef __PERF_INTLIST_H
#define __PERF_INTLIST_H
#include <linux/rbtree.h>
#include <stdbool.h>
#include "rblist.h"
struct int_node {
struct rb_node rb_node;
unsigned long i;
void *priv;
};
struct intlist {
struct rblist rblist;
};
struct intlist *intlist__new(const... | |
Linux kernel'inin 'tools/perf/util/evsel' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0-only
/*
* Copyright (C) 2011, Red Hat Inc, Arnaldo Carvalho de Melo <acme@redhat.com>
*
* Parts came from builtin-{top,stat,record}.c, see those files for further
* copyright notes.
*/
/*
* Powerpc needs __SANE_USERSPACE_TYPES__ before <linux/types.h> to select
* 'int-ll6... | |
Linux kernel'inin 'tools/perf/util/counts' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0
#include <errno.h>
#include <stdlib.h>
#include <string.h>
#include "evsel.h"
#include "counts.h"
#include <perf/threadmap.h>
#include <linux/zalloc.h>
struct perf_counts *perf_counts__new(int ncpus, int nthreads)
{
struct perf_counts *counts = zalloc(sizeof(*counts));
if (c... | |
Linux işletim sistemi çekirdeği için 'tools/perf/util/probe-file' yapılarının ve prototiplerinin bulunduğu C Header dosyasını yaz. | ```c
/* SPDX-License-Identifier: GPL-2.0 */
#ifndef __PROBE_FILE_H
#define __PROBE_FILE_H
#include "probe-event.h"
struct strlist;
struct strfilter;
/* Cache of probe definitions */
struct probe_cache_entry {
struct list_head node;
bool sdt;
struct perf_probe_event pev;
char *spev;
struct strlist *tevlist;... | |
Linux işletim sistemi çekirdeği için 'tools/perf/util/events_stats' yapılarının ve prototiplerinin bulunduğu C Header dosyasını yaz. | ```c
/* SPDX-License-Identifier: GPL-2.0 */
#ifndef __PERF_EVENTS_STATS_
#define __PERF_EVENTS_STATS_
#include <stdio.h>
#include <perf/event.h>
#include <linux/types.h>
#include "auxtrace.h"
/*
* The kernel collects the number of events it couldn't send in a stretch and
* when possible sends this number in a PERF_... | |
Linux işletim sistemi çekirdeği için 'tools/perf/util/strlist' yapılarının ve prototiplerinin bulunduğu C Header dosyasını yaz. | ```c
/* SPDX-License-Identifier: GPL-2.0 */
#ifndef __PERF_STRLIST_H
#define __PERF_STRLIST_H
#include <linux/rbtree.h>
#include <stdbool.h>
#include "rblist.h"
struct str_node {
struct rb_node rb_node;
const char *s;
};
struct strlist {
struct rblist rblist;
bool file_only;
};
/*
* @file_only: When... | |
Linux işletim sistemi çekirdeği için 'tools/perf/util/kvm-stat' yapılarının ve prototiplerinin bulunduğu C Header dosyasını yaz. | ```c
/* SPDX-License-Identifier: GPL-2.0 */
#ifndef __PERF_KVM_STAT_H
#define __PERF_KVM_STAT_H
#include "tool.h"
#include "sort.h"
#include "stat.h"
#include "symbol.h"
#include "record.h"
#include <errno.h>
#include <stdlib.h>
#include <linux/zalloc.h>
#define KVM_EVENT_NAME_LEN 40
struct evsel;
struct evlist;
st... | |
Linux kernel'inin 'tools/perf/util/data-convert-json' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0-only
/*
* JSON export.
*
* Copyright (C) 2021, CodeWeavers Inc. <nfraser@codeweavers.com>
*/
#include "data-convert.h"
#include <fcntl.h>
#include <inttypes.h>
#include <sys/stat.h>
#include <unistd.h>
#include "linux/compiler.h"
#include "linux/err.h"
#include "util/auxt... | |
Linux işletim sistemi çekirdeği için 'tools/perf/util/dlfilter' yapılarının ve prototiplerinin bulunduğu C Header dosyasını yaz. | ```c
/* SPDX-License-Identifier: GPL-2.0 */
/*
* dlfilter.h: Interface to perf script --dlfilter shared object
* Copyright (c) 2021, Intel Corporation.
*/
#ifndef PERF_UTIL_DLFILTER_H
#define PERF_UTIL_DLFILTER_H
struct perf_session;
union perf_event;
struct perf_sample;
struct evsel;
struct machine;
struct addr_... | |
Linux kernel'inin 'tools/perf/util/bpf-event' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0
#include <errno.h>
#include <stddef.h>
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <bpf/bpf.h>
#include <bpf/btf.h>
#include <bpf/libbpf.h>
#include <linux/bpf.h>
#include <linux/btf.h>
#include <linux/err.h>
#include <linux/perf_event... | |
Linux kernel'inin 'tools/perf/util/auxtrace' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0-only
/*
* auxtrace.c: AUX area trace support
* Copyright (c) 2013-2015, Intel Corporation.
*/
#include <inttypes.h>
#include <sys/types.h>
#include <sys/mman.h>
#include <stdbool.h>
#include <string.h>
#include <limits.h>
#include <errno.h>
#include <linux/kernel.h>
#includ... | |
Linux işletim sistemi çekirdeği için 'tools/perf/util/term' yapılarının ve prototiplerinin bulunduğu C Header dosyasını yaz. | ```c
/* SPDX-License-Identifier: GPL-2.0 */
#ifndef __PERF_TERM_H
#define __PERF_TERM_H
struct termios;
struct winsize;
void get_term_dimensions(struct winsize *ws);
void set_term_quiet_input(struct termios *old);
#endif /* __PERF_TERM_H */
``` | |
Linux işletim sistemi çekirdeği için 'tools/perf/util/s390-cpumsf' yapılarının ve prototiplerinin bulunduğu C Header dosyasını yaz. | ```c
/* SPDX-License-Identifier: GPL-2.0 */
/*
* Copyright IBM Corp. 2018
* Auxtrace support for s390 CPU-Measurement Sampling Facility
*
* Author(s): Thomas Richter <tmricht@linux.ibm.com>
*/
#ifndef INCLUDE__PERF_S390_CPUMSF_H
#define INCLUDE__PERF_S390_CPUMSF_H
union perf_event;
struct perf_session;
struct p... | |
Linux işletim sistemi çekirdeği için 'tools/perf/util/mem-info' yapılarının ve prototiplerinin bulunduğu C Header dosyasını yaz. | ```c
/* SPDX-License-Identifier: GPL-2.0 */
#ifndef __PERF_MEM_INFO_H
#define __PERF_MEM_INFO_H
#include <linux/refcount.h>
#include <linux/perf_event.h>
#include <internal/rc_check.h>
#include "map_symbol.h"
DECLARE_RC_STRUCT(mem_info) {
struct addr_map_symbol iaddr;
struct addr_map_symbol daddr;
union perf_mem_d... | |
Linux kernel'inin 'tools/perf/util/trace-event' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0
#include <stdio.h>
#include <unistd.h>
#include <stdlib.h>
#include <errno.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <linux/kernel.h>
#include <linux/err.h>
#include <event-parse.h>
#include <api/fs/tracing_path.h>
#include <api/fs/fs.h>
#includ... | |
Linux işletim sistemi çekirdeği için 'tools/perf/util/top' yapılarının ve prototiplerinin bulunduğu C Header dosyasını yaz. | ```c
/* SPDX-License-Identifier: GPL-2.0 */
#ifndef __PERF_TOP_H
#define __PERF_TOP_H 1
#include "tool.h"
#include "evswitch.h"
#include "annotate.h"
#include "mutex.h"
#include "ordered-events.h"
#include "record.h"
#include <linux/types.h>
#include <stddef.h>
#include <stdbool.h>
#include <sys/ioctl.h>
struct evlis... | |
Linux kernel'inin 'tools/perf/util/mem-info' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0
#include <linux/zalloc.h>
#include "mem-info.h"
struct mem_info *mem_info__get(struct mem_info *mi)
{
struct mem_info *result;
if (RC_CHK_GET(result, mi))
refcount_inc(mem_info__refcnt(mi));
return result;
}
void mem_info__put(struct mem_info *mi)
{
if (mi && refcount_... | |
Linux kernel'inin 'tools/perf/util/kvm-stat' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0
#include "debug.h"
#include "evsel.h"
#include "kvm-stat.h"
#include <dwarf-regs.h>
bool kvm_exit_event(struct evsel *evsel)
{
uint16_t e_machine = evsel__e_machine(evsel, /*e_flags=*/NULL);
return evsel__name_is(evsel, kvm_exit_trace(e_machine));
}
void exit_event_get_key(... | |
Linux işletim sistemi çekirdeği için 'tools/perf/util/header' yapılarının ve prototiplerinin bulunduğu C Header dosyasını yaz. | ```c
/* SPDX-License-Identifier: GPL-2.0 */
#ifndef __PERF_HEADER_H
#define __PERF_HEADER_H
#include <linux/stddef.h>
#include <linux/perf_event.h>
#include <sys/types.h>
#include <stdio.h> // FILE
#include <stdbool.h>
#include <linux/bitmap.h>
#include <linux/types.h>
#include "env.h"
#include <perf/cpumap.h>
struct... | |
Linux işletim sistemi çekirdeği için 'tools/perf/util/mem2node' yapılarının ve prototiplerinin bulunduğu C Header dosyasını yaz. | ```c
#ifndef __MEM2NODE_H
#define __MEM2NODE_H
#include <linux/rbtree.h>
#include <linux/types.h>
struct perf_env;
struct phys_entry;
struct mem2node {
struct rb_root root;
struct phys_entry *entries;
int cnt;
};
int mem2node__init(struct mem2node *map, struct perf_env *env);
void mem2node__exit(struct mem... | |
Linux kernel'inin 'tools/perf/util/thread-stack' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0-only
/*
* thread-stack.c: Synthesize a thread's stack using call / return events
* Copyright (c) 2014, Intel Corporation.
*/
#include <linux/rbtree.h>
#include <linux/list.h>
#include <linux/log2.h>
#include <linux/zalloc.h>
#include <errno.h>
#include <stdlib.h>
#include <s... | |
Linux işletim sistemi çekirdeği için 'tools/perf/util/color' yapılarının ve prototiplerinin bulunduğu C Header dosyasını yaz. | ```c
/* SPDX-License-Identifier: GPL-2.0 */
#ifndef __PERF_COLOR_H
#define __PERF_COLOR_H
#include <linux/compiler.h>
#include <stdio.h>
#include <stdarg.h>
/* "\033[1;38;5;2xx;48;5;2xxm\0" is 23 bytes */
#define COLOR_MAXLEN 24
#define PERF_COLOR_NORMAL ""
#define PERF_COLOR_RESET "\033[m"
#define PERF_COLOR_BOLD ... | |
Linux kernel'inin 'tools/perf/util/srcline' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0
#include "srcline.h"
#include "addr2line.h"
#include "dso.h"
#include "callchain.h"
#include "libbfd.h"
#include "llvm.h"
#include "symbol.h"
#include "libdw.h"
#include "debug.h"
#include "util.h"
#include <inttypes.h>
#include <string.h>
#include <linux/string.h>
#include <li... | |
Linux işletim sistemi çekirdeği için 'tools/perf/util/map' yapılarının ve prototiplerinin bulunduğu C Header dosyasını yaz. | ```c
/* SPDX-License-Identifier: GPL-2.0 */
#ifndef __PERF_MAP_H
#define __PERF_MAP_H
#include <linux/refcount.h>
#include <linux/compiler.h>
#include <linux/list.h>
#include <linux/rbtree.h>
#include <stdio.h>
#include <string.h>
#include <stdbool.h>
#include <linux/types.h>
#include <internal/rc_check.h>
struct dso... | |
Linux kernel'inin 'tools/perf/util/capstone' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0
#include "capstone.h"
#include "annotate.h"
#include "addr_location.h"
#include "debug.h"
#include "disasm.h"
#include "dso.h"
#include "machine.h"
#include "map.h"
#include "namespaces.h"
#include "print_insn.h"
#include "symbol.h"
#include "thread.h"
#include <dlfcn.h>
#includ... | |
Linux işletim sistemi çekirdeği için 'tools/perf/util/symsrc' yapılarının ve prototiplerinin bulunduğu C Header dosyasını yaz. | ```c
/* SPDX-License-Identifier: GPL-2.0 */
#ifndef __PERF_SYMSRC_
#define __PERF_SYMSRC_ 1
#include <stdbool.h>
#include <stddef.h>
#include "dso.h"
#ifdef HAVE_LIBELF_SUPPORT
#include <libelf.h>
#include <gelf.h>
#endif
#include <elf.h>
struct symsrc {
char *name;
int fd;
enum dso_binary_type type;
... | |
Linux kernel'inin 'tools/perf/util/dso' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0
#include <asm/bug.h>
#include <linux/kernel.h>
#include <linux/string.h>
#include <linux/zalloc.h>
#include <sys/time.h>
#include <sys/resource.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <unistd.h>
#include <errno.h>
#include <fcntl.h>
#include <stdlib.h>
#ifdef HA... | |
Linux kernel'inin 'tools/perf/util/s390-sample-raw' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0
/*
* Copyright IBM Corp. 2019
* Author(s): Thomas Richter <tmricht@linux.ibm.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License (version 2 only)
* as published by the Free Software Foundation... | |
Linux kernel'inin 'tools/perf/util/dwarf-regs' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0
/*
* dwarf-regs.c : Mapping of DWARF debug register numbers into register names.
*
* Written by: Masami Hiramatsu <mhiramat@kernel.org>
*/
#include <stdlib.h>
#include <string.h>
#include <debug.h>
#include <dwarf-regs.h>
#include <elf.h>
#include <errno.h>
#include <linux/... | |
Linux işletim sistemi çekirdeği için 'tools/perf/util/rwsem' yapılarının ve prototiplerinin bulunduğu C Header dosyasını yaz. | ```c
#ifndef _PERF_RWSEM_H
#define _PERF_RWSEM_H
#include <pthread.h>
#include "mutex.h"
/*
* Mutexes have additional error checking. Enable to use a mutex rather than a
* rwlock for debugging.
*/
#define RWS_ERRORCHECK 0
struct LOCKABLE rw_semaphore {
#if RWS_ERRORCHECK
struct mutex mtx;
#else
pthread_rwlock_t... | |
Linux kernel'inin 'tools/perf/util/mem-events' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0
#include <stddef.h>
#include <stdlib.h>
#include <string.h>
#include <errno.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <unistd.h>
#include <api/fs/fs.h>
#include <linux/kernel.h>
#include "cpumap.h"
#include "map_symbol.h"
#include "mem-events.h"
#include "mem-info... | |
Linux kernel'inin 'tools/perf/util/sideband_evlist' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0-only
#include "util/debug.h"
#include "util/evlist.h"
#include "util/evsel.h"
#include "util/mmap.h"
#include "util/perf_api_probe.h"
#include <perf/mmap.h>
#include <linux/perf_event.h>
#include <limits.h>
#include <pthread.h>
#include <sched.h>
#include <stdbool.h>
int evlis... | |
Linux işletim sistemi çekirdeği için 'tools/perf/util/libbfd' yapılarının ve prototiplerinin bulunduğu C Header dosyasını yaz. | ```c
/* SPDX-License-Identifier: GPL-2.0 */
#ifndef __PERF_LIBBFD_H
#define __PERF_LIBBFD_H
#include <linux/compiler.h>
#include <linux/types.h>
#include <stdbool.h>
#include <stddef.h>
struct annotate_args;
struct build_id;
struct dso;
struct inline_node;
struct symbol;
#ifdef HAVE_LIBBFD_SUPPORT
int libbfd__addr2l... | |
Linux işletim sistemi çekirdeği için 'tools/perf/util/mutex' yapılarının ve prototiplerinin bulunduğu C Header dosyasını yaz. | ```c
/* SPDX-License-Identifier: GPL-2.0 */
#ifndef __PERF_MUTEX_H
#define __PERF_MUTEX_H
#include <pthread.h>
#include <stdbool.h>
/*
* A function-like feature checking macro that is a wrapper around
* `__has_attribute`, which is defined by GCC 5+ and Clang and evaluates to a
* nonzero constant integer if the att... | |
Linux işletim sistemi çekirdeği için 'tools/perf/util/parse-sublevel-options' yapılarının ve prototiplerinin bulunduğu C Header dosyasını yaz. | ```c
#ifndef _PERF_PARSE_SUBLEVEL_OPTIONS_H
#define _PERF_PARSE_SUBLEVEL_OPTIONS_H
struct sublevel_option {
const char *name;
int *value_ptr;
};
int perf_parse_sublevel_options(const char *str, struct sublevel_option *opts);
#endif
``` | |
Linux kernel'inin 'tools/perf/util/bpf_counter' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0
/* Copyright (c) 2019 Facebook */
#include <assert.h>
#include <limits.h>
#include <unistd.h>
#include <sys/file.h>
#include <sys/resource.h>
#include <sys/time.h>
#include <linux/err.h>
#include <linux/list.h>
#include <linux/zalloc.h>
#include <api/fs/fs.h>
#include <bpf/bpf... | |
Linux işletim sistemi çekirdeği için 'tools/perf/util/sort' yapılarının ve prototiplerinin bulunduğu C Header dosyasını yaz. | ```c
/* SPDX-License-Identifier: GPL-2.0 */
#ifndef __PERF_SORT_H
#define __PERF_SORT_H
#include <regex.h>
#include <stdbool.h>
#include "hist.h"
struct option;
struct perf_env;
extern regex_t parent_regex;
extern const char *sort_order;
extern const char *field_order;
extern const char default_parent_pattern[];
exte... | |
Linux işletim sistemi çekirdeği için 'tools/perf/util/pfm' yapılarının ve prototiplerinin bulunduğu C Header dosyasını yaz. | ```c
/* SPDX-License-Identifier: GPL-2.0 */
/*
* Support for libpfm4 event encoding.
*
* Copyright 2020 Google LLC.
*/
#ifndef __PERF_PFM_H
#define __PERF_PFM_H
#include "print-events.h"
#include <subcmd/parse-options.h>
#ifdef HAVE_LIBPFM
int parse_libpfm_events_option(const struct option *opt, const char *str,
... | |
Linux işletim sistemi çekirdeği için 'tools/perf/util/maps' yapılarının ve prototiplerinin bulunduğu C Header dosyasını yaz. | ```c
/* SPDX-License-Identifier: GPL-2.0 */
#ifndef __PERF_MAPS_H
#define __PERF_MAPS_H
#include <linux/refcount.h>
#include <stdio.h>
#include <stdbool.h>
#include <linux/types.h>
struct ref_reloc_sym;
struct machine;
struct map;
struct maps;
#define KMAP_NAME_LEN 256
struct kmap {
struct ref_reloc_sym *ref_reloc... | |
Linux işletim sistemi çekirdeği için 'tools/perf/util/affinity' yapılarının ve prototiplerinin bulunduğu C Header dosyasını yaz. | ```c
// SPDX-License-Identifier: GPL-2.0
#ifndef PERF_AFFINITY_H
#define PERF_AFFINITY_H 1
#include <stdbool.h>
struct perf_cpu_map;
struct affinity {
unsigned long *orig_cpus;
unsigned long *sched_cpus;
bool changed;
};
void affinity__cleanup(struct affinity *a);
void affinity__set(struct affinity *a, int cpu);
... | |
Linux kernel'inin 'tools/perf/util/bpf-utils' 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 <errno.h>
#include <stdlib.h>
#include <linux/err.h>
#include <linux/kernel.h>
#include <bpf/bpf.h>
#include "bpf-utils.h"
#include "debug.h"
struct bpil_array_desc {
int array_offset; /* e.g. offset ... | |
Linux işletim sistemi çekirdeği için 'tools/perf/util/trigger' yapılarının ve prototiplerinin bulunduğu C Header dosyasını yaz. | ```c
/* SPDX-License-Identifier: GPL-2.0 */
#ifndef __TRIGGER_H_
#define __TRIGGER_H_ 1
#include "asm/bug.h"
/*
* Use trigger to model operations which need to be executed when
* an event (a signal, for example) is observed.
*
* States and transits:
*
*
* OFF--> ON --> READY --(hit)--> HIT
* ... | |
Linux işletim sistemi çekirdeği için 'tools/perf/util/pmu' yapılarının ve prototiplerinin bulunduğu C Header dosyasını yaz. | ```c
/* SPDX-License-Identifier: GPL-2.0 */
#ifndef __PMU_H
#define __PMU_H
#include <linux/bitmap.h>
#include <linux/compiler.h>
#include <linux/perf_event.h>
#include <linux/list.h>
#include <stdbool.h>
#include <stdio.h>
#include "parse-events.h"
#include "pmu-events/pmu-events.h"
#include "map_symbol.h"
#include "... | |
Linux işletim sistemi çekirdeği için 'tools/perf/util/namespaces' yapılarının ve prototiplerinin bulunduğu C Header dosyasını yaz. | ```c
/* SPDX-License-Identifier: GPL-2.0-only */
/*
*
* Copyright (C) 2017 Hari Bathini, IBM Corporation
*/
#ifndef __PERF_NAMESPACES_H
#define __PERF_NAMESPACES_H
#include <sys/types.h>
#include <sys/stat.h>
#include <linux/stddef.h>
#include <linux/perf_event.h>
#include <linux/refcount.h>
#include <linux/types.... | |
Linux kernel'inin 'tools/perf/util/stat-shadow' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0
#include <errno.h>
#include <math.h>
#include <stdio.h>
#include "evsel.h"
#include "stat.h"
#include "color.h"
#include "debug.h"
#include "pmu.h"
#include "rblist.h"
#include "evlist.h"
#include "expr.h"
#include "metricgroup.h"
#include "cgroup.h"
#include "units.h"
#include ... | |
Linux kernel'inin 'tools/perf/util/branch' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
#include "util/map_symbol.h"
#include "util/branch.h"
#include <linux/kernel.h>
static bool cross_area(u64 addr1, u64 addr2, int size)
{
u64 align1, align2;
align1 = addr1 & ~(size - 1);
align2 = addr2 & ~(size - 1);
return (align1 != align2) ? true : false;
}
#define AREA_4K 4096
#define AREA_2M (2 * 10... | |
Linux kernel'inin 'tools/perf/util/thread_map' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0
#include <dirent.h>
#include <errno.h>
#include <limits.h>
#include <stdbool.h>
#include <stdlib.h>
#include <stdio.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <unistd.h>
#include "string2.h"
#include "strlist.h"
#include <string.h>
#include <api/fs/fs.h>
#include <... | |
Linux işletim sistemi çekirdeği için 'tools/perf/util/time-utils' yapılarının ve prototiplerinin bulunduğu C Header dosyasını yaz. | ```c
/* SPDX-License-Identifier: GPL-2.0 */
#ifndef _TIME_UTILS_H_
#define _TIME_UTILS_H_
#include <stddef.h>
#include <time.h>
#include <linux/types.h>
struct perf_time_interval {
u64 start, end;
};
int parse_nsec_time(const char *str, u64 *ptime);
int perf_time__parse_str(struct perf_time_interval *ptime, const ... | |
Linux kernel'inin 'tools/perf/util/symbol' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0
#include <dirent.h>
#include <errno.h>
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <linux/capability.h>
#include <linux/kernel.h>
#include <linux/mman.h>
#include <linux/string.h>
#include <linux/time64.h>
#include <sys/types.h>
#include <sys/stat.h>
#inc... | |
Linux işletim sistemi çekirdeği için 'tools/perf/util/topdown' yapılarının ve prototiplerinin bulunduğu C Header dosyasını yaz. | ```c
/* SPDX-License-Identifier: GPL-2.0 */
#ifndef TOPDOWN_H
#define TOPDOWN_H 1
#include <stdbool.h>
struct evsel;
bool arch_topdown_sample_read(struct evsel *leader);
#endif
``` | |
Linux kernel'inin 'tools/perf/util/block-range' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0
#include "block-range.h"
#include "annotate.h"
#include <assert.h>
#include <stdlib.h>
static struct {
struct rb_root root;
u64 blocks;
} block_ranges;
static void block_range__debug(void)
{
#ifndef NDEBUG
struct rb_node *rb;
u64 old = 0; /* NULL isn't executable */
for ... | |
Linux kernel'inin 'tools/perf/util/synthetic-events' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0-only
#include "util/cgroup.h"
#include "util/data.h"
#include "util/debug.h"
#include "util/dso.h"
#include "util/event.h"
#include "util/evlist.h"
#include "util/machine.h"
#include "util/map.h"
#include "util/map_symbol.h"
#include "util/branch.h"
#include "util/memswap.h"
#i... | |
Linux kernel'inin 'tools/perf/util/topdown' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0
#include "topdown.h"
#include <linux/kernel.h>
__weak bool arch_topdown_sample_read(struct evsel *leader __maybe_unused)
{
return false;
}
``` | |
Linux kernel'inin 'tools/perf/util/intel-bts' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0-only
/*
* intel-bts.c: Intel Processor Trace support
* Copyright (c) 2013-2015, Intel Corporation.
*/
#include <endian.h>
#include <errno.h>
#include <byteswap.h>
#include <inttypes.h>
#include <linux/kernel.h>
#include <linux/types.h>
#include <linux/bitops.h>
#include <lin... | |
Linux kernel'inin 'tools/perf/util/print_insn' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0
/*
* Instruction binary disassembler based on capstone.
*
* Author(s): Changbin Du <changbin.du@huawei.com>
*/
#include <inttypes.h>
#include <string.h>
#include <stdbool.h>
#include "capstone.h"
#include "debug.h"
#include "sample.h"
#include "symbol.h"
#include "machine.h"... | |
Linux işletim sistemi çekirdeği için 'tools/perf/util/demangle-java' yapılarının ve prototiplerinin bulunduğu C Header dosyasını yaz. | ```c
/* SPDX-License-Identifier: GPL-2.0 */
#ifndef __PERF_DEMANGLE_JAVA
#define __PERF_DEMANGLE_JAVA 1
/*
* demangle function flags
*/
#define JAVA_DEMANGLE_NORET 0x1 /* do not process return type */
char * java_demangle_sym(const char *str, int flags);
#endif /* __PERF_DEMANGLE_JAVA */
``` | |
Linux kernel'inin 'tools/perf/util/strfilter' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0
#include "string2.h"
#include "strfilter.h"
#include <errno.h>
#include <stdlib.h>
#include <linux/ctype.h>
#include <linux/string.h>
#include <linux/zalloc.h>
/* Operators */
static const char *OP_and = "&"; /* Logical AND */
static const char *OP_or = "|"; /* Logical OR */
s... | |
Linux kernel'inin 'tools/perf/util/term' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0
#include "term.h"
#include <stdlib.h>
#include <termios.h>
#include <unistd.h>
#include <sys/ioctl.h>
void get_term_dimensions(struct winsize *ws)
{
char *s = getenv("LINES");
if (s != NULL) {
ws->ws_row = atoi(s);
s = getenv("COLUMNS");
if (s != NULL) {
ws->ws_col ... | |
Linux işletim sistemi çekirdeği için 'tools/perf/util/spark' yapılarının ve prototiplerinin bulunduğu C Header dosyasını yaz. | ```c
/* SPDX-License-Identifier: GPL-2.0 */
#ifndef SPARK_H
#define SPARK_H 1
#define NUM_SPARKS 8
int print_spark(char *bf, int size, unsigned long *val, int numval);
#endif
``` | |
Linux işletim sistemi çekirdeği için 'tools/perf/util/rblist' yapılarının ve prototiplerinin bulunduğu C Header dosyasını yaz. | ```c
/* SPDX-License-Identifier: GPL-2.0 */
#ifndef __PERF_RBLIST_H
#define __PERF_RBLIST_H
#include <linux/rbtree.h>
#include <stdbool.h>
/*
* create node structs of the form:
* struct my_node {
* struct rb_node rb_node;
* ... my data ...
* };
*
* create list structs of the form:
* struct mylist {
*... | |
Linux işletim sistemi çekirdeği için 'tools/perf/util/cap' yapılarının ve prototiplerinin bulunduğu C Header dosyasını yaz. | ```c
/* SPDX-License-Identifier: GPL-2.0 */
#ifndef __PERF_CAP_H
#define __PERF_CAP_H
#include <stdbool.h>
#include <linux/capability.h>
/* For older systems */
#ifndef CAP_SYSLOG
#define CAP_SYSLOG 34
#endif
#ifndef CAP_PERFMON
#define CAP_PERFMON 38
#endif
#ifndef CAP_BPF
#define CAP_BPF 39
#endif
/* Query if a... | |
Linux kernel'inin 'tools/perf/util/thread' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0
#include <elf.h>
#include <errno.h>
#include <fcntl.h>
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <linux/kernel.h>
#include <linux/zalloc.h>
#include "dso.h"
#include "session.h"
#include "thread.h"
#include "thread-stack.h"
#include "debug.h"
#include "... | |
Linux kernel'inin 'tools/perf/util/threads' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0
#include "threads.h"
#include "machine.h"
#include "thread.h"
static struct threads_table_entry *threads__table(struct threads *threads, pid_t tid)
{
/* Cast it to handle tid == -1 */
return &threads->table[(unsigned int)tid % THREADS__TABLE_SIZE];
}
static size_t key_hash(l... | |
Linux kernel'inin 'tools/perf/util/smt' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0-only
#include <string.h>
#include "api/fs/fs.h"
#include "cputopo.h"
#include "smt.h"
bool smt_on(void)
{
static bool cached;
static bool cached_result;
int fs_value;
if (cached)
return cached_result;
if (sysfs__read_int("devices/system/cpu/smt/active", &fs_value) >= 0... | |
Linux kernel'inin 'tools/perf/util/help-unknown-cmd' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0
#include "cache.h"
#include "config.h"
#include <poll.h>
#include <stdio.h>
#include <stdlib.h>
#include <subcmd/help.h>
#include "../builtin.h"
#include "levenshtein.h"
#include <linux/zalloc.h>
static int autocorrect;
static int perf_unknown_cmd_config(const char *var, const... | |
Linux işletim sistemi çekirdeği için 'tools/perf/util/srccode' yapılarının ve prototiplerinin bulunduğu C Header dosyasını yaz. | ```c
#ifndef SRCCODE_H
#define SRCCODE_H 1
struct srccode_state {
char *srcfile;
unsigned line;
};
static inline void srccode_state_init(struct srccode_state *state)
{
state->srcfile = NULL;
state->line = 0;
}
void srccode_state_free(struct srccode_state *state);
/* Result is not 0 terminated */
char *find_... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.