[profiler] Limit the number of allocated sample hit structures.