WIP: more conditional compilation stuff for profiling related code