can inject special code when ios project code compiling,not on runtime. want insert function project functions!
just this:
//the original code //the filename user_code.cpp int f1(){ return 1; } int f2(){ return 2; } int f3(){ return 3; } int main(){ for(int i=0;i<1000;i++)f1(); for(int i=0;i<10000;i++)f2(); for(int i=0;i<100000;i++)f3(); return 0; } //the injected code int function_counter[3]; int f1(){ function_counter[0]++; return 1; } int f2(){ function_counter[1]++; return 2; } int f3(){ function_counter[2]++; return 3; }
Comments
Post a Comment