diff options
| author | John Levon <levon@movementarian.org> | 2003-05-03 04:42:47 -0700 |
|---|---|---|
| committer | Linus Torvalds <torvalds@home.transmeta.com> | 2003-05-03 04:42:47 -0700 |
| commit | 8eac54924ac0f97ca1bf23e610157c3e72ad1846 (patch) | |
| tree | ab7d953d70622d6721bf5701202c71ee1c4bfe20 | |
| parent | 6afeba7fc1412d095733180b4e46dff8a70fe209 (diff) | |
[PATCH] OProfile update
Change the lost_mmap_sem stat to lost_no_mm, and account it.
| -rw-r--r-- | drivers/oprofile/buffer_sync.c | 2 | ||||
| -rw-r--r-- | drivers/oprofile/oprofile_stats.c | 6 | ||||
| -rw-r--r-- | drivers/oprofile/oprofile_stats.h | 2 |
3 files changed, 6 insertions, 4 deletions
diff --git a/drivers/oprofile/buffer_sync.c b/drivers/oprofile/buffer_sync.c index 1b1fd3e7ab59..b2023dd9ddad 100644 --- a/drivers/oprofile/buffer_sync.c +++ b/drivers/oprofile/buffer_sync.c @@ -298,6 +298,8 @@ static void add_sample(struct mm_struct * mm, struct op_sample * s, int in_kerne add_sample_entry(s->eip, s->event); } else if (mm) { add_us_sample(mm, s); + } else { + atomic_inc(&oprofile_stats.sample_lost_no_mm); } } diff --git a/drivers/oprofile/oprofile_stats.c b/drivers/oprofile/oprofile_stats.c index 31f9347d0b7e..5624c1e017e0 100644 --- a/drivers/oprofile/oprofile_stats.c +++ b/drivers/oprofile/oprofile_stats.c @@ -31,7 +31,7 @@ void oprofile_reset_stats(void) cpu_buf->sample_lost_task_exit = 0; } - atomic_set(&oprofile_stats.sample_lost_mmap_sem, 0); + atomic_set(&oprofile_stats.sample_lost_no_mm, 0); atomic_set(&oprofile_stats.event_lost_overflow, 0); } @@ -68,8 +68,8 @@ void oprofile_create_stats_files(struct super_block * sb, struct dentry * root) &cpu_buf->sample_lost_task_exit); } - oprofilefs_create_ro_atomic(sb, dir, "sample_lost_mmap_sem", - &oprofile_stats.sample_lost_mmap_sem); + oprofilefs_create_ro_atomic(sb, dir, "sample_lost_no_mm", + &oprofile_stats.sample_lost_no_mm); oprofilefs_create_ro_atomic(sb, dir, "event_lost_overflow", &oprofile_stats.event_lost_overflow); } diff --git a/drivers/oprofile/oprofile_stats.h b/drivers/oprofile/oprofile_stats.h index 8ca3596c2bef..e3f67d5c0910 100644 --- a/drivers/oprofile/oprofile_stats.h +++ b/drivers/oprofile/oprofile_stats.h @@ -13,7 +13,7 @@ #include <asm/atomic.h> struct oprofile_stat_struct { - atomic_t sample_lost_mmap_sem; + atomic_t sample_lost_no_mm; atomic_t event_lost_overflow; }; |
