fix a few bugs in benewalloc, split codegen timer in 2