pub struct Memcheck(/* private fields */);
Available on crate feature
default
only.Expand description
The configuration for Memcheck
Can be specified in crate::LibraryBenchmarkConfig::tool
or
crate::BinaryBenchmarkConfig::tool
.
§Example
use iai_callgrind::{LibraryBenchmarkConfig, main, Memcheck};
main!(
config = LibraryBenchmarkConfig::default()
.tool(Memcheck::default());
library_benchmark_groups = some_group
);
Implementations§
Source§impl Memcheck
impl Memcheck
Sourcepub fn with_args<I, T>(args: T) -> Self
pub fn with_args<I, T>(args: T) -> Self
Create a new Memcheck
configuration with initial command-line arguments
See also Callgrind::args
and Memcheck::args
§Examples
use iai_callgrind::Memcheck;
let config = Memcheck::with_args(["free-is-write=yes"]);
Sourcepub fn args<I, T>(&mut self, args: T) -> &mut Self
pub fn args<I, T>(&mut self, args: T) -> &mut Self
Add command-line arguments to the Memcheck
configuration
Valid arguments are https://valgrind.org/docs/manual/mc-manual.html#mc-manual.options and the core valgrind command-line arguments https://valgrind.org/docs/manual/manual-core.html#manual-core.options.
See also Callgrind::args
§Examples
use iai_callgrind::Memcheck;
let config = Memcheck::default().args(["show-leak-kinds=all"]);
Sourcepub fn enable(&mut self, value: bool) -> &mut Self
pub fn enable(&mut self, value: bool) -> &mut Self
Enable this tool. This is the default.
See also Callgrind::enable
§Examples
use iai_callgrind::Memcheck;
let config = Memcheck::default().enable(false);
Sourcepub fn format<I, T>(&mut self, kinds: T) -> &mut Self
pub fn format<I, T>(&mut self, kinds: T) -> &mut Self
Customize the format of the Memcheck
output
See also Callgrind::format
for more details and ErrorMetric
for valid metrics.
§Examples
use iai_callgrind::{ErrorMetric, Memcheck};
let config = Memcheck::default().format([ErrorMetric::Errors, ErrorMetric::SuppressedErrors]);
Trait Implementations§
Source§impl AsRef<Tool> for Memcheck
impl AsRef<Tool> for Memcheck
Source§fn as_ref(&self) -> &InternalTool
fn as_ref(&self) -> &InternalTool
Converts this type into a shared reference of the (usually inferred) input type.
Source§impl From<&Memcheck> for InternalTool
impl From<&Memcheck> for InternalTool
Source§impl From<&mut Memcheck> for InternalTool
impl From<&mut Memcheck> for InternalTool
Auto Trait Implementations§
impl Freeze for Memcheck
impl RefUnwindSafe for Memcheck
impl Send for Memcheck
impl Sync for Memcheck
impl Unpin for Memcheck
impl UnwindSafe for Memcheck
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