class FinalShutdownInfo
Defined at line 68 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
const std::optional<zx::duration> & Uptime ()
Defined at line 129 of file ../../src/developer/forensics/feedback/reboot_log/final_shutdown_info.h
const std::optional<zx::duration> & Runtime ()
Defined at line 130 of file ../../src/developer/forensics/feedback/reboot_log/final_shutdown_info.h
FinalShutdownInfo MakeFinalShutdownInfo (const HwShutdownReasonhw_reason,const ZirconShutdownReasonzircon_reason,std::optional<GracefulShutdownInfo>graceful_shutdown_info,const boolnot_a_fdr,boolsupports_user_initiated_poweroffs,std::optional<zx::duration>uptime,std::optional<zx::duration>runtime,const std::optional<std::string> &critical_process)
static
Defined at line 696 of file ../../src/developer/forensics/feedback/reboot_log/final_shutdown_info.cc
void FinalShutdownInfo (FinalShutdownReason reason)
For testing purposes.
Defined at line 146 of file ../../src/developer/forensics/feedback/reboot_log/final_shutdown_info.cc
void FinalShutdownInfo (FinalShutdownReason reason, std::optional<GracefulShutdownAction> graceful_shutdown_action)
For testing purposes.
Defined at line 153 of file ../../src/developer/forensics/feedback/reboot_log/final_shutdown_info.cc
void FinalShutdownInfo (FinalShutdownReasonreason,std::optional<GracefulShutdownAction>graceful_shutdown_action,std::optional<zx::duration>uptime,std::optional<zx::duration>runtime)
A graceful shutdown.
Defined at line 161 of file ../../src/developer/forensics/feedback/reboot_log/final_shutdown_info.cc
void FinalShutdownInfo (FinalShutdownReasonreason,std::optional<zx::duration>uptime,std::optional<zx::duration>runtime)
An ungraceful shutdown that shouldn't have a critical process.
Defined at line 171 of file ../../src/developer/forensics/feedback/reboot_log/final_shutdown_info.cc
void FinalShutdownInfo (FinalShutdownReasonreason,std::optional<zx::duration>uptime,std::optional<zx::duration>runtime,std::optional<std::string>critical_process)
A root job termination shutdown that should have a critical process, barring parsing failures.
Defined at line 179 of file ../../src/developer/forensics/feedback/reboot_log/final_shutdown_info.cc
bool IsOom ()
Whether the reason is "out of memory."
Defined at line 192 of file ../../src/developer/forensics/feedback/reboot_log/final_shutdown_info.cc
bool IsCrash ()
Whether the reason justifies a crash report.
Defined at line 194 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 232 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 271 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 310 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 314 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 381 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 446 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 513 of file ../../src/developer/forensics/feedback/reboot_log/final_shutdown_info.cc
std::string ToCrashSignature (SpontaneousRebootReason spontaneous_reboot_reason)
Creates a crash signature for the underlying shutdown reason and action, if applicable.
Defined at line 557 of file ../../src/developer/forensics/feedback/reboot_log/final_shutdown_info.cc
std::string ToSnapshotAnnotationReason (SpontaneousRebootReason spontaneous_reboot_reason)
Defined at line 775 of file ../../src/developer/forensics/feedback/reboot_log/final_shutdown_info.cc
ErrorOrString ToSnapshotAnnotationUptime ()
Defined at line 842 of file ../../src/developer/forensics/feedback/reboot_log/final_shutdown_info.cc
ErrorOrString ToSnapshotAnnotationRuntime ()
Defined at line 853 of file ../../src/developer/forensics/feedback/reboot_log/final_shutdown_info.cc
ErrorOrString ToSnapshotAnnotationTotalSuspendedTime ()
Defined at line 864 of file ../../src/developer/forensics/feedback/reboot_log/final_shutdown_info.cc
ErrorOrString ToSnapshotAnnotationGracefulAction ()
Defined at line 875 of file ../../src/developer/forensics/feedback/reboot_log/final_shutdown_info.cc
std::string ToJson ()
Defined at line 896 of file ../../src/developer/forensics/feedback/reboot_log/final_shutdown_info.cc
FinalShutdownInfo FromJson (const std::string & content)
Defined at line 926 of file ../../src/developer/forensics/feedback/reboot_log/final_shutdown_info.cc