Thanks for your reply, Stephane,

"stephane eranian" <eran...@googlemail.com> wrote on 12/18/2008 01:56:16 
AM:

> Corey,
> 
> I looked at the pfm_handle_work() code. Normally
> this functions gets called only if the TIF_PERFMON_WORK
> flag is set. On Power, it seems the logic is coded differently.
> You call systematically and in pfm_handle_work() you check
> the flag, and if not set you return.
> 
> During boot, I don't expect TIF_PERFMON_WORK to be set.
> So I don't understand why FTRACER would have a problem
> with a function that does a simple test and returns.

Yes, in fact it appears that the call to _mcount is made even before the 
test of TIF_PERFMON_WORK is made.  Reading the ftrace.txt docs, it appears 
that these _mcount calls are inserted by the compiler at the beginning of 
every function, through the addition of gcc's -pg switch, if 
CONFIG_DYNAMIC_FTRACE is true.  However, the docs are out of date, I 
think, and the -pg flag is dependent only upon CONFIG_FUNCTION_TRACER 
being true (see Makefile).

But why this is causing a problem only on this call, I don't yet know. The 
_mcount code is in assembler, and might possibly make some incorrect 
assumptions about how the registers are initialized.

- Corey

------------------------------------------------------------------------------
SF.Net email is Sponsored by MIX09, March 18-20, 2009 in Las Vegas, Nevada.
The future of the web can't happen without you.  Join us at MIX09 to help
pave the way to the Next Web now. Learn more and register at
http://ad.doubleclick.net/clk;208669438;13503038;i?http://2009.visitmix.com/
_______________________________________________
perfmon2-devel mailing list
perfmon2-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/perfmon2-devel

Reply via email to