added function trace mechanism, looks like cpu usage has gone down?