]> git.neil.brown.name Git - history.git/commitdiff
[PATCH] OProfile update
authorJohn Levon <levon@movementarian.org>
Sat, 3 May 2003 11:42:47 +0000 (04:42 -0700)
committerLinus Torvalds <torvalds@home.transmeta.com>
Sat, 3 May 2003 11:42:47 +0000 (04:42 -0700)
Change the lost_mmap_sem stat to lost_no_mm, and account it.

drivers/oprofile/buffer_sync.c
drivers/oprofile/oprofile_stats.c
drivers/oprofile/oprofile_stats.h

index 1b1fd3e7ab591b34daa7c78cca3dda8fa9b3f811..b2023dd9ddad60922629f19270590a80cdb43902 100644 (file)
@@ -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);
        }
 }
  
index 31f9347d0b7e9d15fbc5b3ce9f26cc50aa9c1b25..5624c1e017e028799d1a94d413a1c4290160e2a8 100644 (file)
@@ -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);
 }
index 8ca3596c2bef59115dfccbabe2ab17fd76dd3915..e3f67d5c0910936ae823ad16a8a9f777ed9b5461 100644 (file)
@@ -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;
 };