Bug 915735 - Part 2: Tickle stdout when linking the PGOed xul.dll; r=ted

This commit is contained in:
Ehsan Akhgari 2013-09-26 16:54:48 -04:00
Родитель 147bd5d62a
Коммит 249ffd9e78
1 изменённых файлов: 9 добавлений и 1 удалений

Просмотреть файл

@ -10,12 +10,20 @@ def measure_vsize_threadfunc(proc, output_file):
"""
Measure the virtual memory usage of |proc| at regular intervals
until it exits, then print the maximum value and write it to
|output_file|.
|output_file|. Also, print something to the console every
half an hour to prevent the build job from getting killed when
linking a large PGOed binary.
"""
maxvsize = 0
idleTime = 0
while proc.returncode is None:
maxvsize, vsize = procmem.get_vmsize(proc._handle)
time.sleep(0.5)
idleTime += 0.5
if idleTime > 30 * 60:
print "Still linking, 30 minutes passed..."
sys.stdout.flush()
idleTime = 0
print "TinderboxPrint: linker max vsize: %d" % maxvsize
with open(output_file, "w") as f:
f.write("%d\n" % maxvsize)