Most of the functionality needed to do this is built in.
To view resource usage of pages
see about:memory
. This gives you an interactive tree of memory allocations (click on an item to see more details; mouse over to see a detailed explanation of what each entry means):
- Under
explicit/layout
you will see the memory used directly to display each tab.
- Under
explicit/js
you will see the memory used by each Javascript "compartment". Note that there is a separate heap or compartment for each domain (like http://superuser.com
) rather than page. These numbers represent how much memory scripts running on those pages use in total.
For CPU usage of Javascript running on pages, try the Firebug extension's Javascript profiler. Unfortunately I don't know of any support for profiling CPU usage of page layout.
To view resource usage of plugins
use your operating system's process viewer/system monitor/task manager. Firefox now runs plugins in separate processes, so by looking at each process's memory/CPU utilization you know the performance of the corresponding plugin.
On Linux, the plugin processes are called plugin-container
. Look at the command line of each process to see which plugin it represents.
When a plugin crashes (or you kill its process), you'll see a message on the open page(s) containing instances of the crashed plugin.