git://ftp.safe.ca
/
safe
/
jmp
/
linux-2.6
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
timekeeping: Add xtime_shift and ntp_error_shift to struct timekeeper
[safe/jmp/linux-2.6]
/
kernel
/
time
/
timer_stats.c
diff --git
a/kernel/time/timer_stats.c
b/kernel/time/timer_stats.c
index
c994530
..
4cde8b9
100644
(file)
--- a/
kernel/time/timer_stats.c
+++ b/
kernel/time/timer_stats.c
@@
-96,7
+96,7
@@
static DEFINE_MUTEX(show_mutex);
/*
* Collection status, active/inactive:
*/
/*
* Collection status, active/inactive:
*/
-
static int __read_mostly
active;
+
int __read_mostly timer_stats_
active;
/*
* Beginning/end timestamps of measurement:
/*
* Beginning/end timestamps of measurement:
@@
-242,7
+242,7
@@
void timer_stats_update_stats(void *timer, pid_t pid, void *startf,
struct entry *entry, input;
unsigned long flags;
struct entry *entry, input;
unsigned long flags;
- if (likely(!active))
+ if (likely(!
timer_stats_
active))
return;
lock = &per_cpu(lookup_lock, raw_smp_processor_id());
return;
lock = &per_cpu(lookup_lock, raw_smp_processor_id());
@@
-254,7
+254,7
@@
void timer_stats_update_stats(void *timer, pid_t pid, void *startf,
input.timer_flag = timer_flag;
spin_lock_irqsave(lock, flags);
input.timer_flag = timer_flag;
spin_lock_irqsave(lock, flags);
- if (!active)
+ if (!
timer_stats_
active)
goto out_unlock;
entry = tstat_lookup(&input, comm);
goto out_unlock;
entry = tstat_lookup(&input, comm);
@@
-290,7
+290,7
@@
static int tstats_show(struct seq_file *m, void *v)
/*
* If still active then calculate up to now:
*/
/*
* If still active then calculate up to now:
*/
- if (active)
+ if (
timer_stats_
active)
time_stop = ktime_get();
time = ktime_sub(time_stop, time_start);
time_stop = ktime_get();
time = ktime_sub(time_stop, time_start);
@@
-368,18
+368,18
@@
static ssize_t tstats_write(struct file *file, const char __user *buf,
mutex_lock(&show_mutex);
switch (ctl[0]) {
case '0':
mutex_lock(&show_mutex);
switch (ctl[0]) {
case '0':
- if (active) {
- active = 0;
+ if (
timer_stats_
active) {
+
timer_stats_
active = 0;
time_stop = ktime_get();
sync_access();
}
break;
case '1':
time_stop = ktime_get();
sync_access();
}
break;
case '1':
- if (!active) {
+ if (!
timer_stats_
active) {
reset_entries();
time_start = ktime_get();
smp_mb();
reset_entries();
time_start = ktime_get();
smp_mb();
- active = 1;
+
timer_stats_
active = 1;
}
break;
default:
}
break;
default: