Profiler
From FirebugWiki
Sebastianz (Talk | contribs) (Profiling feature) |
Sebastianz (Talk | contribs) m (Added __FORCETOC__ to always show the table of contents) |
||
| (2 intermediate revisions not shown) | |||
| Line 1: | Line 1: | ||
| - | + | __FORCETOC__ | |
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. | 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 profiling == | ||
| + | [[Image:Profiler.png|thumb|400px|CPU Profiler]] | ||
CPU profiling allows to get statistics about JavaScript function calls. | CPU profiling allows to get statistics about JavaScript function calls. | ||
This information includes the following data: | This information includes the following data: | ||
| Line 13: | Line 14: | ||
| Function || Name of the called function ("(?)" or "anonymous" for anonymous functions) | | Function || Name of the called function ("(?)" or "anonymous" for anonymous functions) | ||
|- | |- | ||
| - | | Calls || Number of calls to | + | | Calls || Number of calls to the function |
|- | |- | ||
| Percent || Percentage in time in comparison to all function calls within the profiling session | | Percent || Percentage in time in comparison to all function calls within the profiling session | ||
| Line 31: | Line 32: | ||
== Memory profiling == | == Memory profiling == | ||
| + | [[Image:MemoryProfiler.png|thumb|400px|Memory Profiler]] | ||
While CPU profiling concentrates on giving information about CPU activity, memory profiling returns data about RAM usage. | 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 <code>extensions.firebug.memoryProfilerEnable</code> to <code>true</code>. | Memory profiling is currently disabled by default, because it is still in experimental state. It can be activated by setting <code>extensions.firebug.memoryProfilerEnable</code> to <code>true</code>. | ||
| + | You can [http://getfirebug.com/tests/issues/memory/test.html test] the different aspects of the Memory Profiler. | ||
| + | The information displayed after executing the Memory Profiler includes the following data: | ||
| + | {| class="wikitable" style="width:100%; vertical-align:top;" | ||
| + | |- bgcolor=lightgrey | ||
| + | ! style="width:220px;" | 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 | ||
| + | |} | ||
| + | |||
| + | Besides this information there is also a list shown containing all objects allocated while running the memory profiling session. | ||
| + | |||
| + | Note: Firefox has an integrated memory profiler. To access it type <code>about:config</code> into the address bar and hit <code class="key">Enter</code>. | ||
| + | |||
| + | == See also == | ||
| + | [[Memorybug]] - Firebug extension for advanced memory profiling | ||
Revision as of 06:35, 19 December 2011
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.
Contents |
CPU profiling
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
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 |
Besides this information there is also a list shown containing all objects allocated while running the memory profiling session.
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