This is the mail archive of the
mailing list for the systemtap project.
Re: [PATCH] Linux Kernel Markers
- From: Masami Hiramatsu <masami dot hiramatsu dot pt at hitachi dot com>
- To: prasanna at in dot ibm dot com
- Cc: Martin Bligh <mbligh at google dot com>, Vara Prasad <prasadav at us dot ibm dot com>, Andrew Morton <akpm at osdl dot org>, "Frank Ch. Eigler" <fche at redhat dot com>, Ingo Molnar <mingo at elte dot hu>, Mathieu Desnoyers <mathieu dot desnoyers at polymtl dot ca>, Paul Mundt <lethal at linux-sh dot org>, linux-kernel <linux-kernel at vger dot kernel dot org>, Jes Sorensen <jes at sgi dot com>, Tom Zanussi <zanussi at us dot ibm dot com>, Richard J Moore <richardj_moore at uk dot ibm dot com>, Michel Dagenais <michel dot dagenais at polymtl dot ca>, Christoph Hellwig <hch at infradead dot org>, Greg Kroah-Hartman <gregkh at suse dot de>, Thomas Gleixner <tglx at linutronix dot de>, William Cohen <wcohen at redhat dot com>, ltt-dev at shafik dot org, systemtap at sources dot redhat dot com, Alan Cox <alan at lxorguk dot ukuu dot org dot uk>
- Date: Wed, 20 Sep 2006 20:00:07 +0900
- Subject: Re: [PATCH] Linux Kernel Markers
- Organization: Systems Development Lab., Hitachi, Ltd., Japan
- References: <20060919081124.GA30394@elte.hu> <451008AC.email@example.com> <20060919154612.GU3951@redhat.com> <4510151B.firstname.lastname@example.org> <email@example.com> <45101DBA.firstname.lastname@example.org> <20060919063821.GB23836@in.ibm.com> <email@example.com> <4510413F.firstname.lastname@example.org> <email@example.com> <20060919093056.GA21618@in.ibm.com>
S. P. Prasanna wrote:
> Some more coplicated method.
> How about inserting a (instruction size) number of breakpoints and
> wait untill all the threads gets scheduled atleast once (so that
> threads would hit the breakpoint, if their IPs are in the middle of
> instruction we want to replace with jump) and then replace with
> jump instruction.
I think there is no need to insert so many breakpoints.
Instead of that, you merely wait that all the threads which are
running on each processors at that time gets scheduled, if the kernel
is *NOT* preemptive.
If the kernel is preemptive, some threads might sleep on the target
address. In this case, we can use freeze_processes() to ensure safety.
This idea was proposed by Ingo.
2nd Research Dept.
Hitachi, Ltd., Systems Development Laboratory