Loading...
tools/malloc_replay.cpp libmalloc-374.120.1 libmalloc-283.60.1
--- libmalloc/libmalloc-374.120.1/tools/malloc_replay.cpp
+++ libmalloc/libmalloc-283.60.1/tools/malloc_replay.cpp
@@ -48,9 +48,6 @@
 
 #endif // TARGET_OS_IPHONE && !TARGET_OS_SIMULATOR
 
-// Opt out malloc_replay from PGM
-asm(".section __DATA, __pgm_opt_out\n.long 0\n");
-
 static void (*s_funcMagSetThreadIndex)(unsigned int index);
 
 extern "C" int thread_selfcounts(int type, void *buf, size_t nbytes);
@@ -778,6 +775,7 @@
 		//Write out the fragmentation in DefaultMallocZone as a primary metric.
 		//
 		pdwriter_new_value(perfDataWriter, _DefaultFragMetricName, PDUNIT_CUSTOM(FragmentedPercent), defaultFrag);
+		pdwriter_record_variable(perfDataWriter, kPCFailureThresholdPctVar, 10);
 	} else if (config & CONFIG_REC_STATS) {
 		printf("\n\n\n");
 		printf("Call       Cycles (mean)\n");
@@ -830,6 +828,7 @@
 						// operation enum is indexed from 1, adjust index for mcall_to_name.
 						snprintf(full_name, sizeof(full_name), "%s-mean", mcall_to_name(i + 1));
 						pdwriter_new_value(perfDataWriter, full_name, pdunit_instructions, mean);
+						pdwriter_record_variable(perfDataWriter, kPCFailureThresholdPctVar, 100);
 					} else {
 						printf("%9s  %6llu\n", mcall_to_name(i + 1), mean);
 					}