mirror of
https://github.com/varun-r-mallya/sysprof.git
synced 2025-12-31 20:36:25 +00:00
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:
committed by
Søren Sandmann Pedersen
parent
4ba672ee9f
commit
bd1f064ad3
@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user