improve code for cpu debug.