implemented the new stuff in emulated sample in compiler and in normal
sample. fixed and improved runtime instrumentation check. made some
minor improvements in sample. updated todo list accordingly.