Method

SysprofCaptureWritersave_as

Declaration [src]

bool
sysprof_capture_writer_save_as (
  SysprofCaptureWriter* self,
  const char* filename
)

Description [src]

Saves the captured data as the file filename.

This is primarily useful if the writer was created with a memory-backed file-descriptor such as a memfd or tmpfs file on Linux.

errno is set on error, to any of the errors returned by open(), sysprof_capture_writer_flush(), lseek() or sendfile().

Parameters

filename

Type: const char*

The file to save the capture as.

The data is owned by the caller of the method.
The value is a NUL terminated UTF-8 string.

Return value

Type: bool

TRUE if successful, otherwise FALSE and errno is set.