| Index: tools/telemetry/telemetry/core/platform/profiler/android_profiling_helper.py
|
| diff --git a/tools/telemetry/telemetry/core/platform/profiler/android_profiling_helper.py b/tools/telemetry/telemetry/core/platform/profiler/android_profiling_helper.py
|
| index f2e21440385eb434bb870307841356d9be3dcbbc..bb9228f9b38f79a45af78dad12a49320a14e32c4 100644
|
| --- a/tools/telemetry/telemetry/core/platform/profiler/android_profiling_helper.py
|
| +++ b/tools/telemetry/telemetry/core/platform/profiler/android_profiling_helper.py
|
| @@ -11,6 +11,11 @@ import re
|
| import shutil
|
| import subprocess
|
|
|
| +try:
|
| + import sqlite3
|
| +except ImportError:
|
| + sqlite3 = None
|
| +
|
| from telemetry.core import util
|
| from telemetry.core.platform.profiler import android_prebuilt_profiler_helper
|
|
|
| @@ -109,6 +114,27 @@ def GetRequiredLibrariesForPerfProfile(profile_file):
|
| return libs
|
|
|
|
|
| +def GetRequiredLibrariesForVTuneProfile(profile_file):
|
| + """Returns the set of libraries necessary to symbolize a given VTune profile.
|
| +
|
| + Args:
|
| + profile_file: Path to VTune profile to analyse.
|
| +
|
| + Returns:
|
| + A set of required library file names.
|
| + """
|
| + db_file = os.path.join(profile_file, 'sqlite-db', 'dicer.db')
|
| + conn = sqlite3.connect(db_file)
|
| +
|
| + try:
|
| + # The 'dd_module_file' table lists all libraries on the device. Only the
|
| + # ones with 'bin_located_path' are needed for the profile.
|
| + query = 'SELECT bin_path, bin_located_path FROM dd_module_file'
|
| + return set(row[0] for row in conn.cursor().execute(query) if row[1])
|
| + finally:
|
| + conn.close()
|
| +
|
| +
|
| def CreateSymFs(device, symfs_dir, libraries, use_symlinks=True):
|
| """Creates a symfs directory to be used for symbolizing profiles.
|
|
|
|
|