Re: [PATCH 02/22 -v7] Add basic support for gcc profiler instrumentation

2008-02-04 Thread Paul E. McKenney
On Mon, Feb 04, 2008 at 05:41:40PM -0500, Mathieu Desnoyers wrote: > * Steven Rostedt ([EMAIL PROTECTED]) wrote: > > > > On Mon, 4 Feb 2008, Paul E. McKenney wrote: > > > OK, will see what I can do... > > > > > > > On Sat, 2 Feb 2008, Paul E. McKenney wrote: > > > > > > > > > Yep, you have depende

Re: [PATCH 02/22 -v7] Add basic support for gcc profiler instrumentation

2008-02-04 Thread Paul E. McKenney
On Mon, Feb 04, 2008 at 05:03:47PM -0500, Steven Rostedt wrote: > > On Mon, 4 Feb 2008, Paul E. McKenney wrote: > > OK, will see what I can do... > > > > > On Sat, 2 Feb 2008, Paul E. McKenney wrote: > > > > > > > Yep, you have dependencies, so something like the following: > > > > > > > > initial

Re: [PATCH 02/22 -v7] Add basic support for gcc profiler instrumentation

2008-02-04 Thread Mathieu Desnoyers
* Steven Rostedt ([EMAIL PROTECTED]) wrote: > > On Mon, 4 Feb 2008, Paul E. McKenney wrote: > > OK, will see what I can do... > > > > > On Sat, 2 Feb 2008, Paul E. McKenney wrote: > > > > > > > Yep, you have dependencies, so something like the following: > > > > > > > > initial state: > > > > > >

Re: [PATCH 02/22 -v7] Add basic support for gcc profiler instrumentation

2008-02-04 Thread Steven Rostedt
On Mon, 4 Feb 2008, Paul E. McKenney wrote: > OK, will see what I can do... > > > On Sat, 2 Feb 2008, Paul E. McKenney wrote: > > > > > Yep, you have dependencies, so something like the following: > > > > > > initial state: > > > > > > struct foo { > > > int a; > > > }; > > > struc

Re: [PATCH 02/22 -v7] Add basic support for gcc profiler instrumentation

