* [patch 1/1] oprofile: Add a special cookie for the VDSO region
@ 2006-12-11 9:56 Amitabha Roy
2006-12-14 23:42 ` Andrew Morton
0 siblings, 1 reply; 2+ messages in thread
From: Amitabha Roy @ 2006-12-11 9:56 UTC (permalink / raw)
To: phil.el; +Cc: oprofile-list, linux-kernel
Emit a special VDSO_COOKIE for VDSO regions instead of simply marking
them as anon.
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
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [patch 1/1] oprofile: Add a special cookie for the VDSO region
2006-12-11 9:56 [patch 1/1] oprofile: Add a special cookie for the VDSO region Amitabha Roy
@ 2006-12-14 23:42 ` Andrew Morton
0 siblings, 0 replies; 2+ messages in thread
From: Andrew Morton @ 2006-12-14 23:42 UTC (permalink / raw)
To: Amitabha Roy; +Cc: phil.el, oprofile-list, linux-kernel
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
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2006-12-14 23:42 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-12-11 9:56 [patch 1/1] oprofile: Add a special cookie for the VDSO region Amitabha Roy
2006-12-14 23:42 ` Andrew Morton
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®