When the ocount tool was developed, a number of utility functions were needed that were very similar to operf utility functions, with just minor changes. The decision was made at the time to copy these functions into ocount and change them as needed. To avoid dual maintenance on very similar functions, we should converge the two tools to use one common set of utility functions. The main reason for not doing so in the first place was to make it easier to review ocount patches and not have to look at operf changes at the same time.
This bug ticket is being created as a reminder to converge those utility functions.