Update trace entry header format to not include initial values

We don't need to encode initial timestamps and the method id in the
header. This will not special case the first entry and simplify the
logic both in generating trace and parsing the trace.

Also update the bits required to store the number of entries. The
current 16-bit is not sufficient. The default per thread buffer size is
512 * 1024 and we need 18 bits to encode all those entries. Also
increase the number of bits for the recording the size of all entries.

Bug: 259258187
Test: art/test.py -t 2246-trace-v2
Change-Id: I66e2d725acd23bbc3c900644f09e3e289fe043b6
3 files changed