From: Anupama Chandwani <anupama.chandwani@gmail.com>
To: linux kernel mailing list <linux-kernel@vger.kernel.org>
Subject: All pages belonging to a process
Date: Tue, 25 Aug 2009 02:36:38 -0400 [thread overview]
Message-ID: <689eb3470908242336o6681b516uc21d07979099d8c8@mail.gmail.com> (raw)
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
next reply other threads:[~2009-08-25 6:36 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-08-25 6:36 Anupama Chandwani [this message]
2009-08-25 12:44 ` Jiri Kosina
2009-08-26 20:28 ` Anupama Chandwani
2009-08-26 20:45 ` Anupama Chandwani
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=689eb3470908242336o6681b516uc21d07979099d8c8@mail.gmail.com \
--to=anupama.chandwani@gmail.com \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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®