How can I figure out which tab in Safari is using CPU?
You need Safari 6.1 or newer
Enable Debug menu.


Update: For Mac OS Mojave and newer, go to System Preferences > Security &amp; Privacy > Privacy > Full Disk Access and add Terminal before entering the command.

    defaults write com.apple.Safari IncludeInternalDebugMenu -bool true



Set "Use Per-tab web processes" and "Show Web process IDs in page titles" to on.