trace_inputs.py: Make the process map and process tree explicit.
trace_inputs.py: Make the process map and process tree explicit.

The ApiBase.Context.Process.children member now holds Process references
instead of the processid. This makes it a proper tree instead of requiring the
map to be up to date. This fixes both requirements for strace and
logman(Windows) log parsing. In the Windows case, processid are constantly
reused, so process lifetime during the process tree creation must be handled
accordingly. In the strace case, the log for each process are parsed out of
order so the tree's head cannot be created until all the logs are read.

R=cmp@chromium.org
NOTRY=true
BUG=
TEST=tested manually on each OS.


Review URL: https://chromiumcodereview.appspot.com/10792010

git-svn-id: de016e52bd170d2d4f2344f9bf92d50478b649e0@146831 0039d316-1c4b-4281-b951-d872f2087c98

keishi/chromium,junmin-zhu/chromium-rivertrail,bright-sparks/chromium-spacewalk,PeterWangIntel/chromium-crosswalk,mohamed--abdel-maksoud/chromium.src,chuan9/chromium-crosswalk,hgl888/chromium-crosswalk,mogoweb/chromium-crosswalk,patrickm/chromium.src,timopulkkinen/BubbleFish,ChromiumWebApps/chromium,zcbenz/cefode-chromium,Pluto-tv/chromium-crosswalk,keishi/chromium,junmin-zhu/chromium-rivertrail,pozdnyakov/chromium-crosswalk,PeterWangIntel/chromium-crosswalk,hgl888/chromium-crosswalk-efl,Chilledheart/chromium,axinging/chromium-crosswalk,ChromiumWebApps/chromium,fujunwei/chromium-crosswalk,fujunwei/chromium-crosswalk,fujunwei/chromium-crosswalk,junmin-zhu/chromium-rivertrail,markYoungH/chromium.src,Fireblend/chromium-crosswalk,M4sse/chromium.src,pozdnyakov/chromium-crosswalk,markYoungH/chromium.src,crosswalk-project/chromium-crosswalk-efl,krieger-od/nwjs_chromium.src,dushu1203/chromium.src,PeterWangIntel/chromium-crosswalk,jaruba/chromium.src,hgl888/chromium-crosswalk,keishi/chromium,Just-D/chromium-1,chuan9/chromium-crosswalk,fujunwei/chromium-crosswalk,PeterWangIntel/chromium-crosswalk,bright-sparks/chromium-spacewalk,ltilve/chromium,crosswalk-project/chromium-crosswalk-efl,dednal/chromium.src,dushu1203/chromium.src,Just-D/chromium-1,Jonekee/chromium.src,timopulkkinen/BubbleFish,crosswalk-project/chromium-crosswalk-efl,hgl888/chromium-crosswalk-efl,bright-sparks/chromium-spacewalk,anirudhSK/chromium,dednal/chromium.src,anirudhSK/chromium,Pluto-tv/chromium-crosswalk,chuan9/chromium-crosswalk,anirudhSK/chromium,M4sse/chromium.src,anirudhSK/chromium,Pluto-tv/chromium-crosswalk,jaruba/chromium.src,ChromiumWebApps/chromium,axinging/chromium-crosswalk,hgl888/chromium-crosswalk,ChromiumWebApps/chromium,Pluto-tv/chromium-crosswalk,zcbenz/cefode-chromium,hgl888/chromium-crosswalk,fujunwei/chromium-crosswalk,junmin-zhu/chromium-rivertrail,jaruba/chromium.src,littlstar/chromium.src,patrickm/chromium.src,Just-D/chromium-1,Jonekee/chromium.src,hujiajie/pa-chromium,dednal/chromium.src,crosswalk-project/chromium-crosswalk-efl,dednal/chromium.src,pozdnyakov/chromium-crosswalk,keishi/chromium,mohamed--abdel-maksoud/chromium.src,Jonekee/chromium.src,pozdnyakov/chromium-crosswalk,ltilve/chromium,hujiajie/pa-chromium,mogoweb/chromium-crosswalk,chuan9/chromium-crosswalk,patrickm/chromium.src,dednal/chromium.src,mogoweb/chromium-crosswalk,ltilve/chromium,PeterWangIntel/chromium-crosswalk,nacl-webkit/chrome_deps,Pluto-tv/chromium-crosswalk,Chilledheart/chromium,pozdnyakov/chromium-crosswalk,littlstar/chromium.src,dednal/chromium.src,ChromiumWebApps/chromium,Just-D/chromium-1,axinging/chromium-crosswalk,hgl888/chromium-crosswalk,ltilve/chromium,bright-sparks/chromium-spacewalk,pozdnyakov/chromium-crosswalk,Just-D/chromium-1,dednal/chromium.src,junmin-zhu/chromium-rivertrail,markYoungH/chromium.src,nacl-webkit/chrome_deps,ondra-novak/chromium.src,nacl-webkit/chrome_deps,bright-sparks/chromium-spacewalk,mogoweb/chromium-crosswalk,junmin-zhu/chromium-rivertrail,Jonekee/chromium.src,TheTypoMaster/chromium-crosswalk,hgl888/chromium-crosswalk,ondra-novak/chromium.src,M4sse/chromium.src,mogoweb/chromium-crosswalk,hgl888/chromium-crosswalk-efl,zcbenz/cefode-chromium,junmin-zhu/chromium-rivertrail,Fireblend/chromium-crosswalk,patrickm/chromium.src,markYoungH/chromium.src,dushu1203/chromium.src,patrickm/chromium.src,anirudhSK/chromium,TheTypoMaster/chromium-crosswalk,Jonekee/chromium.src,littlstar/chromium.src,axinging/chromium-crosswalk,ondra-novak/chromium.src,Chilledheart/chromium,crosswalk-project/chromium-crosswalk-efl,Just-D/chromium-1,M4sse/chromium.src,hgl888/chromium-crosswalk-efl,chuan9/chromium-crosswalk,dednal/chromium.src,zcbenz/cefode-chromium,PeterWangIntel/chromium-crosswalk,fujunwei/chromium-crosswalk,mohamed--abdel-maksoud/chromium.src,jaruba/chromium.src,anirudhSK/chromium,patrickm/chromium.src,Fireblend/chromium-crosswalk,timopulkkinen/BubbleFish,pozdnyakov/chromium-crosswalk,nacl-webkit/chrome_deps,TheTypoMaster/chromium-crosswalk,nacl-webkit/chrome_deps,junmin-zhu/chromium-rivertrail,hujiajie/pa-chromium,mohamed--abdel-maksoud/chromium.src,TheTypoMaster/chromium-crosswalk,littlstar/chromium.src,hujiajie/pa-chromium,axinging/chromium-crosswalk,Pluto-tv/chromium-crosswalk,TheTypoMaster/chromium-crosswalk,M4sse/chromium.src,M4sse/chromium.src,hujiajie/pa-chromium,ChromiumWebApps/chromium,markYoungH/chromium.src,hujiajie/pa-chromium,ltilve/chromium,ondra-novak/chromium.src,Jonekee/chromium.src,markYoungH/chromium.src,timopulkkinen/BubbleFish,fujunwei/chromium-crosswalk,axinging/chromium-crosswalk,bright-sparks/chromium-spacewalk,keishi/chromium,axinging/chromium-crosswalk,hujiajie/pa-chromium,Jonekee/chromium.src,pozdnyakov/chromium-crosswalk,markYoungH/chromium.src,bright-sparks/chromium-spacewalk,keishi/chromium,chuan9/chromium-crosswalk,markYoungH/chromium.src,M4sse/chromium.src,hgl888/chromium-crosswalk-efl,timopulkkinen/BubbleFish,anirudhSK/chromium,mohamed--abdel-maksoud/chromium.src,TheTypoMaster/chromium-crosswalk,jaruba/chromium.src,dednal/chromium.src,krieger-od/nwjs_chromium.src,patrickm/chromium.src,hujiajie/pa-chromium,patrickm/chromium.src,krieger-od/nwjs_chromium.src,M4sse/chromium.src,fujunwei/chromium-crosswalk,patrickm/chromium.src,mogoweb/chromium-crosswalk,markYoungH/chromium.src,ondra-novak/chromium.src,axinging/chromium-crosswalk,mogoweb/chromium-crosswalk,TheTypoMaster/chromium-crosswalk,mogoweb/chromium-crosswalk,dushu1203/chromium.src,hgl888/chromium-crosswalk,Jonekee/chromium.src,pozdnyakov/chromium-crosswalk,M4sse/chromium.src,markYoungH/chromium.src,zcbenz/cefode-chromium,crosswalk-project/chromium-crosswalk-efl,krieger-od/nwjs_chromium.src,zcbenz/cefode-chromium,ondra-novak/chromium.src,Fireblend/chromium-crosswalk,timopulkkinen/BubbleFish,dushu1203/chromium.src,Pluto-tv/chromium-crosswalk,Chilledheart/chromium,zcbenz/cefode-chromium,chuan9/chromium-crosswalk,hgl888/chromium-crosswalk,littlstar/chromium.src,ChromiumWebApps/chromium,jaruba/chromium.src,krieger-od/nwjs_chromium.src,dushu1203/chromium.src,chuan9/chromium-crosswalk,crosswalk-project/chromium-crosswalk-efl,jaruba/chromium.src,pozdnyakov/chromium-crosswalk,Jonekee/chromium.src,dushu1203/chromium.src,Fireblend/chromium-crosswalk,littlstar/chromium.src,dushu1203/chromium.src,Chilledheart/chromium,jaruba/chromium.src,littlstar/chromium.src,ChromiumWebApps/chromium,nacl-webkit/chrome_deps,mohamed--abdel-maksoud/chromium.src,Chilledheart/chromium,PeterWangIntel/chromium-crosswalk,Fireblend/chromium-crosswalk,M4sse/chromium.src,mohamed--abdel-maksoud/chromium.src,hgl888/chromium-crosswalk-efl,mohamed--abdel-maksoud/chromium.src,ltilve/chromium,zcbenz/cefode-chromium,chuan9/chromium-crosswalk,PeterWangIntel/chromium-crosswalk,krieger-od/nwjs_chromium.src,mogoweb/chromium-crosswalk,zcbenz/cefode-chromium,PeterWangIntel/chromium-crosswalk,TheTypoMaster/chromium-crosswalk,keishi/chromium,Chilledheart/chromium,bright-sparks/chromium-spacewalk,timopulkkinen/BubbleFish,Jonekee/chromium.src,Just-D/chromium-1,axinging/chromium-crosswalk,fujunwei/chromium-crosswalk,M4sse/chromium.src,zcbenz/cefode-chromium,anirudhSK/chromium,keishi/chromium,hgl888/chromium-crosswalk,timopulkkinen/BubbleFish,timopulkkinen/BubbleFish,nacl-webkit/chrome_deps,keishi/chromium,Chilledheart/chromium,ondra-novak/chromium.src,hgl888/chromium-crosswalk-efl,anirudhSK/chromium,crosswalk-project/chromium-crosswalk-efl,markYoungH/chromium.src,crosswalk-project/chromium-crosswalk-efl,Fireblend/chromium-crosswalk,Just-D/chromium-1,bright-sparks/chromium-spacewalk,hgl888/chromium-crosswalk-efl,timopulkkinen/BubbleFish,Fireblend/chromium-crosswalk,nacl-webkit/chrome_deps,hgl888/chromium-crosswalk-efl,ChromiumWebApps/chromium,dushu1203/chromium.src,nacl-webkit/chrome_deps,hujiajie/pa-chromium,junmin-zhu/chromium-rivertrail,ltilve/chromium,krieger-od/nwjs_chromium.src,Fireblend/chromium-crosswalk,keishi/chromium,mohamed--abdel-maksoud/chromium.src,ltilve/chromium,dednal/chromium.src,mohamed--abdel-maksoud/chromium.src,Jonekee/chromium.src,jaruba/chromium.src,anirudhSK/chromium,ChromiumWebApps/chromium,mohamed--abdel-maksoud/chromium.src,Chilledheart/chromium,hgl888/chromium-crosswalk-efl,Pluto-tv/chromium-crosswalk,ChromiumWebApps/chromium,anirudhSK/chromium,dednal/chromium.src,axinging/chromium-crosswalk,hujiajie/pa-chromium,ondra-novak/chromium.src,pozdnyakov/chromium-crosswalk,krieger-od/nwjs_chromium.src,TheTypoMaster/chromium-crosswalk,dushu1203/chromium.src,krieger-od/nwjs_chromium.src,Pluto-tv/chromium-crosswalk,junmin-zhu/chromium-rivertrail,nacl-webkit/chrome_deps,dushu1203/chromium.src,ChromiumWebApps/chromium,ltilve/chromium,anirudhSK/chromium,krieger-od/nwjs_chromium.src,zcbenz/cefode-chromium,jaruba/chromium.src,littlstar/chromium.src,axinging/chromium-crosswalk,timopulkkinen/BubbleFish,krieger-od/nwjs_chromium.src,Just-D/chromium-1,jaruba/chromium.src,junmin-zhu/chromium-rivertrail,mogoweb/chromium-crosswalk,ondra-novak/chromium.src,hujiajie/pa-chromium,nacl-webkit/chrome_deps,keishi/chromium