Make dmprof handle long runs better

Read the dump files one by one as they are processed instead of reading
them all into memory at the start of the program, to reduce peak memory
consumption.  This makes it possible to process larger data sets.

Also restructure a few sub-command implementations to avoid iterating
over the list of dumps more than once and to avoid accessing any given
dump (typically the first) more than once.

BUG=

Review URL: https://codereview.chromium.org/141563014

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@248458 0039d316-1c4b-4281-b951-d872f2087c98
3 files changed