plateform stringclasses 1
value | repo_name stringclasses 2
values | name stringlengths 1 78 | ext stringclasses 2
values | path stringlengths 15 1.11k | size int64 1 8.55M | source_encoding stringclasses 11
values | md5 stringlengths 32 32 | text stringlengths 0 8.49M |
|---|---|---|---|---|---|---|---|---|
google | android | bp_signal_overflow | .c | platform/hardware/bsp/kernel/intel/edison-v4.4/tools/perf/tests/bp_signal_overflow.c | 2,808 | utf_8 | 0ced46bdebd766e7341788e929aa5a34 | /*
* 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 warnings when printing __u64 with %llu.
*/
#define __SANE_USERSPACE_TYPES__
#include <stdlib.h>
#include <stdio.h>
#include <unistd.h>
#i... |
google | android | bpf | .c | platform/hardware/bsp/kernel/intel/edison-v4.4/tools/perf/tests/bpf.c | 4,411 | utf_8 | 80fee60c4047d0dac8a40806ab2b9a3c | #include <stdio.h>
#include <sys/epoll.h>
#include <util/bpf-loader.h>
#include <util/evlist.h>
#include "tests.h"
#include "llvm.h"
#include "debug.h"
#define NR_ITERS 111
#ifdef HAVE_LIBBPF_SUPPORT
static int epoll_pwait_loop(void)
{
int i;
/* Should fail NR_ITERS times */
for (i = 0; i < NR_ITERS; i++)
... |
google | android | attr | .c | platform/hardware/bsp/kernel/intel/edison-v4.4/tools/perf/tests/attr.c | 4,578 | utf_8 | 3cf2899aef7184cfb4f6074092c68867 | /*
* The struct perf_event_attr test support.
*
* This test is embedded inside into perf directly and is governed
* by the PERF_TEST_ATTR environment variable and hook inside
* sys_perf_event_open function.
*
* The general idea is to store 'struct perf_event_attr' details for
* each event created within single ... |
google | android | perf-record | .c | platform/hardware/bsp/kernel/intel/edison-v4.4/tools/perf/tests/perf-record.c | 7,989 | utf_8 | df3c05f96ec04eb8ea81968bafa7f03e | #include <sched.h>
#include "evlist.h"
#include "evsel.h"
#include "perf.h"
#include "debug.h"
#include "tests.h"
static int sched__get_first_possible_cpu(pid_t pid, cpu_set_t *maskp)
{
int i, cpu = -1, nrcpus = 1024;
realloc:
CPU_ZERO(maskp);
if (sched_getaffinity(pid, sizeof(*maskp), maskp) == -1) {
if (errno ... |
google | android | parse-no-sample-id-all | .c | platform/hardware/bsp/kernel/intel/edison-v4.4/tools/perf/tests/parse-no-sample-id-all.c | 2,369 | utf_8 | 6bd8012b78cec5153dc74fc59d0dd647 | #include <linux/types.h>
#include <stddef.h>
#include "tests.h"
#include "event.h"
#include "evlist.h"
#include "header.h"
#include "util.h"
#include "debug.h"
static int process_event(struct perf_evlist **pevlist, union perf_event *event)
{
struct perf_sample sample;
if (event->header.type == PERF_RECORD_HEADER_... |
google | android | dwarf-unwind | .c | platform/hardware/bsp/kernel/intel/edison-v4.4/tools/perf/tests/dwarf-unwind.c | 4,014 | utf_8 | 45c177a064a126db6ce657ec9c53e681 | #include <linux/compiler.h>
#include <linux/types.h>
#include <unistd.h>
#include "tests.h"
#include "debug.h"
#include "machine.h"
#include "event.h"
#include "unwind.h"
#include "perf_regs.h"
#include "map.h"
#include "thread.h"
#include "callchain.h"
#if defined (__x86_64__) || defined (__i386__)
#include "arch-tes... |
google | android | thread-map | .c | platform/hardware/bsp/kernel/intel/edison-v4.4/tools/perf/tests/thread-map.c | 1,081 | utf_8 | 55052ec29f4394e4aba0d1fe813fae90 | #include <sys/types.h>
#include <unistd.h>
#include "tests.h"
#include "thread_map.h"
#include "debug.h"
int test__thread_map(void)
{
struct thread_map *map;
/* test map on current pid */
map = thread_map__new_by_pid(getpid());
TEST_ASSERT_VAL("failed to alloc map", map);
thread_map__read_comms(map);
TEST_ASS... |
google | android | openat-syscall | .c | platform/hardware/bsp/kernel/intel/edison-v4.4/tools/perf/tests/openat-syscall.c | 1,561 | utf_8 | a00cb0e4093f54a13c2057515ff9300d | #include <api/fs/tracing_path.h>
#include <linux/err.h>
#include "thread_map.h"
#include "evsel.h"
#include "debug.h"
#include "tests.h"
int test__openat_syscall_event(void)
{
int err = -1, fd;
struct perf_evsel *evsel;
unsigned int nr_openat_calls = 111, i;
struct thread_map *threads = thread_map__new(-1, getpid(... |
google | android | topology | .c | platform/hardware/bsp/kernel/intel/edison-v4.4/tools/perf/tests/topology.c | 2,418 | utf_8 | 79b96314af9ef6ada29b82d680fd7fc1 | #include <string.h>
#include <stdlib.h>
#include <stdio.h>
#include "tests.h"
#include "util.h"
#include "session.h"
#include "evlist.h"
#include "debug.h"
#define TEMPL "/tmp/perf-test-XXXXXX"
#define DATA_SIZE 10
static int get_temp(char *path)
{
int fd;
strcpy(path, TEMPL);
fd = mkstemp(path);
if (fd < 0) {
... |
google | android | bpf-script-test-kbuild | .c | platform/hardware/bsp/kernel/intel/edison-v4.4/tools/perf/tests/bpf-script-test-kbuild.c | 529 | utf_8 | 5ff15fce81539eedd1cdbeec9ae02f51 | /*
* bpf-script-test-kbuild.c
* Test include from kernel header
*/
#ifndef LINUX_VERSION_CODE
# error Need LINUX_VERSION_CODE
# error Example: for 4.2 kernel, put 'clang-opt="-DLINUX_VERSION_CODE=0x40200" into llvm section of ~/.perfconfig'
#endif
#define SEC(NAME) __attribute__((section(NAME), used))
#include <uapi... |
google | android | hists_cumulate | .c | platform/hardware/bsp/kernel/intel/edison-v4.4/tools/perf/tests/hists_cumulate.c | 20,626 | utf_8 | fe84d7972beeecd02beadf034af43a41 | #include "perf.h"
#include "util/debug.h"
#include "util/symbol.h"
#include "util/sort.h"
#include "util/evsel.h"
#include "util/evlist.h"
#include "util/machine.h"
#include "util/thread.h"
#include "util/parse-events.h"
#include "tests/tests.h"
#include "tests/hists_common.h"
struct sample {
u32 pid;
u64 ip;
struc... |
google | android | task-exit | .c | platform/hardware/bsp/kernel/intel/edison-v4.4/tools/perf/tests/task-exit.c | 2,993 | utf_8 | 2bada2f17c308e4e38af5625ac564df1 | #include "evlist.h"
#include "evsel.h"
#include "thread_map.h"
#include "cpumap.h"
#include "tests.h"
#include <signal.h>
static int exited;
static int nr_exit;
static void sig_handler(int sig __maybe_unused)
{
exited = 1;
}
/*
* perf_evlist__prepare_workload will send a SIGUSR1 if the fork fails, since
* we ask... |
google | android | pmu | .c | platform/hardware/bsp/kernel/intel/edison-v4.4/tools/perf/tests/pmu.c | 3,789 | utf_8 | 13dbb5c30a5d31505c03c650501b0197 | #include "parse-events.h"
#include "pmu.h"
#include "util.h"
#include "tests.h"
/* Simulated format definitions. */
static struct test_format {
const char *name;
const char *value;
} test_formats[] = {
{ "krava01", "config:0-1,62-63\n", },
{ "krava02", "config:10-17\n", },
{ "krava03", "config:5\n", },
{ "krava1... |
google | android | hists_filter | .c | platform/hardware/bsp/kernel/intel/edison-v4.4/tools/perf/tests/hists_filter.c | 9,835 | utf_8 | d8da8656a983e3e1143d0199050bb97a | #include "perf.h"
#include "util/debug.h"
#include "util/symbol.h"
#include "util/sort.h"
#include "util/evsel.h"
#include "util/evlist.h"
#include "util/machine.h"
#include "util/thread.h"
#include "util/parse-events.h"
#include "tests/tests.h"
#include "tests/hists_common.h"
struct sample {
u32 pid;
u64 ip;
struc... |
google | android | hists_link | .c | platform/hardware/bsp/kernel/intel/edison-v4.4/tools/perf/tests/hists_link.c | 8,527 | utf_8 | 03ae73b611f78df7d19a17f10ff4acc7 | #include "perf.h"
#include "tests.h"
#include "debug.h"
#include "symbol.h"
#include "sort.h"
#include "evsel.h"
#include "evlist.h"
#include "machine.h"
#include "thread.h"
#include "parse-events.h"
#include "hists_common.h"
struct sample {
u32 pid;
u64 ip;
struct thread *thread;
struct map *map;
struct symbol *... |
google | android | python-use | .c | platform/hardware/bsp/kernel/intel/edison-v4.4/tools/perf/tests/python-use.c | 409 | utf_8 | ee079038b59c540badc73e6e73de364c | /*
* Just test if we can load the python binding.
*/
#include <stdio.h>
#include <stdlib.h>
#include "tests.h"
extern int verbose;
int test__python_use(void)
{
char *cmd;
int ret;
if (asprintf(&cmd, "echo \"import sys ; sys.path.append('%s'); import perf\" | %s %s",
PYTHONPATH, PYTHON, verbose ? "" : "2... |
google | android | hists_common | .c | platform/hardware/bsp/kernel/intel/edison-v4.4/tools/perf/tests/hists_common.c | 5,083 | utf_8 | 2e240b7ff2b9df427f0f41f4875cb6ff | #include "perf.h"
#include "util/debug.h"
#include "util/symbol.h"
#include "util/sort.h"
#include "util/evsel.h"
#include "util/evlist.h"
#include "util/machine.h"
#include "util/thread.h"
#include "tests/hists_common.h"
static struct {
u32 pid;
const char *comm;
} fake_threads[] = {
{ FAKE_PID_PERF1, "perf" },
{... |
google | android | switch-tracking | .c | platform/hardware/bsp/kernel/intel/edison-v4.4/tools/perf/tests/switch-tracking.c | 13,093 | utf_8 | 4fde781f66ccb4bcceb9dee94e028839 | #include <sys/time.h>
#include <sys/prctl.h>
#include <time.h>
#include <stdlib.h>
#include "parse-events.h"
#include "evlist.h"
#include "evsel.h"
#include "thread_map.h"
#include "cpumap.h"
#include "tests.h"
static int spin_sleep(void)
{
struct timeval start, now, diff, maxtime;
struct timespec ts;
int err, i;
... |
google | android | openat-syscall-all-cpus | .c | platform/hardware/bsp/kernel/intel/edison-v4.4/tools/perf/tests/openat-syscall-all-cpus.c | 2,982 | utf_8 | c81304343e7e632656bb9a65211e96db | #include <api/fs/fs.h>
#include <linux/err.h>
#include "evsel.h"
#include "tests.h"
#include "thread_map.h"
#include "cpumap.h"
#include "debug.h"
#include "stat.h"
int test__openat_syscall_event_on_all_cpus(void)
{
int err = -1, fd, cpu;
struct cpu_map *cpus;
struct perf_evsel *evsel;
unsigned int nr_openat_calls... |
google | android | hists_output | .c | platform/hardware/bsp/kernel/intel/edison-v4.4/tools/perf/tests/hists_output.c | 18,297 | utf_8 | f67adaede0f47f4ce1eb5522752d3ee9 | #include "perf.h"
#include "util/debug.h"
#include "util/symbol.h"
#include "util/sort.h"
#include "util/evsel.h"
#include "util/evlist.h"
#include "util/machine.h"
#include "util/thread.h"
#include "util/parse-events.h"
#include "tests/tests.h"
#include "tests/hists_common.h"
struct sample {
u32 cpu;
u32 pid;
u64 ... |
google | android | builtin-test | .c | platform/hardware/bsp/kernel/intel/edison-v4.4/tools/perf/tests/builtin-test.c | 6,911 | utf_8 | c9fe994646076fd6449d425a8a88a7d5 | /*
* builtin-test.c
*
* Builtin regression testing command: ever growing number of sanity tests
*/
#include <unistd.h>
#include <string.h>
#include "builtin.h"
#include "hist.h"
#include "intlist.h"
#include "tests.h"
#include "debug.h"
#include "color.h"
#include "parse-options.h"
#include "symbol.h"
struct test ... |
google | android | dso-data | .c | platform/hardware/bsp/kernel/intel/edison-v4.4/tools/perf/tests/dso-data.c | 8,008 | utf_8 | 80d47c2efc369cf8d961990098d1322c | #include <stdlib.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 "util.h"
#include "machine.h"
#include "symbol.h"
#include "tests.h"
#include "debug.h"
static char *test_file(int size)
{
#define TEM... |
google | android | mmap-basic | .c | platform/hardware/bsp/kernel/intel/edison-v4.4/tools/perf/tests/mmap-basic.c | 3,938 | utf_8 | 263accf7b2733347a4a6d25406218733 | #include "evlist.h"
#include "evsel.h"
#include "thread_map.h"
#include "cpumap.h"
#include "tests.h"
#include <linux/err.h>
/*
* This test will generate random numbers of calls to some getpid syscalls,
* then establish an mmap for a group of events that are created to monitor
* the syscalls.
*
* It will receive ... |
google | android | mmap-thread-lookup | .c | platform/hardware/bsp/kernel/intel/edison-v4.4/tools/perf/tests/mmap-thread-lookup.c | 4,678 | utf_8 | 200768d0c6a762bb08a0031e76b634f9 | #include <unistd.h>
#include <sys/syscall.h>
#include <sys/types.h>
#include <sys/mman.h>
#include <pthread.h>
#include <stdlib.h>
#include <stdio.h>
#include "debug.h"
#include "tests.h"
#include "machine.h"
#include "thread_map.h"
#include "symbol.h"
#include "thread.h"
#define THREADS 4
static int go_away;
struct... |
google | android | sw-clock | .c | platform/hardware/bsp/kernel/intel/edison-v4.4/tools/perf/tests/sw-clock.c | 2,966 | utf_8 | b9187067a9784ede712af054e5726ed7 | #include <unistd.h>
#include <stdlib.h>
#include <signal.h>
#include <sys/mman.h>
#include "tests.h"
#include "util/evsel.h"
#include "util/evlist.h"
#include "util/cpumap.h"
#include "util/thread_map.h"
#define NR_LOOPS 10000000
/*
* then check their frequency -> period conversion has no artifact of
* setting perio... |
google | android | bpf-script-example | .c | platform/hardware/bsp/kernel/intel/edison-v4.4/tools/perf/tests/bpf-script-example.c | 1,303 | utf_8 | d979466d6a4785b028fbc4d35f5508f2 | /*
* bpf-script-example.c
* Test basic LLVM building
*/
#ifndef LINUX_VERSION_CODE
# error Need LINUX_VERSION_CODE
# error Example: for 4.2 kernel, put 'clang-opt="-DLINUX_VERSION_CODE=0x40200" into llvm section of ~/.perfconfig'
#endif
#define BPF_ANY 0
#define BPF_MAP_TYPE_ARRAY 2
#define BPF_FUNC_map_lookup_elem ... |
google | android | mem-functions | .c | platform/hardware/bsp/kernel/intel/edison-v4.4/tools/perf/bench/mem-functions.c | 8,859 | utf_8 | d63d9ca635f62032c88d59037f8770b6 | /*
* mem-memcpy.c
*
* Simple memcpy() and memset() benchmarks
*
*/
#include "../perf.h"
#include "../util/util.h"
#include "../util/parse-options.h"
#include "../util/header.h"
#include "../util/cloexec.h"
#include "bench.h"
#include "mem-memcpy-arch.h"
#include "mem-memset-arch.h"
#include <stdio.h>
#include <std... |
google | android | sched-messaging | .c | platform/hardware/bsp/kernel/intel/edison-v4.4/tools/perf/bench/sched-messaging.c | 7,170 | utf_8 | 3915c31178fac6fa5c3692468b67e5c3 | /*
*
* sched-messaging.c
*
* messaging: Benchmark for scheduler and IPC mechanisms
*
*
*/
#include "../perf.h"
#include "../util/util.h"
#include "../util/parse-options.h"
#include "../builtin.h"
#include "bench.h"
/* Test groups of 20 processes spraying to 20 receivers */
#include <pthread.h>
#include <stdio.h>... |
google | android | sched-pipe | .c | platform/hardware/bsp/kernel/intel/edison-v4.4/tools/perf/bench/sched-pipe.c | 3,930 | utf_8 | e9b488a45e428aee45d7d1909d10cb58 | /*
*
* sched-pipe.c
*
* pipe: Benchmark for pipe()
*
*/
#include "../perf.h"
#include "../util/util.h"
#include "../util/parse-options.h"
#include "../builtin.h"
#include "bench.h"
#include <unistd.h>
#include <stdio.h>
#include <stdlib.h>
#include <signal.h>
#include <sys/wait.h>
#include <string.h>
#include <er... |
google | android | futex-wake | .c | platform/hardware/bsp/kernel/intel/edison-v4.4/tools/perf/bench/futex-wake.c | 5,384 | utf_8 | 32c5732c2783a24e4e6d4587b8088dd9 | /*
*
* futex-wake: Block a bunch of threads on a futex and wake'em up, N at a time.
*
* This program is particularly useful to measure the latency of nthread wakeups
* in non-error situations: all waiters are queued and all wake calls wakeup
* one or more tasks, and thus the waitqueue is never empty.
*/
#includ... |
google | android | futex-lock-pi | .c | platform/hardware/bsp/kernel/intel/edison-v4.4/tools/perf/bench/futex-lock-pi.c | 5,407 | utf_8 | 1e8a5d3c9168ccdfb16365aceafbfd86 | /*
*/
#include "../perf.h"
#include "../util/util.h"
#include "../util/stat.h"
#include "../util/parse-options.h"
#include "../util/header.h"
#include "bench.h"
#include "futex.h"
#include <err.h>
#include <stdlib.h>
#include <sys/time.h>
#include <pthread.h>
struct worker {
int tid;
u_int32_t *futex;
pthread_t thr... |
google | android | futex-requeue | .c | platform/hardware/bsp/kernel/intel/edison-v4.4/tools/perf/bench/futex-requeue.c | 5,779 | utf_8 | 8e9955b2c18b6a3eeaea51700a16d245 | /*
*
* futex-requeue: Block a bunch of threads on futex1 and requeue them
* on futex2, N at a time.
*
* This program is particularly useful to measure the latency of nthread
* requeues without waking up any tasks -- thus mimicking a regular futex_wait.
*/
#include "../perf.h"
#include "../util/uti... |
google | android | futex-wake-parallel | .c | platform/hardware/bsp/kernel/intel/edison-v4.4/tools/perf/bench/futex-wake-parallel.c | 8,050 | utf_8 | ef06cc0f32fe2bd89ad0f1b4617eb64d | /*
*
* Block a bunch of threads and let parallel waker threads wakeup an
* equal amount of them. The program output reflects the avg latency
* for each individual thread to service its share of work. Ultimately
* it can be used to measure futex_wake() changes.
*/
#include "../perf.h"
#include "../util/util.h"
#in... |
google | android | numa | .c | platform/hardware/bsp/kernel/intel/edison-v4.4/tools/perf/bench/numa.c | 43,500 | utf_8 | b55ba97a35e809f364e8adc7b074791c | /*
* numa.c
*
* numa: Simulate NUMA-sensitive workload and measure their NUMA performance
*/
#include "../perf.h"
#include "../builtin.h"
#include "../util/util.h"
#include "../util/parse-options.h"
#include "../util/cloexec.h"
#include "bench.h"
#include <errno.h>
#include <sched.h>
#include <stdio.h>
#include ... |
google | android | futex-hash | .c | platform/hardware/bsp/kernel/intel/edison-v4.4/tools/perf/bench/futex-hash.c | 5,824 | utf_8 | 882da7dedded10a61f9a17628950c63e | /*
*
* futex-hash: Stress the hell out of the Linux kernel futex uaddr hashing.
*
* This program is particularly useful for measuring the kernel's futex hash
* table/function implementation. In order for it to make sense, use with as
* many threads and futexes as possible.
*/
#include "../perf.h"
#include "../ut... |
google | android | common | .c | platform/hardware/bsp/kernel/intel/edison-v4.4/tools/perf/arch/common.c | 4,585 | utf_8 | dd04a53e9047c3ba410511a9584eebcf | #include <stdio.h>
#include <sys/utsname.h>
#include "common.h"
#include "../util/debug.h"
const char *const arm_triplets[] = {
"arm-eabi-",
"arm-linux-androideabi-",
"arm-unknown-linux-",
"arm-unknown-linux-gnu-",
"arm-unknown-linux-gnueabi-",
NULL
};
const char *const arm64_triplets[] = {
"aarch64-linux-andr... |
google | android | unwind-libdw | .c | platform/hardware/bsp/kernel/intel/edison-v4.4/tools/perf/arch/arm/util/unwind-libdw.c | 950 | utf_8 | f63bf6aa46552bd11951920c2e0d01db | #include <elfutils/libdwfl.h>
#include "../../util/unwind-libdw.h"
#include "../../util/perf_regs.h"
bool libdw__arch_set_initial_registers(Dwfl_Thread *thread, void *arg)
{
struct unwind_info *ui = arg;
struct regs_dump *user_regs = &ui->sample->user_regs;
Dwarf_Word dwarf_regs[PERF_REG_ARM_MAX];
#define REG(r) (... |
google | android | unwind-libunwind | .c | platform/hardware/bsp/kernel/intel/edison-v4.4/tools/perf/arch/arm/util/unwind-libunwind.c | 999 | utf_8 | 39781894ffe5972ad648cb99c4b8fc52 |
#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_R1;
case UNW_ARM_R2:
return PERF_REG_ARM_R2;
... |
google | android | dwarf-regs | .c | platform/hardware/bsp/kernel/intel/edison-v4.4/tools/perf/arch/arm/util/dwarf-regs.c | 1,746 | utf_8 | 7ddd59b83b41b07d635ec49450f8ce31 | /*
* Mapping of DWARF debug register numbers into register names.
*
*/
#include <stddef.h>
#include <dwarf-regs.h>
struct pt_regs_dwarfnum {
const char *name;
unsigned int dwarfnum;
};
#define STR(s) #s
#define REG_DWARFNUM_NAME(r, num) {.name = r, .dwarfnum = num}
#define GPR_DWARFNUM_NAME(num) \
{.name = STR(%r... |
google | android | dwarf-unwind | .c | platform/hardware/bsp/kernel/intel/edison-v4.4/tools/perf/arch/arm/tests/dwarf-unwind.c | 1,312 | utf_8 | dc46f2d322f4dff18492de048519518f | #include <string.h>
#include "perf_regs.h"
#include "thread.h"
#include "map.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)
{
struct stack_dump *stack = &sample->user_stack;
struct m... |
google | android | unwind-libunwind | .c | platform/hardware/bsp/kernel/intel/edison-v4.4/tools/perf/arch/arm64/util/unwind-libunwind.c | 1,979 | utf_8 | d26bd87e9e1cefc6acc86b411b4d59ee |
#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_AARCH64_X0:
return PERF_REG_ARM64_X0;
case UNW_AARCH64_X1:
return PERF_REG_ARM64_X1;
case UNW_AARCH64_X2:
return P... |
google | android | dwarf-regs | .c | platform/hardware/bsp/kernel/intel/edison-v4.4/tools/perf/arch/arm64/util/dwarf-regs.c | 2,111 | utf_8 | b5c56f596c7539377fa8c55f25e9b3ed | /*
* Mapping of DWARF debug register numbers into register names.
*
*/
#include <stddef.h>
#include <dwarf-regs.h>
struct pt_regs_dwarfnum {
const char *name;
unsigned int dwarfnum;
};
#define STR(s) #s
#define REG_DWARFNUM_NAME(r, num) {.name = r, .dwarfnum = num}
#define GPR_DWARFNUM_NAME(num) \
{.name = STR(%x... |
google | android | dwarf-unwind | .c | platform/hardware/bsp/kernel/intel/edison-v4.4/tools/perf/arch/arm64/tests/dwarf-unwind.c | 1,306 | utf_8 | 5eef47824c559843c124acaa863f3c1e | #include <string.h>
#include "perf_regs.h"
#include "thread.h"
#include "map.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)
{
struct stack_dump *stack = &sample->user_stack;
struct map... |
google | android | header | .c | platform/hardware/bsp/kernel/intel/edison-v4.4/tools/perf/arch/powerpc/util/header.c | 802 | utf_8 | 9d0cb399545dd058706f4dfbee20043a | #include <sys/types.h>
#include <unistd.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "../../util/header.h"
#include "../../util/util.h"
#define mfspr(rn) ({unsigned long rval; \
asm volatile("mfspr %0," __stringify(rn) \
: "=r" (rval)); rval; })
#define SPRN_PVR 0... |
google | android | skip-callchain-idx | .c | platform/hardware/bsp/kernel/intel/edison-v4.4/tools/perf/arch/powerpc/util/skip-callchain-idx.c | 6,867 | utf_8 | 373c2f0d5aabd304972be073237d4f18 | /*
* Use DWARF Debug information to skip unnecessary callchain entries.
*
*/
#include <inttypes.h>
#include <dwarf.h>
#include <elfutils/libdwfl.h>
#include "util/thread.h"
#include "util/callchain.h"
#include "util/debug.h"
/*
* When saving the callchain on Power, the kernel conservatively saves
* excess entries ... |
google | android | dwarf-regs | .c | platform/hardware/bsp/kernel/intel/edison-v4.4/tools/perf/arch/powerpc/util/dwarf-regs.c | 2,368 | utf_8 | 8cf42f8c7f8f2ac182b3775ea92c5c31 | /*
* Mapping of DWARF debug register numbers into register names.
*
*/
#include <stddef.h>
#include <dwarf-regs.h>
struct pt_regs_dwarfnum {
const char *name;
unsigned int dwarfnum;
};
#define STR(s) #s
#define REG_DWARFNUM_NAME(r, num) {.name = r, .dwarfnum = num}
#define GPR_DWARFNUM_NAME(num) \
{.name = STR(%g... |
google | android | sym-handling | .c | platform/hardware/bsp/kernel/intel/edison-v4.4/tools/perf/arch/powerpc/util/sym-handling.c | 1,889 | utf_8 | 36ea3d3db7eabf84c8e90734763a3618 | /*
*/
#include "debug.h"
#include "symbol.h"
#include "map.h"
#include "probe-event.h"
#ifdef HAVE_LIBELF_SUPPORT
bool elf__needs_adjust_symbols(GElf_Ehdr ehdr)
{
return ehdr.e_type == ET_EXEC ||
ehdr.e_type == ET_REL ||
ehdr.e_type == ET_DYN;
}
#if defined(_CALL_ELF) && _CALL_ELF == 2
void arch__elf_... |
google | android | unwind-libdw | .c | platform/hardware/bsp/kernel/intel/edison-v4.4/tools/perf/arch/x86/util/unwind-libdw.c | 1,316 | utf_8 | 213c90ed021e75712eb9f677ae83324f | #include <elfutils/libdwfl.h>
#include "../../util/unwind-libdw.h"
#include "../../util/perf_regs.h"
bool libdw__arch_set_initial_registers(Dwfl_Thread *thread, void *arg)
{
struct unwind_info *ui = arg;
struct regs_dump *user_regs = &ui->sample->user_regs;
Dwarf_Word dwarf_regs[17];
unsigned nregs;
#define REG(r... |
google | android | header | .c | platform/hardware/bsp/kernel/intel/edison-v4.4/tools/perf/arch/x86/util/header.c | 1,260 | utf_8 | a63da76a9a229b9fcae6c1ba97f33b6a | #include <sys/types.h>
#include <unistd.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "../../util/header.h"
static inline void
cpuid(unsigned int op, unsigned int *a, unsigned int *b, unsigned int *c,
unsigned int *d)
{
__asm__ __volatile__ (".byte 0x53\n\tcpuid\n\t"
"movl %%e... |
google | android | auxtrace | .c | platform/hardware/bsp/kernel/intel/edison-v4.4/tools/perf/arch/x86/util/auxtrace.c | 1,988 | utf_8 | 3bd5cee32ff21a9cdd496f7b4b1147b6 | /*
* auxtrace.c: AUX area tracing support
* more details.
*
*/
#include <stdbool.h>
#include "../../util/header.h"
#include "../../util/debug.h"
#include "../../util/pmu.h"
#include "../../util/auxtrace.h"
#include "../../util/intel-pt.h"
#include "../../util/intel-bts.h"
#include "../../util/evlist.h"
static
struc... |
google | android | unwind-libunwind | .c | platform/hardware/bsp/kernel/intel/edison-v4.4/tools/perf/arch/x86/util/unwind-libunwind.c | 1,941 | utf_8 | a74196632c13d326e79922e00963101e |
#include <errno.h>
#include <libunwind.h>
#include "perf_regs.h"
#include "../../util/unwind.h"
#include "../../util/debug.h"
#ifdef HAVE_ARCH_X86_64_SUPPORT
int libunwind__arch_reg_id(int regnum)
{
int id;
switch (regnum) {
case UNW_X86_64_RAX:
id = PERF_REG_X86_AX;
break;
case UNW_X86_64_RDX:
id = PERF_R... |
google | android | intel-bts | .c | platform/hardware/bsp/kernel/intel/edison-v4.4/tools/perf/arch/x86/util/intel-bts.c | 12,303 | utf_8 | b130ada40f6e0f329bca21bbd631d3a7 | /*
* intel-bts.c: Intel Processor Trace support
* more details.
*
*/
#include <linux/kernel.h>
#include <linux/types.h>
#include <linux/bitops.h>
#include <linux/log2.h>
#include "../../util/cpumap.h"
#include "../../util/evsel.h"
#include "../../util/evlist.h"
#include "../../util/session.h"
#include "../../util/u... |
google | android | intel-pt | .c | platform/hardware/bsp/kernel/intel/edison-v4.4/tools/perf/arch/x86/util/intel-pt.c | 26,589 | utf_8 | d89e3d9090d62ada242ca5d48c2f1d5a | /*
* intel_pt.c: Intel Processor Trace support
* more details.
*
*/
#include <stdbool.h>
#include <linux/kernel.h>
#include <linux/types.h>
#include <linux/bitops.h>
#include <linux/log2.h>
#include <cpuid.h>
#include "../../perf.h"
#include "../../util/session.h"
#include "../../util/event.h"
#include "../../util/... |
google | android | tsc | .c | platform/hardware/bsp/kernel/intel/edison-v4.4/tools/perf/arch/x86/util/tsc.c | 899 | utf_8 | b3c42188952f6668ba88dd3d9c97490e | #include <stdbool.h>
#include <errno.h>
#include <linux/perf_event.h>
#include "../../perf.h"
#include <linux/types.h>
#include "../../util/debug.h"
#include "../../util/tsc.h"
#include "tsc.h"
int perf_read_tsc_conversion(const struct perf_event_mmap_page *pc,
struct perf_tsc_conversion *tc)
{
bool cap_use... |
google | android | perf_regs | .c | platform/hardware/bsp/kernel/intel/edison-v4.4/tools/perf/arch/x86/util/perf_regs.c | 820 | utf_8 | 84f52a854532826b77c6aec881d25241 | #include "../../perf.h"
#include "../../util/perf_regs.h"
const struct sample_reg sample_reg_masks[] = {
SMPL_REG(AX, PERF_REG_X86_AX),
SMPL_REG(BX, PERF_REG_X86_BX),
SMPL_REG(CX, PERF_REG_X86_CX),
SMPL_REG(DX, PERF_REG_X86_DX),
SMPL_REG(SI, PERF_REG_X86_SI),
SMPL_REG(DI, PERF_REG_X86_DI),
SMPL_REG(BP, PERF_REG... |
google | android | pmu | .c | platform/hardware/bsp/kernel/intel/edison-v4.4/tools/perf/arch/x86/util/pmu.c | 450 | utf_8 | 26fb9156895ffdf8ae0a60765427e28a | #include <string.h>
#include <linux/perf_event.h>
#include "../../util/intel-pt.h"
#include "../../util/intel-bts.h"
#include "../../util/pmu.h"
struct perf_event_attr *perf_pmu__get_default_config(struct perf_pmu *pmu __maybe_unused)
{
#ifdef HAVE_AUXTRACE_SUPPORT
if (!strcmp(pmu->name, INTEL_PT_PMU_NAME))
retur... |
google | android | kvm-stat | .c | platform/hardware/bsp/kernel/intel/edison-v4.4/tools/perf/arch/x86/util/kvm-stat.c | 4,085 | utf_8 | a7d950b8d07a5cfd2dbb23161c7b571b | #include "../../util/kvm-stat.h"
#include <asm/kvm_perf.h>
define_exit_reasons_table(vmx_exit_reasons, VMX_EXIT_REASONS);
define_exit_reasons_table(svm_exit_reasons, SVM_EXIT_REASONS);
static struct kvm_events_ops exit_events = {
.is_begin_event = exit_event_begin,
.is_end_event = exit_event_end,
.decode_key = exi... |
google | android | dwarf-regs | .c | platform/hardware/bsp/kernel/intel/edison-v4.4/tools/perf/arch/x86/util/dwarf-regs.c | 4,406 | utf_8 | c10f90e083ba16717c69c7cf5bb83457 | /*
* dwarf-regs.c : Mapping of DWARF debug register numbers into register names.
* Extracted from probe-finder.c
*
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*
*/
#include <stddef.h>
#include <errno.h> /* for EINVAL */
#include <string.h> /* for strcmp */
#include <linux/ptrace.h... |
google | android | arch-tests | .c | platform/hardware/bsp/kernel/intel/edison-v4.4/tools/perf/arch/x86/tests/arch-tests.c | 606 | utf_8 | a40258b7c25fe38433438c82f390fe3c | #include <string.h>
#include "tests/tests.h"
#include "arch-tests.h"
struct test arch_tests[] = {
{
.desc = "x86 rdpmc test",
.func = test__rdpmc,
},
{
.desc = "Test converting perf time to TSC",
.func = test__perf_time_to_tsc,
},
#ifdef HAVE_DWARF_UNWIND_SUPPORT
{
.desc = "Test dwarf unwind",
.func =... |
google | android | dwarf-unwind | .c | platform/hardware/bsp/kernel/intel/edison-v4.4/tools/perf/arch/x86/tests/dwarf-unwind.c | 1,333 | utf_8 | d0fad44bfde5f550eb2650d75b2de67b | #include <string.h>
#include "perf_regs.h"
#include "thread.h"
#include "map.h"
#include "event.h"
#include "debug.h"
#include "tests/tests.h"
#include "arch-tests.h"
#define STACK_SIZE 8192
static int sample_ustack(struct perf_sample *sample,
struct thread *thread, u64 *regs)
{
struct stack_dump *stack = &sampl... |
google | android | insn-x86 | .c | platform/hardware/bsp/kernel/intel/edison-v4.4/tools/perf/arch/x86/tests/insn-x86.c | 4,622 | utf_8 | b7ea635b49103e192f2074b96e5c30eb | #include <linux/types.h>
#include "debug.h"
#include "tests/tests.h"
#include "arch-tests.h"
#include "intel-pt-decoder/insn.h"
#include "intel-pt-decoder/intel-pt-insn-decoder.h"
struct test_data {
u8 data[MAX_INSN_SIZE];
int expected_length;
int expected_rel;
const char *expected_op_str;
const char *expected_... |
google | android | intel-cqm | .c | platform/hardware/bsp/kernel/intel/edison-v4.4/tools/perf/arch/x86/tests/intel-cqm.c | 2,649 | utf_8 | 8f74546d0267e1afcd3e88c0edeb02f1 | #include "tests/tests.h"
#include "perf.h"
#include "cloexec.h"
#include "debug.h"
#include "evlist.h"
#include "evsel.h"
#include "arch-tests.h"
#include <sys/mman.h>
#include <string.h>
static pid_t spawn(void)
{
pid_t pid;
pid = fork();
if (pid)
return pid;
while(1);
sleep(5);
return 0;
}
/*
* Create an ev... |
google | android | perf-time-to-tsc | .c | platform/hardware/bsp/kernel/intel/edison-v4.4/tools/perf/arch/x86/tests/perf-time-to-tsc.c | 3,881 | utf_8 | 093542bc9075b4491dbb43a08ec2f209 | #include <stdio.h>
#include <unistd.h>
#include <linux/types.h>
#include <sys/prctl.h>
#include "parse-events.h"
#include "evlist.h"
#include "evsel.h"
#include "thread_map.h"
#include "cpumap.h"
#include "tsc.h"
#include "tests/tests.h"
#include "arch-tests.h"
#define CHECK__(x) { \
while ((x) < 0) { \
pr_d... |
google | android | insn-x86-dat-32 | .c | platform/hardware/bsp/kernel/intel/edison-v4.4/tools/perf/arch/x86/tests/insn-x86-dat-32.c | 38,374 | utf_8 | 5e88f0494157082e0da2073bfc376a85 | /*
* Generated by gen-insn-x86-dat.sh and gen-insn-x86-dat.awk
* from insn-x86-dat-src.c for inclusion by insn-x86.c
* Do not change this code.
*/
{{0x0f, 0x31, }, 2, 0, "", "",
"0f 31 \trdtsc ",},
{{0xf3, 0x0f, 0x1b, 0x00, }, 4, 0, "", "",
"f3 0f 1b 00 \tbndmk (%eax),%bnd0",},
{{0xf3, 0x0... |
google | android | rdpmc | .c | platform/hardware/bsp/kernel/intel/edison-v4.4/tools/perf/arch/x86/tests/rdpmc.c | 3,218 | utf_8 | 7721f4a6efc0acff4b7fe1f32df365db | #include <unistd.h>
#include <stdlib.h>
#include <signal.h>
#include <sys/mman.h>
#include <linux/types.h>
#include "perf.h"
#include "debug.h"
#include "tests/tests.h"
#include "cloexec.h"
#include "arch-tests.h"
static u64 rdpmc(unsigned int counter)
{
unsigned int low, high;
asm volatile("rdpmc" : "=a" (low), "=... |
google | android | insn-x86-dat-64 | .c | platform/hardware/bsp/kernel/intel/edison-v4.4/tools/perf/arch/x86/tests/insn-x86-dat-64.c | 44,599 | utf_8 | b128ed713e50aa1c4929c4160bc28ade | /*
* Generated by gen-insn-x86-dat.sh and gen-insn-x86-dat.awk
* from insn-x86-dat-src.c for inclusion by insn-x86.c
* Do not change this code.
*/
{{0x0f, 0x31, }, 2, 0, "", "",
"0f 31 \trdtsc ",},
{{0xf3, 0x0f, 0x1b, 0x00, }, 4, 0, "", "",
"f3 0f 1b 00 \tbndmk (%rax),%bnd0",},
{{0xf3, 0x4... |
google | android | insn-x86-dat-src | .c | platform/hardware/bsp/kernel/intel/edison-v4.4/tools/perf/arch/x86/tests/insn-x86-dat-src.c | 36,944 | utf_8 | 87154d49a8dd01aefd22447f81faafeb | /*
* This file contains instructions for testing by the test titled:
*
* "Test x86 instruction decoder - new instructions"
*
* Note that the 'Expecting' comment lines are consumed by the
* gen-insn-x86-dat.awk script and have the format:
*
* Expecting: <op> <branch> <rel>
*
* If this file is c... |
google | android | dwarf-regs | .c | platform/hardware/bsp/kernel/intel/edison-v4.4/tools/perf/arch/xtensa/util/dwarf-regs.c | 719 | utf_8 | fa8d541c432c590f4c0daf82ffb9de2a | /*
* Mapping of DWARF debug register numbers into register names.
*
*/
#include <stddef.h>
#include <dwarf-regs.h>
#define XTENSA_MAX_REGS 16
const char *xtensa_regs_table[XTENSA_MAX_REGS] = {
"a0", "a1", "a2", "a3", "a4", "a5", "a6", "a7",
"a8", "a9", "a10", "a11", "a12", "a13", "a14", "a15",
};
const char *get_a... |
google | android | dwarf-regs | .c | platform/hardware/bsp/kernel/intel/edison-v4.4/tools/perf/arch/sh/util/dwarf-regs.c | 1,317 | utf_8 | 27932180137aceef2db21d7c5c6cb0e2 | /*
* Mapping of DWARF debug register numbers into register names.
*
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*
*/
#include <stddef.h>
#include <dwarf-regs.h>
/*
* Generic dwarf analysis helpers
*/
#define SH_MAX_REGS 18
const char *sh_regs_table[SH_MAX_REGS] = {
"r0",
"r1",
... |
google | android | dwarf-regs | .c | platform/hardware/bsp/kernel/intel/edison-v4.4/tools/perf/arch/sparc/util/dwarf-regs.c | 1,663 | utf_8 | af2e91dc3ca9a3c36f49c395ddbc4b22 | /*
* Mapping of DWARF debug register numbers into register names.
*
*/
#include <stddef.h>
#include <dwarf-regs.h>
#define SPARC_MAX_REGS 96
const char *sparc_regs_table[SPARC_MAX_REGS] = {
"%g0", "%g1", "%g2", "%g3", "%g4", "%g5", "%g6", "%g7",
"%o0", "%o1", "%o2", "%o3", "%o4", "%o5", "%sp", "%o7",
"%l0", "%l1"... |
google | android | header | .c | platform/hardware/bsp/kernel/intel/edison-v4.4/tools/perf/arch/s390/util/header.c | 601 | utf_8 | 964ce4bd49ab4e1ab92c3c2edc44f883 | /*
* Implementation of get_cpuid().
*
*/
#include <sys/types.h>
#include <unistd.h>
#include <stdio.h>
#include <string.h>
#include "../../util/header.h"
int get_cpuid(char *buffer, size_t sz)
{
const char *cpuid = "IBM/S390";
if (strlen(cpuid) + 1 > sz)
return -1;
strcpy(buffer, cpuid);
return 0;
} |
google | android | kvm-stat | .c | platform/hardware/bsp/kernel/intel/edison-v4.4/tools/perf/arch/s390/util/kvm-stat.c | 2,944 | utf_8 | 193c8d7db23a2f84ac870b36aad6bc1b | /*
* Arch specific functions for perf kvm stat.
*
*/
#include "../../util/kvm-stat.h"
#include <asm/kvm_perf.h>
define_exit_reasons_table(sie_exit_reasons, sie_intercept_code);
define_exit_reasons_table(sie_icpt_insn_codes, icpt_insn_codes);
define_exit_reasons_table(sie_sigp_order_codes, sigp_order_codes);
define_e... |
google | android | dwarf-regs | .c | platform/hardware/bsp/kernel/intel/edison-v4.4/tools/perf/arch/s390/util/dwarf-regs.c | 504 | utf_8 | 3b466b41aadb9195e5072ef0c7c2158e | /*
* Mapping of DWARF debug register numbers into register names.
*
*
*/
#include <stddef.h>
#include <dwarf-regs.h>
#define NUM_GPRS 16
static const char *gpr_names[NUM_GPRS] = {
"%r0", "%r1", "%r2", "%r3", "%r4", "%r5", "%r6", "%r7",
"%r8", "%r9", "%r10", "%r11", "%r12", "%r13", "%r14", "%r15",
};
const c... |
google | android | freefall | .c | platform/hardware/bsp/kernel/intel/edison-v4.4/tools/laptop/freefall/freefall.c | 3,153 | ibm852 | 1bac292de8421698cb59bbdfe8fceb98 | /* Disk protection for HP/DELL machines.
*
*/
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <fcntl.h>
#include <sys/stat.h>
#include <sys/types.h>
#include <string.h>
#include <stdint.h>
#include <errno.h>
#include <signal.h>
#include <sys/mman.h>
#include <sched.h>
#include <syslog.h>
static in... |
google | android | apmain | .c | platform/hardware/bsp/kernel/intel/edison-v4.4/tools/power/acpi/tools/acpidump/apmain.c | 10,177 | utf_8 | 7230823590435d2e1cd7467fc6608be9 | /******************************************************************************
*
* Module Name: apmain - Main module for the acpidump utility
*
*****************************************************************************/
/*
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* POSSIBILITY OF SU... |
google | android | apfiles | .c | platform/hardware/bsp/kernel/intel/edison-v4.4/tools/power/acpi/tools/acpidump/apfiles.c | 7,120 | utf_8 | f35f01f91a2dfb1f9156e0499e896f83 | /******************************************************************************
*
* Module Name: apfiles - File-related functions for acpidump utility
*
*****************************************************************************/
/*
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* POSSIBILI... |
google | android | apdump | .c | platform/hardware/bsp/kernel/intel/edison-v4.4/tools/power/acpi/tools/acpidump/apdump.c | 12,175 | utf_8 | f7b8cac891d8576146f5a67ee55483be | /******************************************************************************
*
* Module Name: apdump - Dump routines for ACPI tables (acpidump)
*
*****************************************************************************/
/*
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* POSSIBILITY O... |
google | android | ec_access | .c | platform/hardware/bsp/kernel/intel/edison-v4.4/tools/power/acpi/tools/ec/ec_access.c | 5,862 | utf_8 | b93f6bec60d4a8b7273eee7c73762455 | /*
* ec_access.c
*
*/
#include <fcntl.h>
#include <err.h>
#include <stdio.h>
#include <stdlib.h>
#include <libgen.h>
#include <unistd.h>
#include <getopt.h>
#include <stdint.h>
#include <sys/types.h>
#include <sys/stat.h>
#define EC_SPACE_SIZE 256
#define SYSFS_PATH "/sys/kernel/debug/ec/ec0/io"
/* TBD/Enhancements:... |
google | android | cmfsize | .c | platform/hardware/bsp/kernel/intel/edison-v4.4/tools/power/acpi/common/cmfsize.c | 3,562 | utf_8 | 9787e92de5655c7b2d59e6531c7a1035 | /******************************************************************************
*
* Module Name: cfsize - Common get file size function
*
*****************************************************************************/
/*
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* POSSIBILITY OF SUCH DAMA... |
google | android | getopt | .c | platform/hardware/bsp/kernel/intel/edison-v4.4/tools/power/acpi/common/getopt.c | 7,034 | utf_8 | 90b4104e35af0d7fce2b03c64af00fe0 | /******************************************************************************
*
* Module Name: getopt
*
*****************************************************************************/
/*
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* POSSIBILITY OF SUCH DAMAGES.
*/
/*
* ACPICA getopt() i... |
google | android | oslibcfs | .c | platform/hardware/bsp/kernel/intel/edison-v4.4/tools/power/acpi/os_specific/service_layers/oslibcfs.c | 6,266 | utf_8 | 8093341f383dad63f6962a3d769d4321 | /******************************************************************************
*
* Module Name: oslibcfs - C library OSL for file I/O
*
*****************************************************************************/
/*
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* POSSIBILITY OF SUCH DAMAG... |
google | android | osunixxf | .c | platform/hardware/bsp/kernel/intel/edison-v4.4/tools/power/acpi/os_specific/service_layers/osunixxf.c | 33,854 | utf_8 | 82db9a41cd7c37dda05c4e5cc4a0c20c | /******************************************************************************
*
* Module Name: osunixxf - UNIX OSL interfaces
*
*****************************************************************************/
/*
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* POSSIBILITY OF SUCH DAMAGES.
*/... |
google | android | oslinuxtbl | .c | platform/hardware/bsp/kernel/intel/edison-v4.4/tools/power/acpi/os_specific/service_layers/oslinuxtbl.c | 36,495 | utf_8 | 0d40e7f4462fa6bccc2f6b311e1d4df4 | /******************************************************************************
*
* Module Name: oslinuxtbl - Linux OSL for obtaining ACPI tables
*
*****************************************************************************/
/*
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* POSSIBILITY OF... |
google | android | osunixdir | .c | platform/hardware/bsp/kernel/intel/edison-v4.4/tools/power/acpi/os_specific/service_layers/osunixdir.c | 6,282 | utf_8 | e4c59d06327d1137f4e67ada0c98d1a0 | /******************************************************************************
*
* Module Name: osunixdir - Unix directory access interfaces
*
*****************************************************************************/
/*
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* POSSIBILITY OF SUC... |
google | android | osunixmap | .c | platform/hardware/bsp/kernel/intel/edison-v4.4/tools/power/acpi/os_specific/service_layers/osunixmap.c | 4,949 | utf_8 | f06e79354b9a9e95614b620256a08ac3 | /******************************************************************************
*
* Module Name: osunixmap - Unix OSL for file mappings
*
*****************************************************************************/
/*
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
#include <sys/param.h>
#end... |
google | android | turbostat | .c | platform/hardware/bsp/kernel/intel/edison-v4.4/tools/power/x86/turbostat/turbostat.c | 84,206 | utf_8 | 86e25a4cad856e748332551f9633c6e4 | /*
* turbostat -- show CPU frequency and C-state residency
* on modern Intel turbo-capable processors.
*
* 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA.
*/
#define _GNU_SOURCE
#include MSRHEADER
#include <stdarg.h>
#include <stdio.h>
#include <err.h>
#include <unistd.h>
#include <sys/types.h>
#include <... |
google | android | x86_energy_perf_policy | .c | platform/hardware/bsp/kernel/intel/edison-v4.4/tools/power/x86/x86_energy_perf_policy/x86_energy_perf_policy.c | 6,991 | utf_8 | 70416b7d050ed030cc1cebc01f201043 | /*
* x86_energy_perf_policy -- set the energy versus performance
* policy preference bias on recent X86 processors.
*/
/*
* 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA.
*/
#include <stdio.h>
#include <unistd.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <sys/resource.h>
#include <fcntl.h>
#i... |
google | android | cpupower-set | .c | platform/hardware/bsp/kernel/intel/edison-v4.4/tools/power/cpupower/utils/cpupower-set.c | 1,855 | utf_8 | fb1dbc979bb2f4c7de289f31ce3dacba | /*
*/
#include <unistd.h>
#include <stdio.h>
#include <stdlib.h>
#include <errno.h>
#include <string.h>
#include <getopt.h>
#include <cpufreq.h>
#include "helpers/helpers.h"
#include "helpers/sysfs.h"
#include "helpers/bitmask.h"
static struct option set_opts[] = {
{"perf-bias", required_argument, NULL, 'b'},
{ },
}... |
google | android | cpuidle-set | .c | platform/hardware/bsp/kernel/intel/edison-v4.4/tools/power/cpupower/utils/cpuidle-set.c | 4,220 | utf_8 | 45f39936cd790b00526daf6a9a791001 | #include <unistd.h>
#include <stdio.h>
#include <errno.h>
#include <stdlib.h>
#include <limits.h>
#include <string.h>
#include <ctype.h>
#include <getopt.h>
#include "cpufreq.h"
#include "helpers/helpers.h"
#include "helpers/sysfs.h"
static struct option info_opts[] = {
{"disable", required_argument, NULL, 'd'... |
google | android | cpuidle-info | .c | platform/hardware/bsp/kernel/intel/edison-v4.4/tools/power/cpupower/utils/cpuidle-info.c | 4,601 | utf_8 | 6c31e4e8604b0ac012efd81a205cdaf5 | /*
*/
#include <unistd.h>
#include <stdio.h>
#include <errno.h>
#include <stdlib.h>
#include <string.h>
#include <getopt.h>
#include <cpufreq.h>
#include "helpers/helpers.h"
#include "helpers/sysfs.h"
#include "helpers/bitmask.h"
#define LINE_LEN 10
static void cpuidle_cpu_output(unsigned int cpu, int verbose)
{
unsi... |
google | android | cpupower-info | .c | platform/hardware/bsp/kernel/intel/edison-v4.4/tools/power/cpupower/utils/cpupower-info.c | 2,114 | utf_8 | ec4f6a6e26a7c7ed0af203ffb0b832a0 | /*
*/
#include <unistd.h>
#include <stdio.h>
#include <stdlib.h>
#include <errno.h>
#include <string.h>
#include <getopt.h>
#include <cpufreq.h>
#include "helpers/helpers.h"
#include "helpers/sysfs.h"
static struct option set_opts[] = {
{"perf-bias", optional_argument, NULL, 'b'},
{ },
};
static void print_w... |
google | android | cpufreq-info | .c | platform/hardware/bsp/kernel/intel/edison-v4.4/tools/power/cpupower/utils/cpufreq-info.c | 16,105 | utf_8 | c1a94289f2f26bb20593979a6739399b | /*
*/
#include <unistd.h>
#include <stdio.h>
#include <errno.h>
#include <stdlib.h>
#include <string.h>
#include <getopt.h>
#include "cpufreq.h"
#include "helpers/helpers.h"
#include "helpers/bitmask.h"
#define LINE_LEN 10
static unsigned int count_cpus(void)
{
FILE *fp;
char value[LINE_LEN];
unsigned int ret = 0;
... |
google | android | cpufreq-set | .c | platform/hardware/bsp/kernel/intel/edison-v4.4/tools/power/cpupower/utils/cpufreq-set.c | 7,205 | utf_8 | 985cc9d49cb89d34caeaff07ad4978cf | /*
*/
#include <unistd.h>
#include <stdio.h>
#include <errno.h>
#include <stdlib.h>
#include <limits.h>
#include <string.h>
#include <ctype.h>
#include <getopt.h>
#include "cpufreq.h"
#include "helpers/helpers.h"
#include "helpers/sysfs.h"
#define NORM_FREQ_LEN 32
static struct option set_opts[] = {
{"min", required... |
google | android | cpupower | .c | platform/hardware/bsp/kernel/intel/edison-v4.4/tools/power/cpupower/utils/cpupower.c | 5,116 | utf_8 | f60fe172c39a8aaf870f5b8ab608e47e | /*
*
* Ideas taken over from the perf userspace tool (included in the Linus
* kernel git repo): subcommand builtins and param parsing.
*/
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include <errno.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <sys/utsname.h>
#include... |
google | android | misc | .c | platform/hardware/bsp/kernel/intel/edison-v4.4/tools/power/cpupower/utils/helpers/misc.c | 635 | utf_8 | 8f381deef00dad772fe388a514834af2 | #if defined(__i386__) || defined(__x86_64__)
#include "helpers/helpers.h"
int cpufreq_has_boost_support(unsigned int cpu, int *support, int *active,
int *states)
{
struct cpupower_cpu_info cpu_info;
int ret;
*support = *active = *states = 0;
ret = get_cpu_info(0, &cpu_info);
if (ret)
return ret;
if (cpu... |
google | android | sysfs | .c | platform/hardware/bsp/kernel/intel/edison-v4.4/tools/power/cpupower/utils/helpers/sysfs.c | 10,616 | utf_8 | 7f7273544ab3f0fec73fd476e4363a71 | /*
*/
#include <stdio.h>
#include <errno.h>
#include <stdlib.h>
#include <string.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <unistd.h>
#include "helpers/sysfs.h"
unsigned int sysfs_read_file(const char *path, char *buf, size_t buflen)
{
int fd;
ssize_t numread;
fd = open(path, O_RDO... |
google | android | msr | .c | platform/hardware/bsp/kernel/intel/edison-v4.4/tools/power/cpupower/utils/helpers/msr.c | 2,347 | utf_8 | c9cb4a1bc244529bcdab1854458f0e4a | #if defined(__i386__) || defined(__x86_64__)
#include <fcntl.h>
#include <stdio.h>
#include <unistd.h>
#include <stdint.h>
#include "helpers/helpers.h"
/* Intel specific MSRs */
#define MSR_IA32_PERF_STATUS 0x198
#define MSR_IA32_MISC_ENABLES 0x1a0
#define MSR_IA32_ENERGY_PERF_BIAS 0x1b0
/*
* read_msr
*
* Will ret... |
google | android | pci | .c | platform/hardware/bsp/kernel/intel/edison-v4.4/tools/power/cpupower/utils/helpers/pci.c | 1,554 | utf_8 | 97724e3fbaae74118d22108a12af9b55 | #if defined(__i386__) || defined(__x86_64__)
#include <helpers/helpers.h>
/*
* pci_acc_init
*
* PCI access helper function depending on libpci
*
* **pacc : if a valid pci_dev is returned
* *pacc must be passed to pci_acc_cleanup to free it
*
* domain: domain
* bus: bus
* slot: slot
* func: f... |
google | android | amd | .c | platform/hardware/bsp/kernel/intel/edison-v4.4/tools/power/cpupower/utils/helpers/amd.c | 2,831 | utf_8 | 68df9fca465848edd185bc24e7c4637d | #if defined(__i386__) || defined(__x86_64__)
#include <unistd.h>
#include <errno.h>
#include <stdio.h>
#include <stdint.h>
#include <pci/pci.h>
#include "helpers/helpers.h"
#define MSR_AMD_PSTATE_STATUS 0xc0010063
#define MSR_AMD_PSTATE 0xc0010064
union msr_pstate {
struct {
unsigned fid:6;
unsigned did:3;
unsi... |
google | android | topology | .c | platform/hardware/bsp/kernel/intel/edison-v4.4/tools/power/cpupower/utils/helpers/topology.c | 3,458 | utf_8 | 72557aaafb1cda7108b405085af8471d | /*
*
* ToDo: Needs to be done more properly for AMD/Intel specifics
*/
/* Helper struct for qsort, must be in sync with cpupower_topology.cpu_info */
/* Be careful: Need to pass unsigned to the sort, so that offlined cores are
in the end, but double check for -1 for offlined cpus at other places */
#include <stdl... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.