Linux Kernel
3.7.1
|
#include <stdio.h>
#include <unistd.h>
#include <sys/types.h>
#include <sys/wait.h>
#include <sys/stat.h>
#include <sys/resource.h>
#include <fcntl.h>
#include <signal.h>
#include <sys/time.h>
#include <stdlib.h>
#include <dirent.h>
#include <string.h>
#include <ctype.h>
#include <sched.h>
Go to the source code of this file.
Data Structures | |
struct | thread_data |
struct | core_data |
struct | pkg_data |
struct | system_summary |
struct | topo_params |
Macros | |
#define | _GNU_SOURCE |
#define | MSR_NEHALEM_PLATFORM_INFO 0xCE |
#define | MSR_NEHALEM_TURBO_RATIO_LIMIT 0x1AD |
#define | MSR_IVT_TURBO_RATIO_LIMIT 0x1AE |
#define | MSR_APERF 0xE8 |
#define | MSR_MPERF 0xE7 |
#define | MSR_PKG_C2_RESIDENCY 0x60D /* SNB only */ |
#define | MSR_PKG_C3_RESIDENCY 0x3F8 |
#define | MSR_PKG_C6_RESIDENCY 0x3F9 |
#define | MSR_PKG_C7_RESIDENCY 0x3FA /* SNB only */ |
#define | MSR_CORE_C3_RESIDENCY 0x3FC |
#define | MSR_CORE_C6_RESIDENCY 0x3FD |
#define | MSR_CORE_C7_RESIDENCY 0x3FE /* SNB only */ |
#define | CPU_IS_FIRST_THREAD_IN_CORE 0x2 |
#define | CPU_IS_FIRST_CORE_IN_PACKAGE 0x4 |
#define | ODD_COUNTERS thread_odd, core_odd, package_odd |
#define | EVEN_COUNTERS thread_even, core_even, package_even |
#define | GET_THREAD(thread_base, thread_no, core_no, pkg_no) |
#define | GET_CORE(core_base, core_no, pkg_no) (core_base + (pkg_no) * topo.num_cores_per_pkg + (core_no)) |
#define | GET_PKG(pkg_base, pkg_no) (pkg_base + pkg_no) |
#define _GNU_SOURCE |
Definition at line 22 of file turbostat.c.
#define CPU_IS_FIRST_CORE_IN_PACKAGE 0x4 |
Definition at line 97 of file turbostat.c.
#define CPU_IS_FIRST_THREAD_IN_CORE 0x2 |
Definition at line 96 of file turbostat.c.
#define EVEN_COUNTERS thread_even, core_even, package_even |
Definition at line 116 of file turbostat.c.
#define GET_CORE | ( | core_base, | |
core_no, | |||
pkg_no | |||
) | (core_base + (pkg_no) * topo.num_cores_per_pkg + (core_no)) |
Definition at line 122 of file turbostat.c.
#define GET_PKG | ( | pkg_base, | |
pkg_no | |||
) | (pkg_base + pkg_no) |
Definition at line 124 of file turbostat.c.
#define GET_THREAD | ( | thread_base, | |
thread_no, | |||
core_no, | |||
pkg_no | |||
) |
Definition at line 118 of file turbostat.c.
#define MSR_APERF 0xE8 |
Definition at line 41 of file turbostat.c.
#define MSR_CORE_C3_RESIDENCY 0x3FC |
Definition at line 47 of file turbostat.c.
#define MSR_CORE_C6_RESIDENCY 0x3FD |
Definition at line 48 of file turbostat.c.
#define MSR_CORE_C7_RESIDENCY 0x3FE /* SNB only */ |
Definition at line 49 of file turbostat.c.
#define MSR_IVT_TURBO_RATIO_LIMIT 0x1AE |
Definition at line 40 of file turbostat.c.
#define MSR_MPERF 0xE7 |
Definition at line 42 of file turbostat.c.
#define MSR_NEHALEM_PLATFORM_INFO 0xCE |
Definition at line 38 of file turbostat.c.
#define MSR_NEHALEM_TURBO_RATIO_LIMIT 0x1AD |
Definition at line 39 of file turbostat.c.
#define MSR_PKG_C2_RESIDENCY 0x60D /* SNB only */ |
Definition at line 43 of file turbostat.c.
#define MSR_PKG_C3_RESIDENCY 0x3F8 |
Definition at line 44 of file turbostat.c.
#define MSR_PKG_C6_RESIDENCY 0x3F9 |
Definition at line 45 of file turbostat.c.
#define MSR_PKG_C7_RESIDENCY 0x3FA /* SNB only */ |
Definition at line 46 of file turbostat.c.
#define ODD_COUNTERS thread_odd, core_odd, package_odd |
Definition at line 115 of file turbostat.c.
Definition at line 1438 of file turbostat.c.
void allocate_output_buffer | ( | ) |
Definition at line 1522 of file turbostat.c.
void check_cpuid | ( | ) |
Definition at line 1234 of file turbostat.c.
void check_dev_msr | ( | ) |
Definition at line 1150 of file turbostat.c.
void check_super_user | ( | ) |
Definition at line 1161 of file turbostat.c.
Definition at line 569 of file turbostat.c.
Definition at line 625 of file turbostat.c.
Definition at line 1086 of file turbostat.c.
Definition at line 913 of file turbostat.c.
Definition at line 892 of file turbostat.c.
Definition at line 146 of file turbostat.c.
Definition at line 185 of file turbostat.c.
Definition at line 474 of file turbostat.c.
int delta_cpu | ( | struct thread_data * | t, |
struct core_data * | c, | ||
struct pkg_data * | p, | ||
struct thread_data * | t2, | ||
struct core_data * | c2, | ||
struct pkg_data * | p2 | ||
) |
Definition at line 551 of file turbostat.c.
Definition at line 465 of file turbostat.c.
void delta_thread | ( | struct thread_data * | new, |
struct thread_data * | old, | ||
struct core_data * | core_delta | ||
) |
Definition at line 485 of file turbostat.c.
Definition at line 1226 of file turbostat.c.
Definition at line 262 of file turbostat.c.
void flush_stderr | ( | ) |
Definition at line 440 of file turbostat.c.
void flush_stdout | ( | ) |
Definition at line 435 of file turbostat.c.
int for_all_cpus | ( | int(func)(struct thread_data *, struct core_data *, struct pkg_data *) | , |
struct thread_data * | thread_base, | ||
struct core_data * | core_base, | ||
struct pkg_data * | pkg_base | ||
) |
Definition at line 155 of file turbostat.c.
int for_all_cpus_2 | ( | int(func)(struct thread_data *, struct core_data *, struct pkg_data *, struct thread_data *, struct core_data *, struct pkg_data *) | , |
struct thread_data * | thread_base, | ||
struct core_data * | core_base, | ||
struct pkg_data * | pkg_base, | ||
struct thread_data * | thread_base2, | ||
struct core_data * | core_base2, | ||
struct pkg_data * | pkg_base2 | ||
) |
Definition at line 998 of file turbostat.c.
Definition at line 1553 of file turbostat.c.
Definition at line 445 of file turbostat.c.
Definition at line 309 of file turbostat.c.
Definition at line 857 of file turbostat.c.
Definition at line 947 of file turbostat.c.
Definition at line 667 of file turbostat.c.
Definition at line 195 of file turbostat.c.
Definition at line 964 of file turbostat.c.
Definition at line 930 of file turbostat.c.
Definition at line 1194 of file turbostat.c.
Definition at line 1169 of file turbostat.c.
void init_counter | ( | struct thread_data * | thread_base, |
struct core_data * | core_base, | ||
struct pkg_data * | pkg_base, | ||
int | thread_num, | ||
int | core_num, | ||
int | pkg_num, | ||
int | cpu_id | ||
) |
Definition at line 1479 of file turbostat.c.
Definition at line 1503 of file turbostat.c.
Definition at line 1211 of file turbostat.c.
Definition at line 1645 of file turbostat.c.
Definition at line 1094 of file turbostat.c.
Definition at line 1333 of file turbostat.c.
Definition at line 217 of file turbostat.c.
Definition at line 737 of file turbostat.c.
Definition at line 1074 of file turbostat.c.
Definition at line 1532 of file turbostat.c.
Definition at line 591 of file turbostat.c.
void topology_probe | ( | ) |
Definition at line 1338 of file turbostat.c.
void turbostat_init | ( | ) |
Definition at line 1540 of file turbostat.c.
void turbostat_loop | ( | ) |
Definition at line 1100 of file turbostat.c.
Definition at line 1313 of file turbostat.c.
int aperf_mperf_unstable |
Definition at line 78 of file turbostat.c.
int backwards_count |
Definition at line 79 of file turbostat.c.
double bclk |
Definition at line 70 of file turbostat.c.
cpu_set_t * cpu_affinity_set |
Definition at line 82 of file turbostat.c.
size_t cpu_affinity_setsize |
Definition at line 83 of file turbostat.c.
cpu_set_t* cpu_present_set |
Definition at line 82 of file turbostat.c.
size_t cpu_present_setsize |
Definition at line 83 of file turbostat.c.
unsigned int do_ivt_turbo_ratio_limit |
Definition at line 65 of file turbostat.c.
unsigned int do_nehalem_platform_info |
Definition at line 63 of file turbostat.c.
unsigned int do_nehalem_turbo_ratio_limit |
Definition at line 64 of file turbostat.c.
unsigned int do_nhm_cstates |
Definition at line 57 of file turbostat.c.
unsigned int do_snb_cstates |
Definition at line 58 of file turbostat.c.
unsigned int extra_delta_offset32 |
Definition at line 68 of file turbostat.c.
unsigned int extra_delta_offset64 |
Definition at line 69 of file turbostat.c.
unsigned int extra_msr_offset32 |
Definition at line 66 of file turbostat.c.
unsigned int extra_msr_offset64 |
Definition at line 67 of file turbostat.c.
unsigned int genuine_intel |
Definition at line 61 of file turbostat.c.
unsigned int has_aperf |
Definition at line 59 of file turbostat.c.
unsigned int has_invariant_tsc |
Definition at line 62 of file turbostat.c.
unsigned int interval_sec = 5 |
Definition at line 52 of file turbostat.c.
char * outp |
Definition at line 76 of file turbostat.c.
char* output_buffer |
Definition at line 76 of file turbostat.c.
Definition at line 51 of file turbostat.c.
char* progname |
Definition at line 80 of file turbostat.c.
unsigned int show_core |
Definition at line 72 of file turbostat.c.
unsigned int show_core_only |
Definition at line 75 of file turbostat.c.
unsigned int show_cpu |
Definition at line 73 of file turbostat.c.
unsigned int show_pkg |
Definition at line 71 of file turbostat.c.
unsigned int show_pkg_only |
Definition at line 74 of file turbostat.c.
unsigned int skip_c0 |
Definition at line 55 of file turbostat.c.
unsigned int skip_c1 |
Definition at line 56 of file turbostat.c.
unsigned int summary_only |
Definition at line 54 of file turbostat.c.
struct thread_data * thread_even |
struct thread_data * thread_odd |
struct topo_params topo |
Definition at line 142 of file turbostat.c.
unsigned int units = 1000000000 |
Definition at line 60 of file turbostat.c.
unsigned int verbose |
Definition at line 53 of file turbostat.c.