Profiler

From FirebugWiki

Revision as of 09:54, 18 October 2011 by Sebastianz (Talk | contribs)
Jump to: navigation, search

The Profiler allows users to observe JavaScript activity and get statistics related to it. It's functionality is currently split into two parts - CPU profiling and memory profiling.

CPU profiling

CPU Profiler

CPU profiling allows to get statistics about JavaScript function calls. This information includes the following data:

Column Description
Function Name of the called function ("(?)" or "anonymous" for anonymous functions)
Calls Number of calls to the function
Percent Percentage in time in comparison to all function calls within the profiling session
Own Time Time spent within the function (time spent within functions called by that function are not taken into account)
Time Summary of time spent within the function of all calls
Avg Average time for one call of the function
Min Minimal time spent within the function
Max Minimal time spent within the function
File Name of the file plus line number, in which the function is located

Memory profiling

File:MemoryProfiler.png
Memory Profiler

While CPU profiling concentrates on giving information about CPU activity, memory profiling returns data about RAM usage. Memory profiling is currently disabled by default, because it is still in experimental state. It can be activated by setting extensions.firebug.memoryProfilerEnable to true. You can test the different aspects of the Memory Profiler. The information displayed after executing the Memory Profiler includes the following data:

Column Description
Function Name of the called function ("(?)" or "anonymous" for anonymous functions)
Calls Number of calls to the function
explicit/js Summarized amount of memory used for calls to the function
explicit/js/gc-heap Summary of garbage-collected heap memory related to the function
explicit/js/tjit-data Trace JIT memory used for calls to the function
explicit/js/mjit-code Method JIT memory holding generated code used for calls to the function
explicit/images/content/used/raw Memory used by in-use chrome images for calls to the function
File Name of the file plus line number, in which the function is located

Note: Firefox has an integrated memory profiler. To access it type about:config into the address bar and hit Enter.

See also

Memorybug - Firebug extension for advanced memory profiling

Personal tools