Add some of the work on partitioning and profiling.

The profiling work is pretty much done, I can't see what else needs to be added
to it. The partitioning work needs to have some information added to it, and
that is next on my TODO. ;-P