Commit 9d4124ae authored by Michael van Ouwerkerk's avatar Michael van Ouwerkerk Committed by Commit Bot

Set dynamic module dex name in crash keys.

Bug: 924118, 956031
Change-Id: I7876e83dff4bf0cf2a68dd3926760f295c3126de
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1578549
Commit-Queue: Michael van Ouwerkerk <mvanouwerkerk@chromium.org>
Reviewed-by: default avatarAnna Malova <amalova@chromium.org>
Reviewed-by: default avatarPeter Wen <wnwen@chromium.org>
Cr-Commit-Position: refs/heads/master@{#653557}
parent a36adb3b
...@@ -518,6 +518,7 @@ public class ModuleLoader { ...@@ -518,6 +518,7 @@ public class ModuleLoader {
CrashKeys crashKeys = CrashKeys.getInstance(); CrashKeys crashKeys = CrashKeys.getInstance();
crashKeys.set(CrashKeyIndex.LOADED_DYNAMIC_MODULE, mModuleId); crashKeys.set(CrashKeyIndex.LOADED_DYNAMIC_MODULE, mModuleId);
crashKeys.set(CrashKeyIndex.ACTIVE_DYNAMIC_MODULE, mModuleId); crashKeys.set(CrashKeyIndex.ACTIVE_DYNAMIC_MODULE, mModuleId);
crashKeys.set(CrashKeyIndex.DYNAMIC_MODULE_DEX_NAME, mDexAssetName);
ModuleMetrics.registerLifecycleState(ModuleMetrics.LifecycleState.INSTANTIATED); ModuleMetrics.registerLifecycleState(ModuleMetrics.LifecycleState.INSTANTIATED);
......
...@@ -21,6 +21,7 @@ JavaCrashKey& GetCrashKey(int index) { ...@@ -21,6 +21,7 @@ JavaCrashKey& GetCrashKey(int index) {
{"application_status", JavaCrashKey::Tag::kArray}, {"application_status", JavaCrashKey::Tag::kArray},
{"installed_modules", JavaCrashKey::Tag::kArray}, {"installed_modules", JavaCrashKey::Tag::kArray},
{"emulated_modules", JavaCrashKey::Tag::kArray}, {"emulated_modules", JavaCrashKey::Tag::kArray},
{"dynamic_module_dex_name", JavaCrashKey::Tag::kArray},
}; };
static_assert( static_assert(
base::size(crash_keys) == static_cast<size_t>(CrashKeyIndex::NUM_KEYS), base::size(crash_keys) == static_cast<size_t>(CrashKeyIndex::NUM_KEYS),
......
...@@ -16,6 +16,7 @@ enum class CrashKeyIndex { ...@@ -16,6 +16,7 @@ enum class CrashKeyIndex {
APPLICATION_STATUS, APPLICATION_STATUS,
INSTALLED_MODULES, INSTALLED_MODULES,
EMULATED_MODULES, EMULATED_MODULES,
DYNAMIC_MODULE_DEX_NAME,
NUM_KEYS NUM_KEYS
}; };
......
...@@ -22,8 +22,9 @@ import java.util.concurrent.atomic.AtomicReferenceArray; ...@@ -22,8 +22,9 @@ import java.util.concurrent.atomic.AtomicReferenceArray;
* The crash keys will only be included in browser process crash reports. * The crash keys will only be included in browser process crash reports.
*/ */
public class CrashKeys { public class CrashKeys {
private static final String[] KEYS = new String[] {"loaded_dynamic_module", private static final String[] KEYS =
"active_dynamic_module", "application_status", "installed_modules", "emulated_modules"}; new String[] {"loaded_dynamic_module", "active_dynamic_module", "application_status",
"installed_modules", "emulated_modules", "dynamic_module_dex_name"};
private final AtomicReferenceArray<String> mValues = new AtomicReferenceArray<>(KEYS.length); private final AtomicReferenceArray<String> mValues = new AtomicReferenceArray<>(KEYS.length);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment