pub struct Comm<'a> {
pub pid: u32,
pub tid: u32,
pub comm: Cow<'a, [u8]>,
}
Expand description
COMM records indicate changes in process names.
There are multiple ways that this could happen: execve(2)
,
prctl(PR_SET_NAME)
, as well as writing to /proc/self/comm
.
Since Linux 3.10 the kernel will set the COMM_EXEC
bit in the misc flags
if the record is due to an execve(2)
syscall. You can set comm_exec
when building to detect whether this is supported.
This struct corresponds to PERF_RECORD_COMM
. See the manpage for more
documentation.
Fields§
§pid: u32
The process ID.
tid: u32
The thread ID.
comm: Cow<'a, [u8]>
The new name of the process.
If on unix systems you can use comm_os
to get this as an OsStr
.
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl<'a> Freeze for Comm<'a>
impl<'a> RefUnwindSafe for Comm<'a>
impl<'a> Send for Comm<'a>
impl<'a> Sync for Comm<'a>
impl<'a> Unpin for Comm<'a>
impl<'a> UnwindSafe for Comm<'a>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more