class FinalShutdownInfo
Defined at line 64 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
std::unique_ptr<FinalShutdownInfo> MakeFinalShutdownInfo (const HwShutdownReason hw_reason, const ZirconShutdownReason zircon_reason, std::optional<GracefulShutdownInfo> graceful_shutdown_info, const bool not_a_fdr, bool supports_user_initiated_poweroffs)
static
Defined at line 505 of file ../../src/developer/forensics/feedback/reboot_log/final_shutdown_info.cc
void FinalShutdownInfo (FinalShutdownReason reason)
For testing purposes.
Defined at line 33 of file ../../src/developer/forensics/feedback/reboot_log/final_shutdown_info.cc
void FinalShutdownInfo (FinalShutdownReason reason, std::optional<GracefulShutdownAction> graceful_shutdown_action)
Defined at line 36 of file ../../src/developer/forensics/feedback/reboot_log/final_shutdown_info.cc
bool IsOom ()
Whether the reason is "out of memory."
Defined at line 40 of file ../../src/developer/forensics/feedback/reboot_log/final_shutdown_info.cc
bool IsCrash ()
Whether the reason justifies a crash report.
Defined at line 42 of file ../../src/developer/forensics/feedback/reboot_log/final_shutdown_info.cc
std::optional<bool> OptionallyGraceful ()
Whether the reboot is graceful, ungraceful or undetermined.
Defined at line 77 of file ../../src/developer/forensics/feedback/reboot_log/final_shutdown_info.cc
std::optional<bool> OptionallyPlanned ()
Whether the reboot is planned, unplanned or undetermined.
Defined at line 113 of file ../../src/developer/forensics/feedback/reboot_log/final_shutdown_info.cc
std::optional<GracefulShutdownAction> ToGracefulShutdownAction ()
Returns the graceful shutdown action, if the action was available and deemed relevant.
Defined at line 149 of file ../../src/developer/forensics/feedback/reboot_log/final_shutdown_info.cc
std::string ToRebootReasonString ()
Returns the string representation of the reboot reason.
Defined at line 153 of file ../../src/developer/forensics/feedback/reboot_log/final_shutdown_info.cc
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.
TODO(https://fxbug.dev/441569016): Spontaneous reasons shouldn't all map to brief power loss.
Defined at line 214 of file ../../src/developer/forensics/feedback/reboot_log/final_shutdown_info.cc
cobalt::LastRebootReason ToCobaltLastRebootReason ()
Returns the reboot reason, translated into cobalt::LastRebootReason.
Defined at line 273 of file ../../src/developer/forensics/feedback/reboot_log/final_shutdown_info.cc
std::string ToCrashProgramName ()
Returns the program name that should be used for the crash.
Defined at line 334 of file ../../src/developer/forensics/feedback/reboot_log/final_shutdown_info.cc
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 |FinalShutdownReason::kRootJobTermination|.
Defined at line 375 of file ../../src/developer/forensics/feedback/reboot_log/final_shutdown_info.cc