pub struct Target { /* private fields */ }
Expand description
Event target, the process (or cgroup) and CPU to monitor.
To create an event target, combine these types in a tuple: Proc
(or Cgroup
), Cpu
and All
.
For example, we want to monitor process with pid 12345 on all CPUs: (Pid(12345), Cpu::ALL)
.
The order of types in the tuples is not senstive because we impl Into<Target>
for these
swapped tuples, e.g. (Cpu::ALL, Pid(12345))
has the same semantics as the example above.
This design limits what we can monitor at compile time. For example, the kernel not support monitoring any process on all CPUs, or a cgroup on all CPUs.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Target
impl RefUnwindSafe for Target
impl Send for Target
impl Sync for Target
impl Unpin for Target
impl UnwindSafe for Target
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