At kernel version 2.6.26, the export for init_mm was removed. When ITrace is built as a standalone driver, the Makefile invokes a script that looks for the address of init_mm in /proc/kallsyms and stores the result in hooks.h. Unfortunately, the stapitrace systemtap-based module does not use that Makefile, so it has no way to determine the address of init_mm. Since there's no other means of retrieving the start_code and end_code values contained by init_mm, the only alternative is to simply zero-out the related values in mdata. We also to need to ensure we don't try to use the pi_init_mm_address macro that would normally be defined in hooks.h. Through insertions of "#ifndef STAP_ITRACE" and mathching "#endif's", we can control what is and what is not included in the stapitrace module. We could set this up so we'd only do this when we have to (i.e., when kernel version > 2.6.25), but I don't think there's much need to do that, and it would really make the code messy.
I suspect that removing the true values for init_mm's start and end code addresses probably affects ITrace's ability to trace kernel code. Is that correct? Or is that data used for something else.