#include <mapped_resource.h>
Definition at line 15 of file mapped_resource.h.
◆ ElfSnapshot() [1/2]
| dart_utils::ElfSnapshot::ElfSnapshot |
( |
| ) |
|
|
inline |
◆ ~ElfSnapshot()
| dart_utils::ElfSnapshot::~ElfSnapshot |
( |
| ) |
|
◆ ElfSnapshot() [2/2]
| dart_utils::ElfSnapshot::ElfSnapshot |
( |
ElfSnapshot && |
other | ) |
|
|
inline |
Definition at line 19 of file mapped_resource.h.
19 : handle_(other.handle_) {
20 other.handle_ = nullptr;
21 }
◆ IsolateData()
| const uint8_t * dart_utils::ElfSnapshot::IsolateData |
( |
| ) |
const |
|
inline |
◆ IsolateInstrs()
| const uint8_t * dart_utils::ElfSnapshot::IsolateInstrs |
( |
| ) |
const |
|
inline |
◆ Load() [1/2]
| bool dart_utils::ElfSnapshot::Load |
( |
fdio_ns_t * |
namespc, |
|
|
const std::string & |
path |
|
) |
| |
Definition at line 122 of file mapped_resource.cc.
122 {
123 int root_dir = -1;
124 if (namespc == nullptr) {
125 root_dir = AT_FDCWD;
126 } else {
127 root_dir = fdio_ns_opendir(namespc);
128 if (root_dir < 0) {
129 FML_LOG(ERROR) <<
"Failed to open namespace directory";
130 return false;
131 }
132 }
133 return Load(root_dir, path);
134}
bool Load(fdio_ns_t *namespc, const std::string &path)
#define FML_LOG(severity)
References FML_LOG, and Load().
Referenced by dart_runner::CreateServiceIsolate(), Load(), and Load().
◆ Load() [2/2]
| bool dart_utils::ElfSnapshot::Load |
( |
int |
dirfd, |
|
|
const std::string & |
path |
|
) |
| |
Definition at line 136 of file mapped_resource.cc.
136 {
138 if (!fd.is_valid()) {
139 FML_LOG(ERROR) <<
"Failed to open VMO for " <<
path <<
" from dir.";
140 return false;
141 }
143}
static int OpenFdExec(const std::string &path, int dirfd)
DEF_SWITCHES_START aot vmservice shared library Name of the *so containing AOT compiled Dart assets for launching the service isolate vm snapshot The VM snapshot data that will be memory mapped as read only SnapshotAssetPath must be present isolate snapshot The isolate snapshot data that will be memory mapped as read only SnapshotAssetPath must be present cache dir path
References FML_LOG, fml::UniqueObject< T, Traits >::is_valid(), Load(), and dart_utils::OpenFdExec().
◆ operator=()
Definition at line 22 of file mapped_resource.h.
22 {
23 std::swap(handle_, other.handle_);
24 return *this;
25 }
◆ VmData()
| const uint8_t * dart_utils::ElfSnapshot::VmData |
( |
| ) |
const |
|
inline |
◆ VmInstrs()
| const uint8_t * dart_utils::ElfSnapshot::VmInstrs |
( |
| ) |
const |
|
inline |
The documentation for this class was generated from the following files: