Skip to content

Make thread_getWriteablePointer and thread_getReadablePointer zero-copy #888

@sporksmith

Description

@sporksmith

The thread_get(Readable|Writeable)Pointer interfaces were designed so that the implementations could potentially be zero-copy, but right now they both copy data from the plugin into a Shadow-allocated buffer. Worse, this copy involves syscalls, and for the threadpreload involves context switches between Shadow and the plugin.

In most or all cases, we should be able to arrange for plugin memory that Shadow needs to access to be directly mmap'd in shadow, such that these interfaces should only need to do some arithmetic to translate a plugin-pointer to a shadow-pointer.

Metadata

Metadata

Assignees

Labels

Component: MainComposing the core Shadow executablePriority: HighPrioritized ahead of most other issuesStatus: AcceptedBug is reproducible or effort is allocatedType: EnhancementNew functionality or improved design

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions