|
@@ -900,6 +900,11 @@ class LocalNodeController(NodeController):
|
|
|
cmdline.append('--log-file={}'.format(self._env['valgrind_log']))
|
|
|
#
|
|
|
add_environ_vars = self._env['add_environ_vars']
|
|
|
+ if add_environ_vars is not None:
|
|
|
+ add_environ_vars = add_environ_vars.copy()
|
|
|
+ #
|
|
|
+ if self._env['google_cpu_profiler'] is True:
|
|
|
+ add_environ_vars['CPUPROFILE'] = os.path.join(self._env['dir'], 'cpu-prof.out')
|
|
|
#
|
|
|
cmdline.extend([
|
|
|
tor_path,
|
|
@@ -1101,6 +1106,7 @@ DEFAULTS = {
|
|
|
'valgrind_settings': None,
|
|
|
'add_environ_vars': None,
|
|
|
'log_files': ['notice', 'info', 'debug'],
|
|
|
+ 'google_cpu_profiler': False,
|
|
|
}
|
|
|
|
|
|
|