mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* All pages belonging to a process
@ 2009-08-25  6:36 Anupama Chandwani
  2009-08-25 12:44 ` Jiri Kosina
  0 siblings, 1 reply; 4+ messages in thread
From: Anupama Chandwani @ 2009-08-25  6:36 UTC (permalink / raw)
  To: linux kernel mailing list

Hi,

I need to have a debug print for all pages belonging to a process, for
which i have the following code:

if (task->mm && task->mm->mmap)
{
      /* For all vma-s of a process */
      for (vma = task->mm->mmap; vma!=NULL; vma = vma->next)
      {
               pgd = pgd_offset(mm, address);
               if (!pgd_present(*pgd))
                    continue;

               pud = pud_offset(pgd, address);
               if (!pud_present(*pud))
                    continue;

               pmd = pmd_offset(pud, address);
               if (!pmd_present(*pmd))
                    continue;

              pte = pte_offset_map_lock (task->mm->vm_mm, pmd, address, &ptl);

              print pte_pfn(*pte) and other debug info;

              pte_unmap_unlock(pte, ptl);
      }
}

The code hangs. I do not get anything in dmesg.
Any pointers by observing the code?

--
Cheers,
Anupama Chandwani

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2009-08-26 20:51 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-08-25  6:36 All pages belonging to a process Anupama Chandwani
2009-08-25 12:44 ` Jiri Kosina
2009-08-26 20:28   ` Anupama Chandwani
2009-08-26 20:45     ` Anupama Chandwani

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®