Add forgotten put_cpu_var(). Parse in chunks of 65536 to improve locality.

2006-12-09  Soren Sandmann <sandmann@daimi.au.dk>

        * module/sysprof-module.c: Add forgotten put_cpu_var().
        * sfile.c (build_instructions): Parse in chunks of 65536 to
        improve locality.
This commit is contained in:
Soren Sandmann
2006-12-09 06:29:43 +00:00
committed by Søren Sandmann Pedersen
parent 4ba672ee9f
commit bd1f064ad3
4 changed files with 29 additions and 4 deletions

View File

@ -126,8 +126,12 @@ timer_notify (struct pt_regs *regs)
#if 0
int stacksize;
#endif
int n;
if (((++get_cpu_var(n_samples)) % INTERVAL) != 0)
n = ++get_cpu_var(n_samples);
put_cpu_var(n_samples);
if (n % INTERVAL != 0)
return 0;
/* 0: locked, 1: unlocked */
@ -216,6 +220,7 @@ timer_notify (struct pt_regs *regs)
out:
atomic_inc(&in_timer_notify);
return 0;
}