fix some bugs

stats was disabled in release build llvm, so we need think another way

Signed-off-by: xiehuc <xiehuc@gmail.com>