diff options
author | Søren Sandmann <sandmann@redhat.com> | 2006-01-13 23:21:15 +0000 |
---|---|---|
committer | Søren Sandmann Pedersen <ssp@src.gnome.org> | 2006-01-13 23:21:15 +0000 |
commit | 3c8e4a053d174398e1f750d8badcb8ed1ed167a1 (patch) | |
tree | 1d524a1587bf47ffd8c04d8137ff4c3b304a9023 | |
parent | 7eb615b06d21858492fa4d1c715b38005acf8926 (diff) |
Backport fix for HZ <= SAMPLES_PER_SECOND from HEAD. (Thomas de Grenier de
2006-01-13 Søren Sandmann <sandmann@redhat.com>
* module/sysprof-module.c (INTERVAL): Backport fix for HZ <=
SAMPLES_PER_SECOND from HEAD. (Thomas de Grenier de Latour).
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | module/sysprof-module.c | 2 |
2 files changed, 6 insertions, 1 deletions
@@ -1,3 +1,8 @@ +2006-01-13 Søren Sandmann <sandmann@redhat.com> + + * module/sysprof-module.c (INTERVAL): Backport fix for HZ <= + SAMPLES_PER_SECOND from HEAD. (Thomas de Grenier de Latour). + Wed Jan 11 20:23:06 2006 Søren Sandmann <sandmann@redhat.com> * process.c (read_maps): Also make offset a gulong (Samuel diff --git a/module/sysprof-module.c b/module/sysprof-module.c index cca6397..9cf5213 100644 --- a/module/sysprof-module.c +++ b/module/sysprof-module.c @@ -50,7 +50,7 @@ MODULE_LICENSE("GPL"); MODULE_AUTHOR("Soeren Sandmann (sandmann@daimi.au.dk)"); #define SAMPLES_PER_SECOND (200) -#define INTERVAL (HZ / SAMPLES_PER_SECOND) +#define INTERVAL ((HZ <= SAMPLES_PER_SECOND)? 1 : (HZ / SAMPLES_PER_SECOND)) #define N_TRACES 256 static SysprofStackTrace stack_traces[N_TRACES]; |