Modify C++ code to get runtime info