You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Michael Powe <mi...@trollope.org> on 2010/12/01 18:59:37 UTC

[users@httpd] Use -finstrument-functions in module

Hello,

I would like to use the gcc option -finstrument-functions to add some
profiling to my module.  I can implement the functions and compile
with the option successfully; however, I don't get any log output.

Documentation is a bit slender.  

The instrumented functions are declared:

__cyg_profile_func_enter(void *fn, void *call);
__cyg_profile_func_exit(void *fn, void *call);

In order to use ap_log_error(), I need the server information to
locate the logs to write to.  Attempting to change the function
signature to include the request_rec object did not create any
problems at compilation (or deployment) but also did not result in
successful logging.

Basically, I want to be able to log the execution times for each
function called within the module and I would like to avoid manually
altering each function to record this information.  The instrumented
functions seem to be a great way to do this.

Thanks.

mp

-- 
Michael Powe		michael@trollope.org		Naugatuck CT USA


47.3% of all statistics are made up on the spot. - Steven Wright

Re: [users@httpd] Use -finstrument-functions in module

Posted by Igor Galić <i....@brainsware.org>.
----- "Michael Powe" <mi...@trollope.org> wrote:

> Hello,
> 
> I would like to use the gcc option -finstrument-functions to add some
> profiling to my module.  I can implement the functions and compile
> with the option successfully; however, I don't get any log output.
> 
> Documentation is a bit slender.  
> 
> The instrumented functions are declared:
> 
> __cyg_profile_func_enter(void *fn, void *call);
> __cyg_profile_func_exit(void *fn, void *call);
> 
> In order to use ap_log_error(), I need the server information to
> locate the logs to write to.  Attempting to change the function
> signature to include the request_rec object did not create any
> problems at compilation (or deployment) but also did not result in
> successful logging.
> 
> Basically, I want to be able to log the execution times for each
> function called within the module and I would like to avoid manually
> altering each function to record this information.  The instrumented
> functions seem to be a great way to do this.

Use DTrace or SystemTap?

> Thanks.
> 
> mp
> 
> -- 
> Michael Powe		michael@trollope.org		Naugatuck CT USA
> 
> 
> 47.3% of all statistics are made up on the spot. - Steven Wright

i


-- 
Igor Galić

Tel: +43 (0) 664 886 22 883
Mail: i.galic@brainsware.org
URL: http://brainsware.org/

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org