mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 960350 - Display untranslated symbols correctly after merging profiles. r=BenWa
Also, set off the pid from the address with a colon instead of hard-coding a field width, in case we ever get >16-bit pids.
This commit is contained in:
parent
497282b936
commit
f94ca8f20d
@ -41,16 +41,19 @@ def MergeProfiles(files):
|
||||
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))
|
||||
# if we had pid=11 sym=1 && pid=1 sym=11.
|
||||
pidStr = 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']
|
||||
oldLoc = frame['location']
|
||||
newLoc = pidStr + oldLoc
|
||||
frame['location'] = newLoc
|
||||
# Default to the unprefixed symbol if no translation is available
|
||||
symTable[newLoc] = oldLoc
|
||||
|
||||
filesyms = fileData['symbolicationTable']
|
||||
for sym in filesyms.keys():
|
||||
|
Loading…
Reference in New Issue
Block a user