Add CONSTVAL knowledge to userspace libctf (a different implementation from
ctfconvert/ctfmerge/ctfdump, apparently!) and libdtrace. Document in ctf.5.
Add 'constvalmask' on generic dtrace probe structure. When non-zero, it
specifies which cached args[] members are absent due to constant removal.
The other arguments must be shifted up and the real values inserted. This
is done in generic dtrace_probe(), using the provider-specified getargval()
POP.
The constvalmasks for functions in a module are populated during
fbt_provide_module(), the same routine the populates the fbt:MMM:: probes
for module MMM. (It is invoked at fbt load for existing linker_files, as
well as whenever a new .ko is loaded). MD fbt_provide_module_function()
routines call back into the MI routine fbt_update_constvalmask() to compute
and cache the constval bitmask for a given probe.
getargval() borrows a lot of CTF code from getargdesc() and there is
probably an opportunity to deduplicate that code somewhat. It determines if
the argument at a given index is a constant value type. If it is, it
returns that constant value. If it is not, it falls back to the ordinary
argument lookup logic (shifted by the appropriate number of constant value
arguments preceeding the given index).
TODO: tinderbox before commit, but the MI changes are fairly trivial and
copied directly from working x86.