do not collect profile information if profiling is off (avoid memory exhaustion)