2008-02-04 Thread Paul E. McKenney
On Mon, Feb 04, 2008 at 12:09:00PM -0500, Steven Rostedt wrote: > > Hi Paul, > > First I want to say, "Thank you", for taking the time to explain this in > considerable detail. But I still have some minor questions. > > (Even though you already convinced me, but I still want full > understand

Re: [PATCH 02/22 -v7] Add basic support for gcc profiler instrumentation

2008-02-04 Thread Steven Rostedt
Hi Paul, First I want to say, "Thank you", for taking the time to explain this in considerable detail. But I still have some minor questions. (Even though you already convinced me, but I still want full understanding ;-) On Sat, 2 Feb 2008, Paul E. McKenney wrote: > Yep, you have dependenc

Re: [PATCH 02/22 -v7] Add basic support for gcc profiler instrumentation

2008-02-02 Thread Paul E. McKenney
On Fri, Feb 01, 2008 at 08:56:12PM -0500, Steven Rostedt wrote: > > > On Fri, 1 Feb 2008, Paul E. McKenney wrote: > > > > > > OK, fair enough. I'll explain it a bit more. > > > > > > > > > > How's this: > > > > > > > > > > /* > > > > > * We are entering ops into the mcount_list but another >

Re: [PATCH 02/22 -v7] Add basic support for gcc profiler instrumentation

2008-02-01 Thread Steven Rostedt
On Fri, 1 Feb 2008, Paul E. McKenney wrote: > > > > OK, fair enough. I'll explain it a bit more. > > > > > > > > How's this: > > > > > > > > /* > > > > * We are entering ops into the mcount_list but another > > > > * CPU might be walking that list. We need to make sure > > > > * the ops->

Re: [PATCH 02/22 -v7] Add basic support for gcc profiler instrumentation

2008-02-01 Thread Paul E. McKenney
On Wed, Jan 30, 2008 at 03:25:00PM +0100, Peter Zijlstra wrote: > > On Wed, 2008-01-30 at 09:09 -0500, Steven Rostedt wrote: > > Paul, > > > > Peter and I are having a discussion on craziness of archs and memory > > barriers. You seem to understand crazy archs pretty well, and we would > > like s

Re: [PATCH 02/22 -v7] Add basic support for gcc profiler instrumentation

2008-01-30 Thread Steven Rostedt
On Wed, 30 Jan 2008, Steven Rostedt wrote: > well, actually, I disagree. I only set mcount_enabled=1 when I'm about to > test something. You're right that we want the impact of the test least > affected, but when we have mcount_enabled=1 we usually also have a > function that's attached and in tha

Re: [PATCH 02/22 -v7] Add basic support for gcc profiler instrumentation

2008-01-30 Thread Peter Zijlstra
On Wed, 2008-01-30 at 09:09 -0500, Steven Rostedt wrote: > Paul, > > Peter and I are having a discussion on craziness of archs and memory > barriers. You seem to understand crazy archs pretty well, and we would > like some advice. :-) > > See below: > > On Wed, 30 Jan 2008, Steven Rostedt wrote

Re: [PATCH 02/22 -v7] Add basic support for gcc profiler instrumentation

2008-01-30 Thread Steven Rostedt
Paul, Peter and I are having a discussion on craziness of archs and memory barriers. You seem to understand crazy archs pretty well, and we would like some advice. :-) See below: On Wed, 30 Jan 2008, Steven Rostedt wrote: > > > On Wed, 30 Jan 2008, Peter Zijlstra wrote: > > > > > On Tue, 2008-

Re: [PATCH 02/22 -v7] Add basic support for gcc profiler instrumentation

2008-01-30 Thread Steven Rostedt
On Wed, 30 Jan 2008, Jan Kiszka wrote: > Steven Rostedt wrote: > > > --- linux-mcount.git.orig/arch/x86/kernel/entry_32.S2008-01-29 > > 16:59:15.0 -0500 > > +++ linux-mcount.git/arch/x86/kernel/entry_32.S 2008-01-29 > > 17:26:18.0 -0500 > > @@ -75,6 +75,31 @@ DF_MASK

Re: [PATCH 02/22 -v7] Add basic support for gcc profiler instrumentation

2008-01-30 Thread Jan Kiszka
Steven Rostedt wrote: > --- linux-mcount.git.orig/arch/x86/kernel/entry_32.S 2008-01-29 > 16:59:15.0 -0500 > +++ linux-mcount.git/arch/x86/kernel/entry_32.S 2008-01-29 > 17:26:18.0 -0500 > @@ -75,6 +75,31 @@ DF_MASK= 0x0400 > NT_MASK = 0x

Re: [PATCH 02/22 -v7] Add basic support for gcc profiler instrumentation

2008-01-30 Thread Steven Rostedt
On Wed, 30 Jan 2008, Peter Zijlstra wrote: > > On Tue, 2008-01-29 at 22:15 -0500, Steven Rostedt wrote: > > > +int register_mcount_function(struct mcount_ops *ops) > > +{ > > + unsigned long flags; > > + > > + spin_lock_irqsave(&mcount_func_lock, flags); > > + ops->next = mcount_list; > >

Re: [PATCH 02/22 -v7] Add basic support for gcc profiler instrumentation

2008-01-30 Thread Peter Zijlstra
On Tue, 2008-01-29 at 22:15 -0500, Steven Rostedt wrote: > +int register_mcount_function(struct mcount_ops *ops) > +{ > + unsigned long flags; > + > + spin_lock_irqsave(&mcount_func_lock, flags); > + ops->next = mcount_list; > + /* must have next seen before we update the list poi