lkml.org 
[lkml]   [2011]   [Apr]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
SubjectRe: [2.6.39-rc2] perf top fails to mmap - bisected to 70db7533
From
Date
On Sat, 2011-04-23 at 22:36 +0800, Lin Ming wrote:
> On Sat, Apr 23, 2011 at 12:37 AM, David Ahern <dsahern@gmail.com> wrote:
> > I know you've been busy with other stuff the past few weeks, but have
> > you had a chance to look into this? Basically, perf in 2.6.39 is broken
> > when trying to profile a process (-p argument to record or top).
>
> Let me take a look at this.

Below patch fixes the same problem on my box.
Could you have a try it?

>From 89f1ab02cd8da55f8829b2f2d7e700fdae77b3af Mon Sep 17 00:00:00 2001
From: Lin Ming <ming.m.lin@intel.com>
Date: Sat, 23 Apr 2011 14:54:33 +0000
Subject: [PATCH] perf: Allow set output event for task in the same thread group

Signed-off-by: Lin Ming <ming.m.lin@intel.com>
---
kernel/perf_event.c | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/kernel/perf_event.c b/kernel/perf_event.c
index 8e81a98..17dbc49 100644
--- a/kernel/perf_event.c
+++ b/kernel/perf_event.c
@@ -6379,9 +6379,10 @@ perf_event_set_output(struct perf_event *event, struct perf_event *output_event)
goto out;

/*
- * If its not a per-cpu buffer, it must be the same task.
+ * If its not a per-cpu buffer, it must be the same task or in the same thread group.
*/
- if (output_event->cpu == -1 && output_event->ctx != event->ctx)
+ if (output_event->cpu == -1 &&
+ !same_thread_group(output_event->ctx->task, event->ctx->task))
goto out;

set:

>
> Lin Ming
>
> >
> > David




\
 
 \ /
  Last update: 2011-04-23 16:53    [W:0.045 / U:1.504 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site