class FinalShutdownInfo

Defined at line 21 of file ../../src/developer/forensics/feedback/reboot_log/final_shutdown_info.h

Encapsulates the final information about why a device shutdown regardless of its source, e.g.

Zircon's shutdown information or shutdown information from userspace.

Public Methods

bool IsOom ()

Whether the reason is "out of memory."

bool IsFatal ()

Whether the reason is deemed fatal.

bool IsCrash ()

Whether the reason justifies a crash report.

std::optional<bool> OptionallyGraceful ()

Whether the reboot is graceful, ungraceful or undetermined.

std::optional<bool> OptionallyPlanned ()

Whether the reboot is planned, unplanned or undetermined.

std::optional<GracefulShutdownAction> ToGracefulShutdownAction ()

Returns the graceful shutdown action, if the shutdown was graceful and the action was

available.

std::string ToRebootReasonString ()

Returns the string representation of the reboot reason.

std::optional<fuchsia::feedback::RebootReason> ToFidlRebootReason ()

Returns the reboot reason, translated into fuchsia::feedback::RebootReason. Returns

std::nullopt if an appropriate translation isn't possible.

cobalt::LastRebootReason ToCobaltLastRebootReason ()

Returns the reboot reason, translated into cobalt::LastRebootReason.

std::string ToCrashProgramName ()

Returns the program name that should be used for the crash.

std::string ToCrashSignature (SpontaneousRebootReason spontaneous_reboot_reason, const std::optional<std::string> & critical_process)

Creates a crash signature for the underlying shutdown reason and action, if applicable.

Note: |critical_process| is only supported for |ZirconRebootReason::kRootJobTermination|.

void ~FinalShutdownInfo ()

Defined at line 23 of file ../../src/developer/forensics/feedback/reboot_log/final_shutdown_info.h