libintrovirt v0.57.4
IntroVirt introspection library
Loading...
Searching...
No Matches
introvirt::TaskFilter Class Referencefinal

Filter to remove events based on task. More...

#include <TaskFilter.hh>

Public Member Functions

void add_pid (uint64_t pid)
 Add a process ID.
 
bool remove_pid (uint64_t pid)
 Remove a process ID.
 
void add_tid (uint64_t tid)
 Add a thread ID.
 
bool remove_tid (uint64_t tid)
 Remove a thread ID.
 
void add_name (const std::string &name)
 Add a process name to the filter.
 
bool remove_name (const std::string &name)
 Remove a process name from the filter.
 
void clear ()
 Clear all filters.
 
bool matches (const Event &event) const
 Check if the event matches our task filter.
 
 TaskFilter ()=default
 
 ~TaskFilter ()=default
 

Detailed Description

Filter to remove events based on task.

This class allows you to filter for events related to a process, thread, or process name. Adding an entry to the list means that events will be delivered for tasks matching the entry.

Constructor & Destructor Documentation

◆ TaskFilter()

introvirt::TaskFilter::TaskFilter ( )
default

◆ ~TaskFilter()

introvirt::TaskFilter::~TaskFilter ( )
default

Member Function Documentation

◆ add_name()

void introvirt::TaskFilter::add_name ( const std::string &  name)

Add a process name to the filter.

The name comparison is case-insensitive. It's also only treated as a prefix. For example, "exp" will match "explorer.exe".

Parameters
nameThe name to add

◆ add_pid()

void introvirt::TaskFilter::add_pid ( uint64_t  pid)

Add a process ID.

Parameters
pidThe PID to filter for
Examples
ivexec.cc.

◆ add_tid()

void introvirt::TaskFilter::add_tid ( uint64_t  tid)

Add a thread ID.

Parameters
tidThe TID to filter for

◆ clear()

void introvirt::TaskFilter::clear ( )

Clear all filters.

This will let all calls through

Examples
ivexec.cc.

◆ matches()

bool introvirt::TaskFilter::matches ( const Event event) const

Check if the event matches our task filter.

Parameters
event
Returns
true
false

◆ remove_name()

bool introvirt::TaskFilter::remove_name ( const std::string &  name)

Remove a process name from the filter.

Parameters
nameThe name to remove
Returns
true if the name was removed
false if the name was not found

◆ remove_pid()

bool introvirt::TaskFilter::remove_pid ( uint64_t  pid)

Remove a process ID.

Parameters
pidThe PID to remove
Returns
true if the PID was removed
false if the PID was not found

◆ remove_tid()

bool introvirt::TaskFilter::remove_tid ( uint64_t  tid)

Remove a thread ID.

Parameters
tidThe TID to remove
Returns
true if the TID was removed
false if the TID was not found

The documentation for this class was generated from the following file: