projects
/
collectd.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
b2d0b4b
)
Turbostat: Set global variable to static
author
Vincent Brillault
<git@lerya.net>
Wed, 4 Feb 2015 20:53:49 +0000
(21:53 +0100)
committer
Vincent Brillault
<git@lerya.net>
Sat, 28 Feb 2015 06:35:42 +0000
(07:35 +0100)
src/turbostat.c
patch
|
blob
|
history
diff --git
a/src/turbostat.c
b/src/turbostat.c
index
c767cf1
..
2d124fd
100644
(file)
--- a/
src/turbostat.c
+++ b/
src/turbostat.c
@@
-145,10
+145,10
@@
static double rapl_energy_units;
/* 0x642 MSR_PP1_POLICY */
#define TJMAX_DEFAULT 100
/* 0x642 MSR_PP1_POLICY */
#define TJMAX_DEFAULT 100
-cpu_set_t *cpu_present_set, *cpu_affinity_set, *cpu_saved_affinity_set;
-size_t cpu_present_setsize, cpu_affinity_setsize, cpu_saved_affinity_setsize;
+
static
cpu_set_t *cpu_present_set, *cpu_affinity_set, *cpu_saved_affinity_set;
+s
tatic s
ize_t cpu_present_setsize, cpu_affinity_setsize, cpu_saved_affinity_setsize;
-struct thread_data {
+st
atic st
ruct thread_data {
unsigned long long tsc;
unsigned long long aperf;
unsigned long long mperf;
unsigned long long tsc;
unsigned long long aperf;
unsigned long long mperf;
@@
-160,7
+160,7
@@
struct thread_data {
#define CPU_IS_FIRST_CORE_IN_PACKAGE 0x4
} *thread_delta, *thread_even, *thread_odd;
#define CPU_IS_FIRST_CORE_IN_PACKAGE 0x4
} *thread_delta, *thread_even, *thread_odd;
-struct core_data {
+st
atic st
ruct core_data {
unsigned long long c3;
unsigned long long c6;
unsigned long long c7;
unsigned long long c3;
unsigned long long c6;
unsigned long long c7;
@@
-168,7
+168,7
@@
struct core_data {
unsigned int core_id;
} *core_delta, *core_even, *core_odd;
unsigned int core_id;
} *core_delta, *core_even, *core_odd;
-struct pkg_data {
+st
atic st
ruct pkg_data {
unsigned long long pc2;
unsigned long long pc3;
unsigned long long pc6;
unsigned long long pc2;
unsigned long long pc3;
unsigned long long pc6;
@@
-213,7
+213,7
@@
struct cpu_topology {
_Bool first_thread_in_core;
};
_Bool first_thread_in_core;
};
-struct topology {
+st
atic st
ruct topology {
int max_cpu_id;
int num_packages;
int num_cores;
int max_cpu_id;
int num_packages;
int num_cores;
@@
-221,7
+221,7
@@
struct topology {
struct cpu_topology *cpus;
} topology;
struct cpu_topology *cpus;
} topology;
-cdtime_t time_even, time_odd, time_delta;
+
static
cdtime_t time_even, time_odd, time_delta;
static const char *config_keys[] =
{
static const char *config_keys[] =
{