We need access to this from the process info but can share the instance.
It sucks to walk the hashtable here, but the alternative is to make these
recursive so that we can check a parent mount namespace.
Until then, take the hit and iterate all the pids to populate them with
the additional device.
Related GNOME/gnome-builder#2090
If we get a request for a process that we have not captured any information
about then give it the "Unknown Process" symbol. That way we do not crash
and we also maintain our invariant of not mutating the hash table.
We only mutate this during loading of the document so that we can be
confident in multi-threaded workers after loading. This just asserts
that invariant holds true.
These are largely pre-sorted, but not fully when you have merged data. This
uses timsort to speed that up a bit.
In particular, the comparison of various sorts break down to (for a
~32,000,000 record capture.
g_array_sort_with_data() => 3.9 seconds
qsort_r() = > 3.7 seconds
gtk_tim_sort() => .79 seconds
This brings together the two libraries back into one now that the whole
design is pretty well sorted out. They depend on roughly the same libraries
anyway and it's way easier of the single library can both read and write
the capture files (along with bringing in libsysprof-capture symbols in
a single place).