tracing: Use pid bitmap instead of a pid array for set_event_pid

In order to add the ability to let tasks that are filtered by the events
have their children also be traced on fork (and then not traced on exit),
convert the array into a pid bitmask. Most of the time the number of pids is
only 32768 pids or a 4k bitmask, which is the same size as the default list
currently is, and that list could grow if more pids are listed.

This also greatly simplifies the code.

Suggested-by: "H. Peter Anvin" <hpa@zytor.com>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
This commit is contained in:
Steven Rostedt
2016-04-13 16:27:49 -04:00
parent 9ebc57cfaa
commit f4d34a87e9
2 changed files with 102 additions and 124 deletions

View File

@@ -177,9 +177,8 @@ struct trace_options {
};
struct trace_pid_list {
unsigned int nr_pids;
int order;
pid_t *pids;
int pid_max;
unsigned long *pids;
};
/*