From: Andrew Morton <akpm@osdl.org>
To: "Amitabha Roy" <amitabha.roy@gmail.com>
Cc: phil.el@wanadoo.fr, oprofile-list@lists.sourceforge.net,
linux-kernel@vger.kernel.org
Subject: Re: [patch 1/1] oprofile: Add a special cookie for the VDSO region
Date: Thu, 14 Dec 2006 15:42:11 -0800 [thread overview]
Message-ID: <20061214154211.34b0a7f7.akpm@osdl.org> (raw)
In-Reply-To: <cf9d85500612110156y40341563ge96ae598f72ef303@mail.gmail.com>
On Mon, 11 Dec 2006 15:26:26 +0530
"Amitabha Roy" <amitabha.roy@gmail.com> wrote:
> Emit a special VDSO_COOKIE for VDSO regions instead of simply marking
> them as anon.
Why?
> Signed-off-by: Amitabha Roy <amitabha.roy@gmail.com>
> ---
> diff --git a/drivers/oprofile/buffer_sync.c b/drivers/oprofile/buffer_sync.c
> index 78c2e6e..7f879db 100644
> --- a/drivers/oprofile/buffer_sync.c
> +++ b/drivers/oprofile/buffer_sync.c
> @@ -250,7 +250,14 @@ static unsigned long lookup_dcookie(stru
> vma->vm_file->f_path.mnt);
> *offset = (vma->vm_pgoff << PAGE_SHIFT) + addr -
> vma->vm_start;
> - } else {
> + }
> +#ifdef CONFIG_X86_32
> + else if(mm->context.vdso==vma->vm_start){
> + cookie = VDSO_COOKIE;
> + *offset = addr;
> + }
> +#endif
> + else {
> /* must be an anonymous map */
> *offset = addr;
> }
> diff --git a/drivers/oprofile/event_buffer.h b/drivers/oprofile/event_buffer.h
> index 9241627..edc8ee2 100644
> --- a/drivers/oprofile/event_buffer.h
> +++ b/drivers/oprofile/event_buffer.h
> @@ -35,6 +35,7 @@ #define CTX_TGID_CODE 7
> #define TRACE_BEGIN_CODE 8
> #define TRACE_END_CODE 9
>
> +#define VDSO_COOKIE ~1UL
> #define INVALID_COOKIE ~0UL
> #define NO_COOKIE 0UL
prev parent reply other threads:[~2006-12-14 23:42 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-12-11 9:56 Amitabha Roy
2006-12-14 23:42 ` Andrew Morton [this message]
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=20061214154211.34b0a7f7.akpm@osdl.org \
--to=akpm@osdl.org \
--cc=amitabha.roy@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=oprofile-list@lists.sourceforge.net \
--cc=phil.el@wanadoo.fr \
/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®