зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1697875 - Annotate headless and backgroundtask mode in crash reports. r=gsvelto
Differential Revision: https://phabricator.services.mozilla.com/D129882
This commit is contained in:
Родитель
864ad2f142
Коммит
7fb2980a43
|
@ -56,6 +56,7 @@ Structure:
|
|||
AvailablePhysicalMemory: <size>, // Windows-only, available physical memory in bytes
|
||||
AvailableSwapMemory: <size>, // macOS- and Linux-only, available swap space
|
||||
AvailableVirtualMemory: <size>, // Windows-only, available virtual memory in bytes
|
||||
BackgroundTaskName: "task_name", // Optional, if the app was invoked in background task mode via `--backgroundtask task_name`
|
||||
BlockedDllList: <list>, // Windows-only, see WindowsDllBlocklist.cpp for details
|
||||
BlocklistInitFailed: "1", // Windows-only, present only if the DLL blocklist initialization failed
|
||||
CrashTime: <time>, // Seconds since the Epoch
|
||||
|
@ -64,6 +65,7 @@ Structure:
|
|||
EventLoopNestingLevel: <levels>, // Optional, present only if >0, indicates the nesting level of the event-loop
|
||||
ExperimentalFeatures: <features>, // Optional, a comma-separated string that specifies the enabled experimental features from about:preferences#experimental
|
||||
GPUProcessLaunchCount: <num>, // Number of times the GPU process was launched
|
||||
HeadlessMode: "1", // Optional, "1" if the app was invoked in headless mode via `--headless ...` or `--backgroundtask ...`
|
||||
ipc_channel_error: <error string>, // Optional, contains the string processing error reason for an ipc-based content crash
|
||||
IsGarbageCollecting: "1", // Optional, if set indicates that the crash occurred while the garbage collector was running
|
||||
LowCommitSpaceEvents: <num>, // Windows-only, present only if >0, number of low commit space events detected by the available memory tracker
|
||||
|
@ -241,4 +243,4 @@ Version History
|
|||
and ProfilerChildShutdownPhase (`bug 1704680 <https://bugzilla.mozilla.org/show_bug.cgi?id=1704680>`_).
|
||||
- Firefox 90: Removed MemoryErrorCorrection (`bug 1710152 <https://bugzilla.mozilla.org/show_bug.cgi?id=1710152>`_)
|
||||
and added WindowsErrorReporting (`bug 1703761 <https://bugzilla.mozilla.org/show_bug.cgi?id=1703761>`_).
|
||||
|
||||
- Firefox 95: Added HeadlessMode and BackgroundTaskName (`bug 1697875 <https://bugzilla.mozilla.org/show_bug.cgi?id=1697875>`_)
|
||||
|
|
|
@ -143,6 +143,17 @@ AvailableVirtualMemory:
|
|||
type: string
|
||||
ping: true
|
||||
|
||||
BackgroundTaskMode:
|
||||
description: >
|
||||
True if the app was invoked in background task mode via `--backgroundtask ...`, false otherwise.
|
||||
type: boolean
|
||||
|
||||
BackgroundTaskName:
|
||||
description: >
|
||||
If the app was invoked in background task mode via `--backgroundtask <task name>`, the string "task name".
|
||||
type: string
|
||||
ping: true
|
||||
|
||||
BlockedDllList:
|
||||
description: >
|
||||
Comma-separated list of blocked DLLS, Windows-only
|
||||
|
@ -347,6 +358,12 @@ GraphicsStartupTest:
|
|||
Set to 1 by the graphics driver crash guard when it's activated.
|
||||
type: boolean
|
||||
|
||||
HeadlessMode:
|
||||
description: >
|
||||
True if the app was invoked in headless mode via `--headless ...` or `--backgroundtask ...`, false otherwise.
|
||||
type: boolean
|
||||
ping: true
|
||||
|
||||
PHCKind:
|
||||
description: >
|
||||
The allocation kind, if the crash involved a bad access of a special PHC
|
||||
|
|
|
@ -12,6 +12,9 @@ add_task(async function run_test() {
|
|||
{ TestKey: "TestValue" },
|
||||
function(mdump, extra) {
|
||||
Assert.equal(extra.TestKey, "TestValue");
|
||||
Assert.equal(extra.BackgroundTaskMode, "1");
|
||||
Assert.equal(extra.BackgroundTaskName, "crash");
|
||||
Assert.equal(extra.HeadlessMode, "1");
|
||||
Assert.equal(false, "OOMAllocationSize" in extra);
|
||||
Assert.equal(false, "JSOutOfMemory" in extra);
|
||||
Assert.equal(false, "JSLargeAllocationFailure" in extra);
|
||||
|
|
|
@ -3812,6 +3812,21 @@ int XREMain::XRE_mainInit(bool* aExitFlag) {
|
|||
}
|
||||
#endif
|
||||
|
||||
bool isBackgroundTaskMode = false;
|
||||
#ifdef MOZ_BACKGROUNDTASKS
|
||||
Maybe<nsCString> backgroundTasks = BackgroundTasks::GetBackgroundTasks();
|
||||
if (backgroundTasks.isSome()) {
|
||||
isBackgroundTaskMode = true;
|
||||
CrashReporter::AnnotateCrashReport(
|
||||
CrashReporter::Annotation::BackgroundTaskName, backgroundTasks.ref());
|
||||
}
|
||||
#endif
|
||||
CrashReporter::AnnotateCrashReport(
|
||||
CrashReporter::Annotation::BackgroundTaskMode, isBackgroundTaskMode);
|
||||
|
||||
CrashReporter::AnnotateCrashReport(CrashReporter::Annotation::HeadlessMode,
|
||||
gfxPlatform::IsHeadless());
|
||||
|
||||
CrashReporter::SetRestartArgs(gArgc, gArgv);
|
||||
|
||||
// annotate other data (user id etc)
|
||||
|
|
Загрузка…
Ссылка в новой задаче