Experimental: occasionally gather profiling data to minimize memory overhead