With my profiling mod installed (https://www.curseforge.com/minecraft/mc-mods/omniscience-debugger), it detects that profiler.endSection() is being called more times than profiler.startSection().
Unless there is a very strange compat issue between the two mods, this is a reliable check within my mod. If it's true, then most profilers will give incorrect results without throwing an error.
I'll also look into this more when I can.