mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-08 02:14:43 +00:00
Make split-profile run jprof in the directory with the jprof-log. No bug.
This commit is contained in:
parent
5893d8a315
commit
5d62e2d221
@ -93,7 +93,14 @@ def generate_profile(options, destfile):
|
||||
args = [jprof] + options + passthrough
|
||||
print "Generating {0}".format(destfile)
|
||||
destio = open(destfile, "w")
|
||||
process = subprocess.Popen(args, stdout=destio)
|
||||
# jprof expects the "jprof-map" file to be in its current working directory
|
||||
cwd = None
|
||||
for option in passthrough:
|
||||
if option.find("jprof-log"):
|
||||
cwd = os.path.dirname(option)
|
||||
if cwd is None:
|
||||
raise StandardError("no jprof-log option given")
|
||||
process = subprocess.Popen(args, stdout=destio, cwd=cwd)
|
||||
process.wait()
|
||||
destio.close()
|
||||
if process.returncode != 0:
|
||||
|
Loading…
Reference in New Issue
Block a user