Re: [RFC] timers, pointers to functions and type safety

2006-12-02 Thread Thomas Gleixner
On Fri, 2006-12-01 at 17:21 +, Al Viro wrote: > Now, there's another question: how do we get there? Or, at least, from > current void (*)(unsigned long) to void (*)(void *)... I think the real solution should be void (*function)(struct timer_list *timer); and hand the timer itself

Re: BUG: GCC-4.4.x changes the function frame on some functions

2009-11-19 Thread Thomas Gleixner
On Thu, 19 Nov 2009, Thomas Gleixner wrote: Can the GCC folks please shed some light on this: standard function start: push %ebp mov%esp, %ebp call mcount modified function start on a handful of functions only seen with gcc 4.4.x on x86 32 bit

Re: BUG: GCC-4.4.x changes the function frame on some functions

2009-11-19 Thread Thomas Gleixner
On Thu, 19 Nov 2009, Andrew Haley wrote: > Thomas Gleixner wrote: > > There is no real obvious reason why the edi magic needs to be done > > _before_ > > > > push %ebp > > mov%esp,%ebp > > Sure there is: unless you do the adjustment first %eb

Re: BUG: GCC-4.4.x changes the function frame on some functions

2009-11-19 Thread Thomas Gleixner
On Thu, 19 Nov 2009, Andrew Haley wrote: > Thomas Gleixner wrote: > > On Thu, 19 Nov 2009, Andrew Haley wrote: > >> Thomas Gleixner wrote: > >>> There is no real obvious reason why the edi magic needs to be done > >>> _before_ > >>> > >

Re: BUG: GCC-4.4.x changes the function frame on some functions

2009-11-19 Thread Thomas Gleixner
On Thu, 19 Nov 2009, Linus Torvalds wrote: > Umm. But it still does, doesn't it? That > > pushl -0x4(%edi) > push %ebp > > should do it - the "-0x4(%edi)" thing seems to be trying to reload the > return address. No? > > Maybe I misread the code - but regardless, it does look lik

Re: BUG: GCC-4.4.x changes the function frame on some functions

2009-11-19 Thread Thomas Gleixner
On Thu, 19 Nov 2009, Richard Guenther wrote: > Note that I only can reproduce the issue with > -mincoming-stack-boundary=2, not with -mpreferred-stack-boundary=2. > And > you didn't provide us with a testcase either ... so please open > a bugzilla and attach preprocessed source of a file that > sho

Re: BUG: GCC-4.4.x changes the function frame on some functions

2009-11-19 Thread Thomas Gleixner
On Thu, 19 Nov 2009, Andrew Haley wrote: > OK, I found it. There is a struct defined as > > struct entry { > ... > } __attribute__((__aligned__((1 << (4); > > and then in timer_stats_update_stats you have a local variable of type > struct entry: > > void timer_stats_update_stats() > { > s

Re: BUG: GCC-4.4.x changes the function frame on some functions

2009-11-19 Thread Thomas Gleixner
On Thu, 19 Nov 2009, Linus Torvalds wrote: > > I bet other people than just the kernel use the mcount hook for subtler > > things than just doing profiles. And even if they don't, the quoted code > > generation is just crazy _crap_. > > For the kernel, if the only case is that timer_stat.c thing

Re: BUG: GCC-4.4.x changes the function frame on some functions

2009-11-19 Thread Thomas Gleixner
On Thu, 19 Nov 2009, Linus Torvalds wrote: > On Thu, 19 Nov 2009, Richard Guenther wrote: > > > > Note that I only can reproduce the issue with > > -mincoming-stack-boundary=2, not with -mpreferred-stack-boundary=2. > > Since you can reproduce it with -mincoming-stack-boundary=2, I woul > sugges

Re: BUG: GCC-4.4.x changes the function frame on some functions

2009-11-19 Thread Thomas Gleixner
On Thu, 19 Nov 2009, Jeff Law wrote: > On 11/19/09 15:43, Steven Rostedt wrote: > > On Thu, 2009-11-19 at 14:25 -0700, Jeff Law wrote: > > > > > > > Having said all that, I don't expect to personally be looking at the > > > problem, given the list of other codegen issues that need to be looked

Re: BUG: GCC-4.4.x changes the function frame on some functions

2009-11-19 Thread Thomas Gleixner
On Thu, 19 Nov 2009, Linus Torvalds wrote: > On Fri, 20 Nov 2009, Thomas Gleixner wrote: > > > > While testing various kernel configs we found out that the problem > > comes and goes. Finally I started to compare the gcc command line > > options and after some fidd

Re: BUG: GCC-4.4.x changes the function frame on some functions

2009-11-19 Thread Thomas Gleixner
On Fri, 20 Nov 2009, Thomas Gleixner wrote: > On Thu, 19 Nov 2009, Linus Torvalds wrote: > > On Fri, 20 Nov 2009, Thomas Gleixner wrote: > > > > > > While testing various kernel configs we found out that the problem > > > comes and goes. Finally I sta

Re: BUG: GCC-4.4.x changes the function frame on some functions

2009-11-23 Thread Thomas Gleixner
On Mon, 23 Nov 2009, Jakub Jelinek wrote: > On Thu, Nov 19, 2009 at 08:01:57PM +0100, Thomas Gleixner wrote: > > Just compiled with -mincoming-stack-boundary=4 and the problem goes > > away as gcc now thinks that the incoming stack is already 16 byte > > aligned. But that m

Re: [PATCH][GIT PULL][v2.6.32] tracing/x86: Add check to detect GCC messing with mcount prologue

2009-11-24 Thread Thomas Gleixner
On Tue, 24 Nov 2009, Andrew Haley wrote: > H.J. Lu wrote: > > On Sun, Nov 22, 2009 at 9:20 AM, Andrew Haley wrote: > >> H.J. Lu wrote: > >>> On Fri, Nov 20, 2009 at 11:35 AM, Andrew Haley wrote: > Steven Rostedt wrote: > > Ingo, Thomas and Linus, > > > > I know Thomas did a patch

Re: [PATCH][GIT PULL][v2.6.32] tracing/x86: Add check to detect GCC messing with mcount prologue

2009-11-25 Thread Thomas Gleixner
On Tue, 24 Nov 2009, Jakub Jelinek wrote: > On Tue, Nov 24, 2009 at 03:55:49PM +0100, Thomas Gleixner wrote: > > > you should compile your code with -maccumulate-outgoing-args, and there's > > > no need to use -mtune=generic. Is that right? > > > > Seem

Re: [PATCH][GIT PULL][v2.6.32] tracing/x86: Add check to detect GCC messing with mcount prologue

2009-11-25 Thread Thomas Gleixner
On Wed, 25 Nov 2009, Ingo Molnar wrote: > * Thomas Gleixner wrote: > > > On Tue, 24 Nov 2009, Jakub Jelinek wrote: > > > > > On Tue, Nov 24, 2009 at 03:55:49PM +0100, Thomas Gleixner wrote: > > > > > you should compile your code with -maccumu