From: Stephane Eranian <eranian@hpl.hp.com>
To: Andi Kleen <ak@suse.de>
Cc: linux-kernel@vger.kernel.org
Subject: Re: [PATCH 10/17] 2.6.17.1 perfmon2 patch for review: PMU context switch
Date: Fri, 30 Jun 2006 13:47:17 -0700 [thread overview]
Message-ID: <20060630204717.GC22835@frankl.hpl.hp.com> (raw)
In-Reply-To: <200606301908.03934.ak@suse.de>
On Fri, Jun 30, 2006 at 07:08:03PM +0200, Andi Kleen wrote:
> On Friday 30 June 2006 18:02, Stephane Eranian wrote:
> > Andi,
> >
> > As a first step, I am looking at implementing a TIF_DEBUG
> > for x86-64. AFAIK, debug registers must not be inherited on
> > fork().
>
> Why not? Especially for threads you probably want them
> in the new thread too.
>
For this to work, the new thread must also inherit the ptrace
flag and ptrace re-parenting stuff. That would happen under
the cover as the ptracing application would not necessarily
know about this. It would also need to be able to name that new
thread (via gettid() and not getpid()) to be able to operate
on it.
In my mind, it has to work the other way around. The ptracing
process interesting in ptracing/debugging new threads, sets the
right ptrace notification options for CLONE, when it gets the
notification it attaches to the newly created thread and reprograms
the breakpoints. This is the way I allow a tool such as pfmon,
to monitor across fork, pthread_create(), for instance.
Of the top of my head, I think for Itanium, we disable breakpoints
for the child in copy_threads(). I don't know for the other architectures.
Anybody can comment on this?
--
-Stephane
next prev parent reply other threads:[~2006-06-30 20:55 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-06-23 9:13 Stephane Eranian
2006-06-30 12:27 ` Andi Kleen
2006-06-30 12:36 ` Stephane Eranian
2006-06-30 12:59 ` Andi Kleen
2006-06-30 13:29 ` Stephane Eranian
2006-06-30 13:41 ` Andi Kleen
2006-06-30 14:12 ` Stephane Eranian
2006-06-30 14:33 ` Andi Kleen
2006-06-30 16:02 ` Stephane Eranian
2006-06-30 17:08 ` Andi Kleen
2006-06-30 20:47 ` Stephane Eranian [this message]
2006-07-03 9:49 ` Stephane Eranian
2006-07-03 19:25 ` Andi Kleen
2006-07-03 19:22 ` Stephane Eranian
2006-07-03 19:36 ` Andi Kleen
2006-06-30 18:33 Chuck Ebbert
2006-06-30 18:42 ` Andi Kleen
2006-06-30 18:43 ` Stephane Eranian
2006-06-30 20:40 ` Stephane Eranian
2006-06-30 19:17 Chuck Ebbert
2006-06-30 19:37 ` Andi Kleen
2006-07-01 15:21 Chuck Ebbert
2006-07-04 15:28 ` Stephane Eranian
2006-07-06 17:30 Chuck Ebbert
2006-07-06 20:16 ` Stephane Eranian
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=20060630204717.GC22835@frankl.hpl.hp.com \
--to=eranian@hpl.hp.com \
--cc=ak@suse.de \
--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
Powered by JetHome