Update profiling instructions for raylet (#3311)

This commit is contained in:
Philipp Moritz
2018-11-13 14:48:33 -08:00
committed by Robert Nishihara
parent 97f423781b
commit d4fad222e1
2 changed files with 14 additions and 42 deletions
+6
View File
@@ -971,6 +971,12 @@ def start_raylet(redis_address,
["valgrind", "--tool=callgrind"] + command,
stdout=stdout_file,
stderr=stderr_file)
elif "RAYLET_PERFTOOLS_PATH" in os.environ:
modified_env = os.environ.copy()
modified_env["LD_PRELOAD"] = os.environ["RAYLET_PERFTOOLS_PATH"]
modified_env["CPUPROFILE"] = os.environ["RAYLET_PERFTOOLS_LOGFILE"]
pid = subprocess.Popen(
command, stdout=stdout_file, stderr=stderr_file, env=modified_env)
else:
pid = subprocess.Popen(command, stdout=stdout_file, stderr=stderr_file)