Remove unused pages_present() function
authorSoeren Sandmann <sandmann@redhat.com>
Wed, 23 Nov 2005 04:26:36 +0000 (04:26 +0000)
committerSøren Sandmann Pedersen <ssp@src.gnome.org>
Wed, 23 Nov 2005 04:26:36 +0000 (04:26 +0000)
Tue Nov 22 23:38:09 2005  Soeren Sandmann  <sandmann@redhat.com>

        * module/sysprof-module.c: Remove unused pages_present() function

ChangeLog
module/sysprof-module.c
process.c

index c77af8f..78274f2 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+Tue Nov 22 23:38:09 2005  Soeren Sandmann  <sandmann@redhat.com>
+
+       * module/sysprof-module.c: Remove unused pages_present() function
+
 2005-11-18  Matthias Clasen  <mclasen@redhat.com>
 
        * configure.ac: Make configure work.
index 1fc01b7..004741c 100644 (file)
@@ -189,37 +189,6 @@ read_frame (userspace_reader *reader, unsigned long addr, StackFrame *frame)
 
 struct work_struct work;
 
-/**
- * pages_present() from OProfile
- *
- * Copyright 2002 OProfile authors
- *
- * author John Levon
- * author David Smith
- */
-
-#ifdef CONFIG_X86_4G
-/* With a 4G kernel/user split, user pages are not directly
- * accessible from the kernel, so don't try
- */
-static int pages_present(StackFrame * head)
-{
-       return 0;
-}
-#else
-/* check that the page(s) containing the frame head are present */
-static int pages_present(StackFrame * head)
-{
-       struct mm_struct * mm = current->mm;
-
-       /* FIXME: only necessary once per page */
-       if (!check_user_page_readable(mm, (unsigned long)head))
-               return 0;
-
-       return check_user_page_readable(mm, (unsigned long)(head + 1));
-}
-#endif /* CONFIG_X86_4G */
-
 static int
 read_frame (void *frame_pointer, StackFrame *frame)
 {
index 5d90077..f40059c 100644 (file)
--- a/process.c
+++ b/process.c
@@ -477,7 +477,7 @@ get_kernel_symbols (void)
        {
            kernel_syms = g_hash_table_new_full (g_direct_hash, g_direct_equal,
                                                 NULL, g_free);
-           
+
            parse_kallsyms (kallsyms, kernel_syms);
            
            g_free (kallsyms);
@@ -492,7 +492,7 @@ static const Symbol *
 lookup_kernel_symbol (gulong address)
 {
     static Symbol kernel;
-    
+
 #if 0
     g_print ("kernel binary: %s\n", find_kernel_binary ());
 #endif
@@ -512,6 +512,8 @@ process_lookup_symbol (Process *process, gulong address)
     
     if (address == 0x1)
     {
+       get_kernel_symbols ();
+       
        return lookup_kernel_symbol (address);
     }
     else if (!map)