This uses G_REGEX_OPTIMIZE as well to get the benefit of the JIT when using
PCRE2 via GLib.
This turns out to take about half (or less) of the time that it takes to
use sscanf() to parse the template/input string. 0.03 vs 0.08 seconds on
my system.
If someone wants to take this further, and just look at the input string
rather than rely on GRegex, that'd be fine by me too.
We will always have either \n or \0 at the end, so we can just sscanf this
without needing to split strings.
The sscanf() is still our top offender though, and so we should probably
look for other ways to parse this string than sscanf().
That is the instrument that really provides things within the kernel
address space, so it should be the instrument which copies the contents
of kallsyms to the capture file (compressed).
We want to reduce the chances we miss things between prepare and record
virtual methods, so delay the adding of processes until the recording is
started. We may get duplicate records, but we can deal with that when
analyzing the capture.