зеркало из https://github.com/mozilla/gecko-dev.git
Bug 918581 - Extend merge-profile.py to support secondary threads. r=vlad
--HG-- extra : rebase_source : 28357bbb17b15c7cb40c53ee3442bc6366fcf015
This commit is contained in:
Родитель
7afa961994
Коммит
906e0daa78
|
@ -36,27 +36,27 @@ def MergeProfiles(files):
|
|||
minStartTime = min(minStartTime, fileData['profileJSON']['meta']['startTime'])
|
||||
meta['startTime'] = minStartTime
|
||||
|
||||
thread = fileData['profileJSON']['threads'][0]
|
||||
thread['name'] = pname + " (" + pid + ")"
|
||||
threads.append(thread)
|
||||
for thread in fileData['profileJSON']['threads']:
|
||||
thread['name'] = thread['name'] + " (" + pname + ":" + pid + ")"
|
||||
threads.append(thread)
|
||||
|
||||
# Note that pid + sym, pid + location could be ambigious
|
||||
# if we had pid=11 sym=1 && pid=1 sym=11. To avoid this we format
|
||||
# pidStr with leading zeros.
|
||||
pidStr = "%05d" % (int(pid))
|
||||
# Note that pid + sym, pid + location could be ambigious
|
||||
# if we had pid=11 sym=1 && pid=1 sym=11. To avoid this we format
|
||||
# pidStr with leading zeros.
|
||||
pidStr = "%05d" % (int(pid))
|
||||
|
||||
thread['startTime'] = fileData['profileJSON']['meta']['startTime']
|
||||
samples = thread['samples']
|
||||
for sample in thread['samples']:
|
||||
for frame in sample['frames']:
|
||||
if "location" in frame and frame['location'][0:2] == '0x':
|
||||
frame['location'] = pidStr + frame['location']
|
||||
thread['startTime'] = fileData['profileJSON']['meta']['startTime']
|
||||
samples = thread['samples']
|
||||
for sample in thread['samples']:
|
||||
for frame in sample['frames']:
|
||||
if "location" in frame and frame['location'][0:2] == '0x':
|
||||
frame['location'] = pidStr + frame['location']
|
||||
|
||||
filesyms = fileData['symbolicationTable']
|
||||
for sym in filesyms.keys():
|
||||
symTable[pidStr + sym] = filesyms[sym]
|
||||
|
||||
# For each process, make the time offsets line up based on the
|
||||
# For each thread, make the time offsets line up based on the
|
||||
# earliest start
|
||||
for thread in threads:
|
||||
delta = thread['startTime'] - minStartTime
|
||||
|
|
Загрузка…
Ссылка в новой задаче