Existing code tended to assume that counters had type uint64_t and
computed size from the number of counters. Fix this code to directly
compute the counters size in number of bytes where possible. When the
number of counters is needed, use __llvm_profile_counter_entry_size()
or getCounterTypeSize(). In a later diff these functions will depend
on the profile mode.
Change the meaning of DataSize and CountersSize to make them more clear.
- DataSize (CountersSize) - the size of the data (counter) section in bytes.
- NumData (NumCounters) - the number of data (counter) entries.
CounterSize means NumCounters similar to DataSize which should mean NumData.
You rename this for Counter not for Data. But down the road below, Header still uses CounterSize and DataSize.
Should we keep CounterSize same as before?