Struct perfcnt::linux::PerfCounterBuilderLinux
[−]
[src]
pub struct PerfCounterBuilderLinux { // some fields omitted }
Methods
impl PerfCounterBuilderLinux
[src]
fn from_hardware_event(event: HardwareEventType) -> PerfCounterBuilderLinux
Instantiate a generic performance counter for hardware events as defined by the Linux interface.
fn from_software_event(event: SoftwareEventType) -> PerfCounterBuilderLinux
Instantiate a generic performance counter for software events as defined by the Linux interface.
fn from_cache_event(cache_id: CacheId, cache_op_id: CacheOpId, cache_op_result_id: CacheOpResultId) -> PerfCounterBuilderLinux
Instantiate a generic performance counter for software events as defined by the Linux interface.
fn from_intel_event_description(counter: &IntelPerformanceCounterDescription) -> PerfCounterBuilderLinux
Instantiate a H/W performance counter using a hardware event as described in Intels SDM.
fn set_group<'a>(&'a mut self, group_fd: isize) -> &'a mut PerfCounterBuilderLinux
Set counter group.
fn set_flag_fd_output<'a>(&'a mut self) -> &'a mut PerfCounterBuilderLinux
Sets PERF_FLAG_FD_OUTPUT
This flag re-routes the output from an event to the group leader.
fn set_flag_pid_cgroup<'a>(&'a mut self) -> &'a mut PerfCounterBuilderLinux
Sets PERF_FLAG_PID_CGROUP
This flag activates per-container system-wide monitoring. A container is an abstraction that isolates a set of resources for finer grain control (CPUs, memory, etc.). In this mode, the event is measured only if the thread running on the monitored CPU belongs to the designated container (cgroup).
fn set_sample_period<'a>(&'a mut self, period: u64) -> &'a mut PerfCounterBuilderLinux
Add a sample period.
fn set_sample_frequency<'a>(&'a mut self, frequency: u64) -> &'a mut PerfCounterBuilderLinux
Add a sample frequency.
fn disable<'a>(&'a mut self) -> &'a mut PerfCounterBuilderLinux
The counter starts out disabled.
fn inherit<'a>(&'a mut self) -> &'a mut PerfCounterBuilderLinux
This counter should count events of child tasks as well as the task specified.
fn pinned<'a>(&'a mut self) -> &'a mut PerfCounterBuilderLinux
The pinned bit specifies that the counter should always be on the CPU if at all possible. It applies only to hardware counters and only to group leaders.
fn exclusive<'a>(&'a mut self) -> &'a mut PerfCounterBuilderLinux
The counter is exclusive i.e., when this counter's group is on the CPU, it should be the only group using the CPU's counters.
fn exclude_user<'a>(&'a mut self) -> &'a mut PerfCounterBuilderLinux
The counter excludes events that happen in user space.
fn exclude_kernel<'a>(&'a mut self) -> &'a mut PerfCounterBuilderLinux
The counter excludes events that happen in the kernel.
fn exclude_hv<'a>(&'a mut self) -> &'a mut PerfCounterBuilderLinux
The counter excludes events that happen in the hypervisor.
fn exclude_idle<'a>(&'a mut self) -> &'a mut PerfCounterBuilderLinux
The counter doesn't count when the CPU is idle.
fn enable_mmap<'a>(&'a mut self) -> &'a mut PerfCounterBuilderLinux
Enables recording of exec mmap events.
fn inherit_stat<'a>(&'a mut self) -> &'a mut PerfCounterBuilderLinux
The counter will save event counts on context switch for inherited tasks. This is meaningful only if the inherit field is set.
fn enable_on_exec<'a>(&'a mut self) -> &'a mut PerfCounterBuilderLinux
The counter is automatically enabled after a call to exec.
fn enable_task_notification<'a>(&'a mut self) -> &'a mut PerfCounterBuilderLinux
fork/exit notifications are included in the ring buffer.
fn enable_watermark<'a>(&'a mut self, watermark_events: u32) -> &'a mut PerfCounterBuilderLinux
The counter has a sampling interrupt happen when we cross the wakeup_watermark boundary. Otherwise interrupts happen after wakeup_events samples.
fn set_ip_sample_arbitrary_skid<'a>(&'a mut self) -> &'a mut PerfCounterBuilderLinux
Sampled IP counter can have arbitrary skid.
fn set_ip_sample_constant_skid<'a>(&'a mut self) -> &'a mut PerfCounterBuilderLinux
Sampled IP counter requested to have constant skid.
fn set_ip_sample_req_zero_skid<'a>(&'a mut self) -> &'a mut PerfCounterBuilderLinux
Sampled IP counter requested to have 0 skid.
fn enable_mmap_data<'a>(&'a mut self) -> &'a mut PerfCounterBuilderLinux
The counterpart of enable_mmap, but enables including data mmap events in the ring-buffer.
fn set_ip_sample_zero_skid<'a>(&'a mut self) -> &'a mut PerfCounterBuilderLinux
Sampled IP counter must have 0 skid.
fn enable_read_format_time_enabled<'a>(&'a mut self) -> &'a mut PerfCounterBuilderLinux
Adds the 64-bit time_enabled field. This can be used to calculate estimated totals if the PMU is overcommitted and multiplexing is happening.
fn enable_read_format_time_running<'a>(&'a mut self) -> &'a mut PerfCounterBuilderLinux
Adds the 64-bit time_running field. This can be used to calculate estimated totals if the PMU is overcommitted and multiplexing is happening.
fn enable_read_format_id<'a>(&'a mut self) -> &'a mut PerfCounterBuilderLinux
Adds a 64-bit unique value that corresponds to the event group.
fn enable_read_format_group<'a>(&'a mut self) -> &'a mut PerfCounterBuilderLinux
Allows all counter values in an event group to be read with one read.
fn enable_sampling_ip<'a>(&'a mut self) -> &'a PerfCounterBuilderLinux
fn enable_sampling_tid<'a>(&'a mut self) -> &'a PerfCounterBuilderLinux
fn enable_sampling_time<'a>(&'a mut self) -> &'a PerfCounterBuilderLinux
fn enable_sampling_addr<'a>(&'a mut self) -> &'a PerfCounterBuilderLinux
fn enable_sampling_read<'a>(&'a mut self) -> &'a PerfCounterBuilderLinux
fn enable_sampling_callchain<'a>(&'a mut self) -> &'a PerfCounterBuilderLinux
fn enable_sampling_sample_id<'a>(&'a mut self) -> &'a PerfCounterBuilderLinux
fn enable_sampling_cpu<'a>(&'a mut self) -> &'a PerfCounterBuilderLinux
fn enable_sampling_period<'a>(&'a mut self) -> &'a PerfCounterBuilderLinux
fn enable_sampling_stream_id<'a>(&'a mut self) -> &'a PerfCounterBuilderLinux
fn enable_sampling_raw<'a>(&'a mut self) -> &'a PerfCounterBuilderLinux
fn enable_sampling_branch_stack<'a>(&'a mut self) -> &'a PerfCounterBuilderLinux
fn enable_sampling_regs_user<'a>(&'a mut self) -> &'a PerfCounterBuilderLinux
fn enable_sampling_stack_user<'a>(&'a mut self) -> &'a PerfCounterBuilderLinux
fn enable_sampling_sample_weight<'a>(&'a mut self) -> &'a PerfCounterBuilderLinux
fn enable_sampling_data_src<'a>(&'a mut self) -> &'a PerfCounterBuilderLinux
fn enable_sampling_identifier<'a>(&'a mut self) -> &'a PerfCounterBuilderLinux
fn enable_sampling_transaction<'a>(&'a mut self) -> &'a PerfCounterBuilderLinux
fn for_all_pids<'a>(&'a mut self) -> &'a mut PerfCounterBuilderLinux
Measure for all PIDs on the core.
fn for_pid<'a>(&'a mut self, pid: i32) -> &'a mut PerfCounterBuilderLinux
Measure for a specific PID.
fn on_cpu<'a>(&'a mut self, cpu: isize) -> &'a mut PerfCounterBuilderLinux
Pin counter to CPU.
fn on_all_cpus<'a>(&'a mut self) -> &'a mut PerfCounterBuilderLinux
Measure on all CPUs.
fn finish_sampling_counter(&self) -> Result<PerfCounter, Error>
fn finish(&self) -> Result<PerfCounter, Error>
Instantiate the performance counter.
Trait Implementations
impl Default for PerfCounterBuilderLinux
[src]
fn default() -> PerfCounterBuilderLinux
Returns the "default value" for a type. Read more