Messages in this thread Patch in this message | | | Subject | Re: [2.6.39-rc2] perf top fails to mmap - bisected to 70db7533 | From | Lin Ming <> | Date | Sat, 23 Apr 2011 22:51:11 +0800 |
| |
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
| |