[PGO] Fix a bug in InstProfWriter addRecord