| Index: tools/telemetry/telemetry/internal/platform/profiler/java_heap_profiler.py
|
| diff --git a/tools/telemetry/telemetry/internal/platform/profiler/java_heap_profiler.py b/tools/telemetry/telemetry/internal/platform/profiler/java_heap_profiler.py
|
| index 49307cbea644ebe3fe77283da0857f0033ead417..5ca082a29357452ff113e6d55507b31d8f9d318e 100644
|
| --- a/tools/telemetry/telemetry/internal/platform/profiler/java_heap_profiler.py
|
| +++ b/tools/telemetry/telemetry/internal/platform/profiler/java_heap_profiler.py
|
| @@ -7,15 +7,15 @@ import os
|
| import subprocess
|
| import threading
|
|
|
| +from telemetry.core import platform
|
| from telemetry.core import util
|
| from telemetry.internal.backends.chrome import android_browser_finder
|
| from telemetry.internal.platform import profiler
|
| +from telemetry.internal.util import binary_manager
|
|
|
| try:
|
| from devil.android import device_errors # pylint: disable=import-error
|
| - from pylib import constants # pylint: disable=import-error
|
| except ImportError:
|
| - constants = None
|
| device_errors = None
|
|
|
|
|
| @@ -61,8 +61,10 @@ class JavaHeapProfiler(profiler.Profiler):
|
| if os.path.splitext(f)[1] == '.aprof':
|
| input_file = os.path.join(self._output_path, f)
|
| output_file = input_file.replace('.aprof', '.hprof')
|
| - hprof_conv = os.path.join(constants.ANDROID_SDK_ROOT,
|
| - 'tools', 'hprof-conv')
|
| + hprof_conv = binary_manager.FetchPath(
|
| + 'hprof-conv',
|
| + platform.GetHostPlatform().GetArchName(),
|
| + platform.GetHostPlatform().GetOSName())
|
| subprocess.call([hprof_conv, input_file, output_file])
|
| output_files.append(output_file)
|
| return output_files
|
|
|