Helper function to write `bytes` to the jitdump file. This is effectively a workaround for the limitation of the jitdump file format. Ideally Wasmtime would be writing to its own personal file and wouldn't have to worry about concurrent modifications, but we don't have the luxury of doing that. The jitdump file format requires that there's a single file-per-process with records in it. Additionall
(&self, bytes: &[u8])
| 237 | /// lieu of some actual synchronization protocol between engines though this |
| 238 | /// is about the best that we can do. |
| 239 | fn maybe_atomic_write_all(&self, bytes: &[u8]) -> io::Result<()> { |
| 240 | (&self.jitdump_file).write_all(bytes)?; |
| 241 | Ok(()) |
| 242 | } |
| 243 | |
| 244 | fn maybe_write_file_header(&self) -> io::Result<()> { |
| 245 | let header = FileHeader { |
no test coverage detected