summaryrefslogtreecommitdiff
path: root/src/ui.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/ui.rs')
-rw-r--r--src/ui.rs7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/ui.rs b/src/ui.rs
index cf8078f..081802f 100644
--- a/src/ui.rs
+++ b/src/ui.rs
@@ -76,11 +76,18 @@ impl UI {
_ = waitpid(pid, None)?;
}
+ let filters: Vec<&str> = match &args.filter {
+ Some(filter) => filter.split(",").collect::<Vec<&str>>(),
+ None => vec![],
+ };
while !should_quit {
if have_to_trace {
if let Some(reg) = trace_next(pid)? {
have_to_print ^= true;
if have_to_print {
+ if !filters.is_empty() && !filters.contains(&reg.rax()) {
+ continue;
+ }
self.add_line(reg);
}
} else {