Several changes:
-Can control space allocated for coreprof events with a buildscript option.
-Attempted to exit ooojava worker threads gracefully with pthread_cleanup_XXX
and pthread_cancel in asynchronous mode. Cleanup doesn't trigger from asynch
cancel, so this doesn't do the trick. The reason this is nice is that COREPROF_EXIT
is never called by worker threads, so the timestamp of the MAIN duration is being
fudged by using the last timestamp of a sub event. If we wanted to add more
interesting functionality to COREPROF_EXIT we can't use the workaround and we'll
have to revisit this--left the commented pthread code as a starting point for later.
-Adjusted event IDs and the baseshift so same number of bits are used, but
it is easier to look at the coreprof output file in a hex editor to visually
inspect the raw data, for debugging.