class FinalShutdownInfo
Defined at line 67 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 128 of file ../../src/developer/forensics/feedback/reboot_log/final_shutdown_info.h
const std::optional<zx::duration> & Runtime ()
Defined at line 129 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 679 of file ../../src/developer/forensics/feedback/reboot_log/final_shutdown_info.cc
void FinalShutdownInfo (FinalShutdownReason reason)
For testing purposes.
Defined at line 143 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 150 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 158 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 168 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 176 of file ../../src/developer/forensics/feedback/reboot_log/final_shutdown_info.cc
bool IsOom ()
Whether the reason is "out of memory."
Defined at line 189 of file ../../src/developer/forensics/feedback/reboot_log/final_shutdown_info.cc
bool IsCrash ()
Whether the reason justifies a crash report.
Defined at line 191 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 228 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 266 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 304 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 308 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 373 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 436 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 501 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 544 of file ../../src/developer/forensics/feedback/reboot_log/final_shutdown_info.cc
std::string ToSnapshotAnnotationReason (SpontaneousRebootReason spontaneous_reboot_reason)
Defined at line 758 of file ../../src/developer/forensics/feedback/reboot_log/final_shutdown_info.cc
ErrorOrString ToSnapshotAnnotationUptime ()
Defined at line 823 of file ../../src/developer/forensics/feedback/reboot_log/final_shutdown_info.cc
ErrorOrString ToSnapshotAnnotationRuntime ()
Defined at line 834 of file ../../src/developer/forensics/feedback/reboot_log/final_shutdown_info.cc
ErrorOrString ToSnapshotAnnotationTotalSuspendedTime ()
Defined at line 845 of file ../../src/developer/forensics/feedback/reboot_log/final_shutdown_info.cc
ErrorOrString ToSnapshotAnnotationGracefulAction ()
Defined at line 856 of file ../../src/developer/forensics/feedback/reboot_log/final_shutdown_info.cc
std::string ToJson ()
Defined at line 877 of file ../../src/developer/forensics/feedback/reboot_log/final_shutdown_info.cc
FinalShutdownInfo FromJson (const std::string & content)
Defined at line 907 of file ../../src/developer/forensics/feedback/reboot_log/final_shutdown_info.cc