Merge "Refactor some profiling info functions"