Flutter Engine
The Flutter Engine
Classes | Static Public Member Functions | List of all members
dart::OS Class Reference

#include <os.h>

Classes

struct  BuildId
 

Static Public Member Functions

static const char * Name ()
 
static intptr_t ProcessId ()
 
static const char * GetTimeZoneName (int64_t seconds_since_epoch)
 
static int GetTimeZoneOffsetInSeconds (int64_t seconds_since_epoch)
 
static int64_t GetCurrentTimeMillis ()
 
static int64_t GetCurrentTimeMicros ()
 
static int64_t GetCurrentMonotonicMicros ()
 
static int64_t GetCurrentMonotonicTicks ()
 
static int64_t GetCurrentMonotonicFrequency ()
 
static int64_t GetCurrentThreadCPUMicros ()
 
static int64_t GetCurrentMonotonicMicrosForTimeline ()
 
static intptr_t ActivationFrameAlignment ()
 
static int NumberOfAvailableProcessors ()
 
static void Sleep (int64_t millis)
 
static void SleepMicros (int64_t micros)
 
static void DebugBreak ()
 
static uintptr_t GetProgramCounter ()
 
static void Print (const char *format,...) PRINTF_ATTRIBUTE(1
 
static void static void PrintErr (const char *format,...) PRINTF_ATTRIBUTE(1
 
static void static void static void VFPrint (FILE *stream, const char *format, va_list args)
 
static char * SCreate (Zone *zone, const char *format,...) PRINTF_ATTRIBUTE(2
 
static char static char * VSCreate (Zone *zone, const char *format, va_list args)
 
static bool StringToInt64 (const char *str, int64_t *value)
 
static void RegisterCodeObservers ()
 
static void Init ()
 
static void Cleanup ()
 
static void PrepareToAbort ()
 
static DART_NORETURN void Abort ()
 
static DART_NORETURN void Exit (int code)
 
static const uint8_t * GetAppDSOBase (const uint8_t *snapshot_instructions)
 
static uword GetAppDSOBase (uword snapshot_instructions)
 
static BuildId GetAppBuildId (const uint8_t *snapshot_instructions)
 
static BuildId GetAppBuildId (uword snapshot_instructions)
 

Detailed Description

Definition at line 19 of file os.h.

Member Function Documentation

◆ Abort()

static DART_NORETURN void dart::OS::Abort ( )
static

◆ ActivationFrameAlignment()

static intptr_t dart::OS::ActivationFrameAlignment ( )
static

◆ Cleanup()

static void dart::OS::Cleanup ( )
static

◆ DebugBreak()

static void dart::OS::DebugBreak ( )
static

◆ Exit()

static DART_NORETURN void dart::OS::Exit ( int  code)
static

◆ GetAppBuildId() [1/2]

static BuildId dart::OS::GetAppBuildId ( const uint8_t *  snapshot_instructions)
static

◆ GetAppBuildId() [2/2]

static BuildId dart::OS::GetAppBuildId ( uword  snapshot_instructions)
inlinestatic

Definition at line 139 of file os.h.

139 {
140 return GetAppBuildId(
141 reinterpret_cast<const uint8_t*>(snapshot_instructions));
142 }
static BuildId GetAppBuildId(const uint8_t *snapshot_instructions)

◆ GetAppDSOBase() [1/2]

const uint8_t * dart::OS::GetAppDSOBase ( const uint8_t *  snapshot_instructions)
static

Definition at line 13 of file os.cc.

13 {
14 // Use the relocated address in the Image if the snapshot was compiled
15 // directly to ELF.
16 const Image instructions_image(snapshot_instructions);
17 if (instructions_image.compiled_to_elf()) {
18 return snapshot_instructions -
19 instructions_image.instructions_relocated_address();
20 }
21 uword dso_base;
23 reinterpret_cast<uword>(snapshot_instructions), &dso_base)) {
24 return reinterpret_cast<const uint8_t*>(dso_base);
25 }
27 return nullptr;
28}
static bool LookupSharedObject(uword pc, uword *dso_base=nullptr, const char **dso_name=nullptr)
#define UNIMPLEMENTED
uintptr_t uword
Definition: globals.h:501
CanvasImage Image
Definition: dart_ui.cc:55

◆ GetAppDSOBase() [2/2]

static uword dart::OS::GetAppDSOBase ( uword  snapshot_instructions)
inlinestatic

Definition at line 125 of file os.h.

125 {
126 return reinterpret_cast<uword>(
127 GetAppDSOBase(reinterpret_cast<const uint8_t*>(snapshot_instructions)));
128 }
static const uint8_t * GetAppDSOBase(const uint8_t *snapshot_instructions)
Definition: os.cc:13

◆ GetCurrentMonotonicFrequency()

static int64_t dart::OS::GetCurrentMonotonicFrequency ( )
static

◆ GetCurrentMonotonicMicros()

static int64_t dart::OS::GetCurrentMonotonicMicros ( )
static

◆ GetCurrentMonotonicMicrosForTimeline()

static int64_t dart::OS::GetCurrentMonotonicMicrosForTimeline ( )
static

◆ GetCurrentMonotonicTicks()

static int64_t dart::OS::GetCurrentMonotonicTicks ( )
static

◆ GetCurrentThreadCPUMicros()

static int64_t dart::OS::GetCurrentThreadCPUMicros ( )
static

◆ GetCurrentTimeMicros()

static int64_t dart::OS::GetCurrentTimeMicros ( )
static

◆ GetCurrentTimeMillis()

static int64_t dart::OS::GetCurrentTimeMillis ( )
static

◆ GetProgramCounter()

static uintptr_t dart::OS::GetProgramCounter ( )
static

◆ GetTimeZoneName()

static const char * dart::OS::GetTimeZoneName ( int64_t  seconds_since_epoch)
static

◆ GetTimeZoneOffsetInSeconds()

static int dart::OS::GetTimeZoneOffsetInSeconds ( int64_t  seconds_since_epoch)
static

◆ Init()

static void dart::OS::Init ( )
static

◆ Name()

static const char * dart::OS::Name ( )
inlinestatic

Definition at line 22 of file os.h.

22{ return kHostOperatingSystemName; }

◆ NumberOfAvailableProcessors()

static int dart::OS::NumberOfAvailableProcessors ( )
static

◆ PrepareToAbort()

static void dart::OS::PrepareToAbort ( )
static

◆ Print()

static void dart::OS::Print ( const char *  format,
  ... 
)
static

◆ PrintErr()

static void static void dart::OS::PrintErr ( const char *  format,
  ... 
)
static

◆ ProcessId()

static intptr_t dart::OS::ProcessId ( )
static

◆ RegisterCodeObservers()

static void dart::OS::RegisterCodeObservers ( )
static

◆ SCreate()

static char * dart::OS::SCreate ( Zone zone,
const char *  format,
  ... 
)
static

◆ Sleep()

static void dart::OS::Sleep ( int64_t  millis)
static

◆ SleepMicros()

static void dart::OS::SleepMicros ( int64_t  micros)
static

◆ StringToInt64()

static bool dart::OS::StringToInt64 ( const char *  str,
int64_t *  value 
)
static

◆ VFPrint()

static void static void static void dart::OS::VFPrint ( FILE *  stream,
const char *  format,
va_list  args 
)
static

◆ VSCreate()

static char static char * dart::OS::VSCreate ( Zone zone,
const char *  format,
va_list  args 
)
static

The documentation for this class was generated from the following files: